2021-06-28 23:13:55 +00:00
|
|
|
{ lib, addonDir, buildKodiAddon, fetchFromGitHub, kodi, requests, dateutil, six, kodi-six, signals, websocket }:
|
2021-03-23 19:22:30 +00:00
|
|
|
let
|
|
|
|
python = kodi.pythonPackages.python.withPackages (p: with p; [ pyyaml ]);
|
|
|
|
in
|
|
|
|
buildKodiAddon rec {
|
|
|
|
pname = "jellyfin";
|
|
|
|
namespace = "plugin.video.jellyfin";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.7.4";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jellyfin";
|
|
|
|
repo = "jellyfin-kodi";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "1ykgz1l2gmpdlsp3fbm31q8757879i9dd13svslqykvxadg69x03";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python
|
|
|
|
];
|
|
|
|
|
|
|
|
prePatch = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
# 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:"
|
2021-03-23 19:22:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
${python}/bin/python3 build.py --version=py3
|
2021-03-23 19:22:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv /build/source/addon.xml $out${addonDir}/${namespace}/
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
dateutil
|
|
|
|
six
|
|
|
|
kodi-six
|
|
|
|
signals
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://jellyfin.org/";
|
|
|
|
description = "A whole new way to manage and view your media library";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = teams.kodi.members;
|
|
|
|
};
|
|
|
|
}
|