nix-config/pkgs/comma/default.nix

41 lines
882 B
Nix
Raw Normal View History

{ lib, fzf, makeWrapper, nix-index, stdenvNoCC }:
2021-05-13 09:52:50 +02:00
stdenvNoCC.mkDerivation rec {
pname = "comma";
version = "0.1.0";
src = ./comma;
2021-05-13 09:52:50 +02:00
buildInputs = [
makeWrapper
];
2021-08-31 19:00:46 +02:00
dontUnpack = true;
dontBuild = true;
2021-05-13 09:52:50 +02:00
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/${meta.mainProgram}
chmod a+x $out/bin/${meta.mainProgram}
'';
wrapperPath = lib.makeBinPath [
fzf
nix-index
];
fixupPhase = ''
patchShebangs $out/bin/${meta.mainProgram}
wrapProgram $out/bin/${meta.mainProgram} --prefix PATH : "${wrapperPath}"
'';
meta = with lib; {
mainProgram = ",";
description = "A simple script inspired by Shopify's comma, for modern Nix";
homepage = "https://git.belanyi.fr/ambroisie/nix-config";
2021-05-13 09:52:50 +02:00
license = with licenses; [ mit ];
platforms = platforms.unix;
maintainers = with maintainers; [ ambroisie ];
2021-05-13 09:52:50 +02:00
};
}