1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 python3,
6 makeWrapper,
7 libarchive,
8}:
9
10let
11 pythonEnv = python3.withPackages (
12 ps: with ps; [
13 cheetah3
14 lxml
15 ]
16 );
17in
18stdenv.mkDerivation rec {
19 pname = "sickgear";
20 version = "3.33.2";
21
22 src = fetchFromGitHub {
23 owner = "SickGear";
24 repo = "SickGear";
25 rev = "release_${version}";
26 hash = "sha256-8cynBaVbFDI1hNwP03crkOf8Av+NCWr0xJLsZJpHLGs=";
27 };
28
29 patches = [
30 ./patches/override-python-version-check.patch
31 ];
32
33 dontBuild = true;
34 doCheck = false;
35
36 nativeBuildInputs = [ makeWrapper ];
37 buildInputs = [
38 pythonEnv
39 libarchive
40 ];
41
42 installPhase = ''
43 mkdir -p $out/bin $out/opt/sickgear
44 cp -R {autoProcessTV,gui,lib,sickgear,sickgear.py} $out/opt/sickgear/
45
46 makeWrapper $out/opt/sickgear/sickgear.py $out/bin/sickgear \
47 --suffix PATH : ${lib.makeBinPath [ libarchive ]}
48 '';
49
50 meta = with lib; {
51 description = "Most reliable stable TV fork of the great Sick-Beard to fully automate TV enjoyment with innovation";
52 mainProgram = "sickgear";
53 license = licenses.gpl3;
54 homepage = "https://github.com/SickGear/SickGear";
55 maintainers = with lib.maintainers; [ rembo10 ];
56 };
57}