Moved 'noise' to seperate derivation

This commit is contained in:
Nox Sluijtman 2025-06-18 09:19:09 +02:00
parent df260f4f4f
commit a0be797dd5
Signed by: Egg
SSH key fingerprint: SHA256:2sG9X3C7Xvq2svGumz1/k7cm8l4G9+qAtAeugqB4J9M
35 changed files with 62 additions and 10 deletions

37
noise.nix Normal file
View file

@ -0,0 +1,37 @@
{
scdoc,
stdenvNoCC,
nushell,
mpc-cli,
}:
stdenvNoCC.mkDerivation {
pname = "noise";
version = "0.6";
src = ./src/noise;
nativeBuildInputs = [
scdoc
nushell
];
buildPhase = ''
for page in $(find manpages -type f); do
scdoc < $page > $(basename $page .scd)
done
export dontPatchShebangs=1
'';
installPhase = ''
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
cp bin/* $out/bin/
cp completions/* $out/share/zsh/site-functions/
cp *.1 $out/share/man/man1/
runHook postInstall
'';
postInstall = ''
substituteInPlace $out/bin/* \
--replace "mpc " "${mpc-cli}/bin/mpc "
'';
}