diff --git a/pkgs/applications/video/kodi/addons/jellyfin/default.nix b/pkgs/applications/video/kodi/addons/jellyfin/default.nix index 93217122d53b..024f0f7d9fdc 100644 --- a/pkgs/applications/video/kodi/addons/jellyfin/default.nix +++ b/pkgs/applications/video/kodi/addons/jellyfin/default.nix @@ -1,28 +1,35 @@ -{ lib, addonDir, buildKodiAddon, fetchFromGitHub, kodi, requests, dateutil, six, kodi-six, signals, websocket }: +{ + lib, + addonDir, + buildKodiAddon, + fetchFromGitHub, + kodi, + requests, + dateutil, + six, + kodi-six, + signals, + websocket, +}: let python = kodi.pythonPackages.python.withPackages (p: with p; [ pyyaml ]); in buildKodiAddon rec { pname = "jellyfin"; namespace = "plugin.video.jellyfin"; - version = "1.0.3"; + version = "1.0.4"; src = fetchFromGitHub { owner = "jellyfin"; repo = "jellyfin-kodi"; rev = "v${version}"; - sha256 = "sha256-Uyo8GClJU2/gdk4PeFNnoyvxOhooaxeXN3Wc5YGuCiM="; + sha256 = "sha256-N5ZNGeLf3P4p3RQimSaZteddKjqXE274mWpo7W9xqPs="; }; - nativeBuildInputs = [ - python - ]; + nativeBuildInputs = [ python ]; - prePatch = '' - # ZIP does not support timestamps before 1980 - https://bugs.python.org/issue34097 - substituteInPlace build.py \ - --replace "with zipfile.ZipFile('{}/{}'.format(target, archive_name), 'w') as z:" "with zipfile.ZipFile('{}/{}'.format(target, archive_name), 'w', strict_timestamps=False) as z:" - ''; + # ZIP does not support timestamps before 1980 - https://bugs.python.org/issue34097 + patches = [ ./no-strict-zip-timestamp.patch ]; buildPhase = '' ${python}/bin/python3 build.py --version=py3 diff --git a/pkgs/applications/video/kodi/addons/jellyfin/no-strict-zip-timestamp.patch b/pkgs/applications/video/kodi/addons/jellyfin/no-strict-zip-timestamp.patch new file mode 100644 index 000000000000..07d54c1e1384 --- /dev/null +++ b/pkgs/applications/video/kodi/addons/jellyfin/no-strict-zip-timestamp.patch @@ -0,0 +1,15 @@ +diff --git a/build.py b/build.py +index 148441f3..2aa0f1ea 100755 +--- a/build.py ++++ b/build.py +@@ -69,7 +69,9 @@ def zip_files(py_version: str, source: str, target: str, dev: bool) -> None: + """ + archive_name = "plugin.video.jellyfin+{}.zip".format(py_version) + +- with zipfile.ZipFile("{}/{}".format(target, archive_name), "w") as z: ++ with zipfile.ZipFile( ++ "{}/{}".format(target, archive_name), "w", strict_timestamps=False ++ ) as z: + for root, dirs, files in os.walk(args.source): + for filename in filter(file_filter, files): + file_path = os.path.join(root, filename)