maim-utils/default.nix
2023-08-29 18:54:00 +02:00

21 lines
432 B
Nix

{ stdenv, scdoc, pipe-viewer, ...}:
stdenv.mkDerivation rec {
pname = "maim-utils";
version = "v1.0";
src = ./.;
buildInputs = [ scdoc ];
buildPhase = ''
scdoc < ${pname}.1.scd > ${pname}.1
'';
installPhase = ''
mkdir -p $out/bin $out/share/{man/man1,zsh/site-functions}
cp ${pname} $out/bin/
cp ${pname}.1 $out/share/man/man1/
cp zsh.completion $out/share/zsh/site-functions/_${pname}
'';
}