nix: allow passing extra packages in PATH

This commit is contained in:
Tom van Dijk 2025-07-28 12:41:25 +02:00
parent cbdbaf1938
commit 20e1a3c93a
No known key found for this signature in database
GPG key ID: 7A984C8207ADBA51

View file

@ -30,6 +30,9 @@ withFTPS ? false,
# samba/cifs server; dangerous and buggy, enable if you really need it
withSMB ? false,
# extra packages to add to the PATH
extraPackages ? [ ],
}:
let
@ -61,7 +64,7 @@ in stdenv.mkDerivation {
installPhase = ''
install -Dm755 $src $out/share/copyparty-sfx.py
makeWrapper ${pyEnv.interpreter} $out/bin/copyparty \
--set PATH '${lib.makeBinPath ([ util-linux ] ++ lib.optional withMediaProcessing ffmpeg)}:$PATH' \
--set PATH '${lib.makeBinPath ([ util-linux ] ++ extraPackages ++ lib.optional withMediaProcessing ffmpeg)}:$PATH' \
--add-flags "$out/share/copyparty-sfx.py"
'';
meta.mainProgram = "copyparty";