diff --git a/pkgs/servers/sabnzbd/builder.sh b/pkgs/servers/sabnzbd/builder.sh index fb6f48d8b4cb..c263500cde45 100644 --- a/pkgs/servers/sabnzbd/builder.sh +++ b/pkgs/servers/sabnzbd/builder.sh @@ -5,12 +5,12 @@ mv SABnzbd-* $out # Create a start script and let wrapProgram with toPythonPath wrap it so that python is started with cheetahTemplate in its importpath (classpath) mkdir $out/bin -echo "$python/bin/python $out/SABnzbd.py" > $out/bin/sabnzbd +echo "$python/bin/python $out/SABnzbd.py \$*" > $out/bin/sabnzbd chmod +x $out/bin/sabnzbd for i in $(cd $out/bin && ls); do - wrapProgram $out/bin/$i \ - --prefix PYTHONPATH : "$(toPythonPath $python):$(toPythonPath $out):$(toPythonPath $cheetahTemplate)" + wrapProgram $out/bin/$i --prefix PYTHONPATH : "$(toPythonPath $python):$(toPythonPath $out):$(toPythonPath $cheetahTemplate)" \ + --prefix PATH : "$par2cmdline/bin:$unzip/bin:$unrar/bin" done echo $out diff --git a/pkgs/servers/sabnzbd/default.nix b/pkgs/servers/sabnzbd/default.nix index 9c2d947a4615..50e07f273291 100644 --- a/pkgs/servers/sabnzbd/default.nix +++ b/pkgs/servers/sabnzbd/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, python, cheetahTemplate, makeWrapper}: +{stdenv, fetchurl, python, cheetahTemplate, makeWrapper, par2cmdline, unzip, unrar}: stdenv.mkDerivation { name = "sabnzbd-0.4.12"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { }; buildInputs = [makeWrapper python cheetahTemplate]; - inherit stdenv python cheetahTemplate; + inherit stdenv python cheetahTemplate par2cmdline unzip unrar; builder = ./builder.sh;