{ 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} ''; }