Merge pull request #187983 from rembo10/sickgear-update

sickgear: 0.25.35 -> 0.25.40, patch & optional dependencies
This commit is contained in:
Jonas Heinrich 2022-09-11 10:50:32 +02:00 committed by GitHub
commit 422677ccdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 5 deletions

View File

@ -0,0 +1,28 @@
From e97f418803c1db9a753fa755a9ee0cf04eabaed3 Mon Sep 17 00:00:00 2001
From: rembo10 <rembo10@users.noreply.github.com>
Date: Sun, 11 Sep 2022 13:00:29 +0530
Subject: [PATCH] Allow running on unsupported Python versions
---
sickgear.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sickgear.py b/sickgear.py
index 9d0440bb..6d65e65d 100755
--- a/sickgear.py
+++ b/sickgear.py
@@ -43,10 +43,7 @@ versions = [((2, 7, 9), (2, 7, 18)), ((3, 7, 1), (3, 8, 14)),
((3, 9, 0), (3, 9, 2)), ((3, 9, 4), (3, 9, 14)),
((3, 10, 0), (3, 10, 7))] # inclusive version ranges
if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)):
- print('Python %s.%s.%s detected.' % sys.version_info[:3])
- print('Sorry, SickGear requires a Python version %s' % ', '.join(map(
- lambda r: '%s - %s' % tuple(map(lambda v: str(v).replace(',', '.')[1:-1], r)), versions)))
- sys.exit(1)
+ pass
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
is_win = 'win' == sys.platform[0:3]
--
2.37.2

View File

@ -1,23 +1,27 @@
{ lib, stdenv, fetchFromGitHub, python3, makeWrapper }:
{ lib, stdenv, fetchFromGitHub, python3, makeWrapper, libarchive }:
let
pythonEnv = python3.withPackages(ps: with ps; [ cheetah3 ]);
pythonEnv = python3.withPackages(ps: with ps; [ cheetah3 lxml ]);
in stdenv.mkDerivation rec {
pname = "sickgear";
version = "0.25.35";
version = "0.25.40";
src = fetchFromGitHub {
owner = "SickGear";
repo = "SickGear";
rev = "release_${version}";
sha256 = "0hc43wfa256nkjm7bvsr6b7xsyilm1ks4x16kvpprqmj1symlkz3";
sha256 = "sha256-AHV/HSKuVWZFdZdkFp9p7okAcFO40d9OqV20MaHKXaU=";
};
patches = [
./patches/override-python-version-check.patch
];
dontBuild = true;
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ pythonEnv ];
buildInputs = [ pythonEnv libarchive ];
postPatch = ''
substituteInPlace sickgear.py --replace "/usr/bin/env python2" "/usr/bin/env python"