Using python2 and abadoned upstream in 2020, last release in 2015.main
parent
2be369a7d6
commit
15f577daaa
@ -1,42 +0,0 @@ |
||||
{ config, pkgs, lib, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.services.couchpotato; |
||||
|
||||
in |
||||
{ |
||||
options = { |
||||
services.couchpotato = { |
||||
enable = mkEnableOption "CouchPotato Server"; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
systemd.services.couchpotato = { |
||||
description = "CouchPotato Server"; |
||||
after = [ "network.target" ]; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
|
||||
serviceConfig = { |
||||
Type = "simple"; |
||||
User = "couchpotato"; |
||||
Group = "couchpotato"; |
||||
StateDirectory = "couchpotato"; |
||||
ExecStart = "${pkgs.couchpotato}/bin/couchpotato"; |
||||
Restart = "on-failure"; |
||||
}; |
||||
}; |
||||
|
||||
users.users.couchpotato = |
||||
{ group = "couchpotato"; |
||||
home = "/var/lib/couchpotato/"; |
||||
description = "CouchPotato daemon user"; |
||||
uid = config.ids.uids.couchpotato; |
||||
}; |
||||
|
||||
users.groups.couchpotato = |
||||
{ gid = config.ids.gids.couchpotato; }; |
||||
}; |
||||
} |
@ -1,44 +0,0 @@ |
||||
{ fetchFromGitHub, python2Packages, lib }: |
||||
|
||||
with python2Packages; |
||||
|
||||
buildPythonApplication rec { |
||||
pname = "couchpotato"; |
||||
version = "3.0.1"; |
||||
disabled = isPy3k; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "CouchPotato"; |
||||
repo = "CouchPotatoServer"; |
||||
rev = "build/${version}"; |
||||
hash = "sha256-0k8MqLnqYjhHPE9/jncTFIj1T4F2aXU4mXdeEimDB7M="; |
||||
}; |
||||
|
||||
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/* |
||||
''; |
||||
|
||||
postFixup = '' |
||||
wrapProgram "$out/bin/couchpotato" --set PYTHONPATH "$PYTHONPATH:$out/${python.sitePackages}" |
||||
''; |
||||
|
||||
meta = { |
||||
description = "Automatic movie downloading via NZBs and torrents"; |
||||
license = lib.licenses.gpl3; |
||||
homepage = "https://couchpota.to/"; |
||||
maintainers = with lib.maintainers; [ fadenb ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue