nix-config/pkgs/comma/default.nix
Bruno BELANYI 7ab49dbeab pkgs: remove 'shellcheck' as a 'buildPhase'
I already verify those scripts with my pre-commit hook. And that way
avoid spurious build failures in case a (transitive) dependency is
broken.
2022-06-22 16:04:01 +02:00

41 lines
884 B
Nix

{ lib, fzf, makeWrapper, nix-index, stdenvNoCC }:
stdenvNoCC.mkDerivation rec {
pname = "comma";
version = "0.1.0";
src = ./comma;
buildInputs = [
makeWrapper
];
dontUnpack = true;
dontBuild = true;
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://gitea.belanyi.fr/ambroisie/nix-config";
license = with licenses; [ mit ];
platforms = platforms.unix;
maintainers = with maintainers; [ ambroisie ];
};
}