Merge pull request #11678 from jcbrand/sabnzbd-ssl

sabnzbd: Add OpenSSL support and fix wrapping
This commit is contained in:
goibhniu 2015-12-13 16:39:31 +01:00
commit 548fbf612f
2 changed files with 16 additions and 15 deletions

View File

@ -3,14 +3,11 @@ source $stdenv/setup
tar xvfz $src tar xvfz $src
mv SABnzbd-* $out 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 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 chmod +x $out/bin/sabnzbd
for i in $(cd $out/bin && ls); do wrapPythonProgramsIn $out/bin "$pythonPath"
wrapProgram $out/bin/$i --prefix PYTHONPATH : "$(toPythonPath $python):$(toPythonPath $out):$(toPythonPath $cheetahTemplate):$(toPythonPath $sqlite3)" \ wrapProgram $out/bin/.sabnzbd-wrapped --prefix PATH : "$par2cmdline/bin:$unzip/bin:$unrar/bin"
--prefix PATH : "$par2cmdline/bin:$unzip/bin:$unrar/bin"
done
echo $out echo $out

View File

@ -1,20 +1,24 @@
{stdenv, fetchurl, python, pythonPackages, cheetahTemplate, makeWrapper, par2cmdline, unzip, unrar}: {stdenv, fetchurl, python, pythonPackages, par2cmdline, unzip, unrar}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "sabnzbd-0.7.17"; version = "0.7.20";
name = "sabnzbd-${version}";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/sabnzbdplus/SABnzbd-0.7.17-src.tar.gz; url = "mirror://sourceforge/sabnzbdplus/SABnzbd-${version}-src.tar.gz";
sha256 = "02gbh3q3qnbwy4xn1hw4i4fyw4j5nkrqy4ak46mxwqgip9ym20d5"; sha256 = "0hl7mwgyvm4d68346s7vlv0qlibfh2p2idpyzpjfvk8f79hs9cr0";
}; };
buildInputs = [makeWrapper python sqlite3 cheetahTemplate]; pythonPath = with pythonPackages; [ pyopenssl sqlite3 cheetah ];
inherit stdenv python cheetahTemplate par2cmdline unzip unrar; buildInputs = with pythonPackages; [wrapPython];
inherit (pythonPackages) sqlite3; inherit python par2cmdline unzip unrar;
builder = ./builder.sh; builder = ./builder.sh;
meta = { meta = with stdenv.lib; {
description = "Usenet NZB downloader, par2 repairer and auto extracting server"; description = "Usenet NZB downloader, par2 repairer and auto extracting server";
homepage = http://sabnzbd.org;
license = licenses.gpl2Plus;
platforms = platforms.linux;
}; };
} }