chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / sa / sabnzbd / package.nix
blob6723ccbd4ecd731f77cfa601311b648e891405d0
2   lib,
3   stdenv,
4   coreutils,
5   fetchFromGitHub,
6   fetchPypi,
7   python3,
8   par2cmdline-turbo,
9   unzip,
10   unrar,
11   p7zip,
12   util-linux,
13   makeWrapper,
14   nixosTests,
17 let
18   sabctoolsVersion = "8.2.5";
19   sabctoolsHash = "sha256-ZEC813/JpGPEFL+nXKFAXFfUrrhECCIqONe27LwS00g=";
21   pythonEnv = python3.withPackages (
22     ps: with ps; [
23       apprise
24       babelfish
25       cffi
26       chardet
27       cheetah3
28       cheroot
29       cherrypy
30       configobj
31       cryptography
32       feedparser
33       guessit
34       jaraco-classes
35       jaraco-collections
36       jaraco-context
37       jaraco-functools
38       jaraco-text
39       more-itertools
40       notify2
41       orjson
42       portend
43       puremagic
44       pycparser
45       pysocks
46       python-dateutil
47       pytz
48       rebulk
49       # sabnzbd requires a specific version of sabctools
50       (sabctools.overridePythonAttrs (old: {
51         version = sabctoolsVersion;
52         src = fetchPypi {
53           pname = "sabctools";
54           version = sabctoolsVersion;
55           hash = sabctoolsHash;
56         };
57       }))
58       sabyenc3
59       sgmllib3k
60       six
61       tempora
62       zc-lockfile
63     ]
64   );
65   path = lib.makeBinPath [
66     coreutils
67     par2cmdline-turbo
68     unrar
69     unzip
70     p7zip
71     util-linux
72   ];
74 stdenv.mkDerivation rec {
75   version = "4.3.3";
76   pname = "sabnzbd";
78   src = fetchFromGitHub {
79     owner = pname;
80     repo = pname;
81     rev = version;
82     hash = "sha256-WJ58OawPSICCWMWQ042T4OmK5UBRZRU5tnLYxGPbDPc=";
83   };
85   nativeBuildInputs = [ makeWrapper ];
86   buildInputs = [ pythonEnv ];
88   installPhase = ''
89     runHook preInstall
91     mkdir -p $out
92     cp -R * $out/
93     mkdir $out/bin
94     echo "${pythonEnv}/bin/python $out/SABnzbd.py \$*" > $out/bin/sabnzbd
95     chmod +x $out/bin/sabnzbd
96     wrapProgram $out/bin/sabnzbd --set PATH ${path}
98     runHook postInstall
99   '';
101   passthru = {
102     tests.smoke-test = nixosTests.sabnzbd;
103     updateScript = ./update.sh;
104   };
106   meta = with lib; {
107     description = "Usenet NZB downloader, par2 repairer and auto extracting server";
108     homepage = "https://sabnzbd.org";
109     license = licenses.gpl2Plus;
110     platforms = platforms.linux;
111     maintainers = with lib.maintainers; [
112       jojosch
113       adamcstephens
114     ];
115     mainProgram = "sabnzbd";
116   };