2019-11-13 18:08:56 +03:00
|
|
|
{ fetchurl, python2Packages, lib }:
|
2017-01-16 14:52:29 +03:00
|
|
|
|
2019-11-13 18:08:56 +03:00
|
|
|
with python2Packages;
|
2017-01-16 14:52:29 +03:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "couchpotato";
|
2017-01-16 14:52:29 +03:00
|
|
|
version = "3.0.1";
|
|
|
|
disabled = isPy3k;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/CouchPotato/CouchPotatoServer/archive/build/${version}.tar.gz";
|
|
|
|
sha256 = "1xwjis3ijh1rff32mpdsphmsclf0lkpd3phpgxkccrigq1m9r3zh";
|
|
|
|
};
|
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CouchPotato.py --replace "dirname(os.path.abspath(__file__))" "os.path.join(dirname(os.path.abspath(__file__)), '../${python.sitePackages}')"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
mkdir -p $out/${python.sitePackages}/
|
|
|
|
|
|
|
|
cp -r libs/* $out/${python.sitePackages}/
|
|
|
|
cp -r couchpotato $out/${python.sitePackages}/
|
|
|
|
|
|
|
|
cp CouchPotato.py $out/bin/couchpotato
|
|
|
|
chmod +x $out/bin/*
|
|
|
|
'';
|
|
|
|
|
2019-06-25 14:24:31 +03:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram "$out/bin/couchpotato" --set PYTHONPATH "$PYTHONPATH:$out/${python.sitePackages}"
|
2017-01-16 14:52:29 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Automatic movie downloading via NZBs and torrents";
|
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
homepage = https://couchpota.to/;
|
|
|
|
maintainers = with lib.maintainers; [ fadenb ];
|
|
|
|
};
|
|
|
|
}
|