nix-config/pkgs/comma/default.nix

41 lines
888 B
Nix
Raw Permalink 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
2023-04-22 13:36:28 +02:00
nativeBuildInputs = [
2021-05-13 09:52:50 +02:00
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; {
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 ];
mainProgram = ",";
maintainers = with maintainers; [ ambroisie ];
platforms = platforms.unix;
2021-05-13 09:52:50 +02:00
};
}