Unverified Commit fe4e0899 authored by Minijackson's avatar Minijackson
Browse files

kodiPackages.jellyfin: 1.0.3 -> 1.0.4

fixes missing distutils module
parent cd67b3c0
Loading
Loading
Loading
Loading
+18 −11
Original line number Diff line number Diff line
{ 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:"
  '';
  patches = [ ./no-strict-zip-timestamp.patch ];

  buildPhase = ''
    ${python}/bin/python3 build.py --version=py3
+15 −0
Original line number Diff line number Diff line
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)