diff options
Diffstat (limited to 'pkgs/applications/video/kodi')
17 files changed, 107 insertions, 54 deletions
diff --git a/pkgs/applications/video/kodi/addons/future/default.nix b/pkgs/applications/video/kodi/addons/future/default.nix index 91b7d3996c577..c96f28ab9037d 100644 --- a/pkgs/applications/video/kodi/addons/future/default.nix +++ b/pkgs/applications/video/kodi/addons/future/default.nix @@ -3,11 +3,11 @@ buildKodiAddon rec { pname = "future"; namespace = "script.module.future"; - version = "0.18.3+matrix.1"; + version = "1.0.0+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/${lib.toLower rel}/${namespace}/${namespace}-${version}.zip"; - sha256 = "sha256-jKO2Qxi54z6UiCmMkxU+2pog40K2yb8/KYbNPFYuSsQ="; + sha256 = "sha256-BsDgCAZuJBRBpe6EmfSynhrXS3ktQRZsEwf9CdF0VCg="; }; passthru = { diff --git a/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix b/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix index 13b2738fdff99..deca0d57d7c51 100644 --- a/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix +++ b/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix @@ -1,4 +1,4 @@ -{ lib, rel, buildKodiAddon, fetchzip, addonUpdateScript }: +{ lib, rel, buildKodiAddon, fetchzip, fetchpatch, addonUpdateScript }: buildKodiAddon rec { pname = "inputstreamhelper"; namespace = "script.module.inputstreamhelper"; @@ -9,6 +9,13 @@ buildKodiAddon rec { sha256 = "sha256-v5fRikswmP+KVbxYibD0NbCK8leUnFbya5EtF1FmS0I="; }; + patches = [ + (fetchpatch { + url = "https://github.com/emilsvennesson/script.module.inputstreamhelper/commit/af6adc16a0bee4921a827946b004ee070406ae37.patch"; + hash = "sha256-901EyVeZUb0EMvxsEza95qFjTOZ7PDYyqHMRawPM5Zs="; + }) + ]; + passthru = { pythonPath = "lib"; updateScript = addonUpdateScript { diff --git a/pkgs/applications/video/kodi/addons/jellycon/default.nix b/pkgs/applications/video/kodi/addons/jellycon/default.nix index d618e58cee371..960a8603e3612 100644 --- a/pkgs/applications/video/kodi/addons/jellycon/default.nix +++ b/pkgs/applications/video/kodi/addons/jellycon/default.nix @@ -29,7 +29,7 @@ buildKodiAddon rec { ''; postInstall = '' - mv /build/source/addon.xml $out${addonDir}/${namespace}/ + cp -v addon.xml $out${addonDir}/$namespace/ ''; propagatedBuildInputs = [ diff --git a/pkgs/applications/video/kodi/addons/jellyfin/default.nix b/pkgs/applications/video/kodi/addons/jellyfin/default.nix index 93217122d53bf..27faf3d677579 100644 --- a/pkgs/applications/video/kodi/addons/jellyfin/default.nix +++ b/pkgs/applications/video/kodi/addons/jellyfin/default.nix @@ -1,35 +1,42 @@ -{ 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.5"; src = fetchFromGitHub { owner = "jellyfin"; repo = "jellyfin-kodi"; rev = "v${version}"; - sha256 = "sha256-Uyo8GClJU2/gdk4PeFNnoyvxOhooaxeXN3Wc5YGuCiM="; + sha256 = "sha256-MPRyMeJuuiG62ahNKfXyb3Q4LDm0yXkNgCeYxfpT1io="; }; - 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 ''; postInstall = '' - mv /build/source/addon.xml $out${addonDir}/${namespace}/ + cp -v addon.xml $out${addonDir}/$namespace/ ''; propagatedBuildInputs = [ 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 0000000000000..07d54c1e13841 --- /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) diff --git a/pkgs/applications/video/kodi/addons/orftvthek/default.nix b/pkgs/applications/video/kodi/addons/orftvthek/default.nix index 416cb9a30a6be..64b822c355107 100644 --- a/pkgs/applications/video/kodi/addons/orftvthek/default.nix +++ b/pkgs/applications/video/kodi/addons/orftvthek/default.nix @@ -1,27 +1,27 @@ -{ lib, buildKodiAddon, fetchFromGitHub, future, kodi-six, simplejson, inputstreamhelper }: +{ lib, buildKodiAddon, fetchFromGitHub, inputstream-adaptive, inputstreamhelper, routing }: buildKodiAddon rec { pname = "orftvthek"; namespace = "plugin.video.orftvthek"; - version = "0.12.12"; + version = "1.0.2+matrix.1"; src = fetchFromGitHub { owner = "s0faking"; repo = namespace; rev = version; - sha256 = "sha256-4VLr4DFxioCrlq5JtiPyd7E4a+++cWgxCnRb3KPppWE="; + sha256 = "sha256-bCVsR7lH0REJmG3OKU8mRRvw/PhSrLfhufmVBmw05+k="; }; propagatedBuildInputs = [ - future - kodi-six - simplejson + # Needed for content decryption with Widevine. + inputstream-adaptive inputstreamhelper + routing ]; meta = with lib; { homepage = "https://github.com/s0faking/plugin.video.orftvthek"; - description = "Addon that gives you access to the ORF TVthek Video Platform"; + description = "Addon for accessing the Austrian ORF ON streaming service"; license = licenses.gpl2Only; maintainers = teams.kodi.members; }; diff --git a/pkgs/applications/video/kodi/addons/osmc-skin/default.nix b/pkgs/applications/video/kodi/addons/osmc-skin/default.nix index 2cf5f8784dc1f..7644a71d71bc9 100644 --- a/pkgs/applications/video/kodi/addons/osmc-skin/default.nix +++ b/pkgs/applications/video/kodi/addons/osmc-skin/default.nix @@ -15,7 +15,7 @@ buildKodiAddon rec { homepage = "https://github.com/osmc/skin.osmc"; description = "Default skin for OSMC"; platforms = platforms.all; - maintainers = with maintainers; [ ]; + maintainers = [ ]; license = licenses.cc-by-nc-sa-30; broken = true; # no release for kodi 21 diff --git a/pkgs/applications/video/kodi/addons/pdfreader/default.nix b/pkgs/applications/video/kodi/addons/pdfreader/default.nix index c2c11e92213f4..60a08a9cfbeae 100644 --- a/pkgs/applications/video/kodi/addons/pdfreader/default.nix +++ b/pkgs/applications/video/kodi/addons/pdfreader/default.nix @@ -2,13 +2,13 @@ buildKodiAddon rec { pname = "pdfreader"; namespace = "plugin.image.pdf"; - version = "2.0.2"; + version = "2.0.3"; src = fetchFromGitHub { owner = "i96751414"; repo = "plugin.image.pdfreader"; rev = "v${version}"; - sha256 = "0nkqhlm1gyagq6xpdgqvd5qxyr2ngpml9smdmzfabc8b972mwjml"; + sha256 = "sha256-J93poR5VO9fAgNCEGftJVYnpXOsJSxnhHI6TAJZ2LeI="; }; passthru.pythonPath = "lib/api"; diff --git a/pkgs/applications/video/kodi/addons/pvr-hts/default.nix b/pkgs/applications/video/kodi/addons/pvr-hts/default.nix index 9b20235e8ea17..50e12c09c1c8b 100644 --- a/pkgs/applications/video/kodi/addons/pvr-hts/default.nix +++ b/pkgs/applications/video/kodi/addons/pvr-hts/default.nix @@ -2,13 +2,13 @@ buildKodiBinaryAddon rec { pname = "pvr-hts"; namespace = "pvr.hts"; - version = "21.2.3"; + version = "21.2.5"; src = fetchFromGitHub { owner = "kodi-pvr"; repo = "pvr.hts"; rev = "${version}-${rel}"; - sha256 = "sha256-4jHcUjGarLHsn5CjBLWB1wQNjBBw4ftMuDY5uFAHAzY="; + sha256 = "sha256-BG5mGD674gvjUSdydu4g3F/4GH53gkJoKMDuvaFNi6k="; }; meta = with lib; { diff --git a/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix b/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix index 59f39a06fd71e..b976c15371f2f 100644 --- a/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix +++ b/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix @@ -6,13 +6,13 @@ buildKodiBinaryAddon rec { pname = "pvr-iptvsimple"; namespace = "pvr.iptvsimple"; - version = "21.8.4"; + version = "21.8.5"; src = fetchFromGitHub { owner = "kodi-pvr"; repo = "pvr.iptvsimple"; rev = "${version}-${rel}"; - sha256 = "sha256-uuqk1kJnioCaRWIkC5liPSVRQPpviuaE+wmE4rq6fJw="; + sha256 = "sha256-UFEZZr7Z6GqnN8ZSA+JkdsiAlf7p5xPwDOcwLzJc9v8="; }; extraBuildInputs = [ diff --git a/pkgs/applications/video/kodi/addons/pvr-vdr-vnsi/default.nix b/pkgs/applications/video/kodi/addons/pvr-vdr-vnsi/default.nix index 9fdbee949d8fd..85729e1290435 100644 --- a/pkgs/applications/video/kodi/addons/pvr-vdr-vnsi/default.nix +++ b/pkgs/applications/video/kodi/addons/pvr-vdr-vnsi/default.nix @@ -2,13 +2,13 @@ buildKodiBinaryAddon rec { pname = "pvr-vdr-vnsi"; namespace = "pvr.vdr.vnsi"; - version = "21.1.1"; + version = "21.1.2"; src = fetchFromGitHub { owner = "kodi-pvr"; repo = "pvr.vdr.vnsi"; rev = "${version}-${rel}"; - sha256 = "sha256-Bd/21y3oAhQMmvrZzrN5Z6jLHySBd2LXNbLt/Me4jSw="; + sha256 = "sha256-o7WVO/TvSK6bZEnUeNQhapXOVQbDlpJDObC93/9XpJo="; }; extraBuildInputs = [ libGL ]; diff --git a/pkgs/applications/video/kodi/addons/sendtokodi/default.nix b/pkgs/applications/video/kodi/addons/sendtokodi/default.nix index f6946842ded41..792f585673dd0 100644 --- a/pkgs/applications/video/kodi/addons/sendtokodi/default.nix +++ b/pkgs/applications/video/kodi/addons/sendtokodi/default.nix @@ -1,4 +1,4 @@ -{ lib, buildKodiAddon, fetchFromGitHub, addonUpdateScript, kodi, inputstreamhelper }: +{ lib, buildKodiAddon, fetchFromGitHub, kodi, inputstreamhelper }: buildKodiAddon rec { pname = "sendtokodi"; @@ -13,7 +13,10 @@ buildKodiAddon rec { }; patches = [ - ./use-packaged-deps.patch + # Unconditionally depend on packaged yt-dlp. This removes the ability to + # use youtube_dl, which is unmaintained and considered vulnerable (see + # CVE-2024-38519). + ./use-packaged-yt-dlp.patch ]; propagatedBuildInputs = [ @@ -26,14 +29,14 @@ buildKodiAddon rec { ''; passthru = { - # Instead of the vendored libraries, we propagate youtube-dl and yt-dlp via - # the Python path. - pythonPath = with kodi.pythonPackages; makePythonPath [ youtube-dl yt-dlp ]; + # Instead of the vendored libraries, we propagate yt-dlp via the Python + # path. + pythonPath = with kodi.pythonPackages; makePythonPath [ yt-dlp ]; }; meta = with lib; { homepage = "https://github.com/firsttris/plugin.video.sendtokodi"; - description = "Plays various stream sites on Kodi using youtube-dl"; + description = "Plays various stream sites on Kodi using yt-dlp"; license = licenses.mit; maintainers = teams.kodi.members ++ [ maintainers.pks ]; }; diff --git a/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-deps.patch b/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-yt-dlp.patch index abfea58a7ceb8..b53e1a434fffc 100644 --- a/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-deps.patch +++ b/pkgs/applications/video/kodi/addons/sendtokodi/use-packaged-yt-dlp.patch @@ -1,16 +1,18 @@ diff --git a/service.py b/service.py -index 1d7b6e4..9782993 100644 +index 024ad9a..6ef71dd 100644 --- a/service.py +++ b/service.py -@@ -241,9 +241,9 @@ def playlistIndex(url, playlist): +@@ -243,11 +243,8 @@ def playlistIndex(url, playlist): + # Use the chosen resolver while forcing to use youtube_dl on legacy python 2 systems (dlp is python 3.6+) - if xbmcplugin.getSetting(int(sys.argv[1]),"resolver") == "0" or sys.version_info[0] == 2: +-if xbmcplugin.getSetting(int(sys.argv[1]),"resolver") == "0" or sys.version_info[0] == 2: - from lib.youtube_dl import YoutubeDL -+ from youtube_dl import YoutubeDL - else: +-else: - from lib.yt_dlp import YoutubeDL -+ from yt_dlp import YoutubeDL - +- ++from yt_dlp import YoutubeDL ++ # patch broken strptime (see above) patch_strptime() + diff --git a/pkgs/applications/video/kodi/addons/websocket/default.nix b/pkgs/applications/video/kodi/addons/websocket/default.nix index 40667e71392bb..544f86a8bbbd9 100644 --- a/pkgs/applications/video/kodi/addons/websocket/default.nix +++ b/pkgs/applications/video/kodi/addons/websocket/default.nix @@ -1,4 +1,4 @@ -{ lib, rel, buildKodiAddon, fetchzip, addonUpdateScript, six, addonDir }: +{ lib, rel, buildKodiAddon, fetchzip, addonUpdateScript, six }: buildKodiAddon rec { pname = "websocket"; diff --git a/pkgs/applications/video/kodi/addons/youtube/default.nix b/pkgs/applications/video/kodi/addons/youtube/default.nix index efeff6350cdd1..8c007ec4b83ef 100644 --- a/pkgs/applications/video/kodi/addons/youtube/default.nix +++ b/pkgs/applications/video/kodi/addons/youtube/default.nix @@ -3,13 +3,13 @@ buildKodiAddon rec { pname = "youtube"; namespace = "plugin.video.youtube"; - version = "7.0.7"; + version = "7.0.9.2"; src = fetchFromGitHub { owner = "anxdpanic"; repo = "plugin.video.youtube"; rev = "v${version}"; - hash = "sha256-i21BCkW4WpnQY1j9Wyn3/26GaAjWNXDb+lOVpmXlNKM="; + hash = "sha256-42BBvXIrPAAhNgrGyPTK5dgg2DACPTT6/jRUoYcihFA="; }; propagatedBuildInputs = [ diff --git a/pkgs/applications/video/kodi/no-python-lib.patch b/pkgs/applications/video/kodi/no-python-lib.patch new file mode 100644 index 0000000000000..d45e02dd18461 --- /dev/null +++ b/pkgs/applications/video/kodi/no-python-lib.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake +index 9c45c91774..763d6acab4 100644 +--- a/cmake/scripts/linux/Install.cmake ++++ b/cmake/scripts/linux/Install.cmake +@@ -199,8 +199,6 @@ install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cm + + if(ENABLE_EVENTCLIENTS) + find_package(PythonInterpreter REQUIRED) +- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix=''))" +- OUTPUT_VARIABLE PYTHON_LIB_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + # Install kodi-eventclients-common BT python files + install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/bt.py diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix index e8e5b5844f1f4..374837b01b38c 100644 --- a/pkgs/applications/video/kodi/unwrapped.nix +++ b/pkgs/applications/video/kodi/unwrapped.nix @@ -4,7 +4,7 @@ , libxcrypt, libgcrypt, libgpg-error, libunistring , boost, avahi, lame , gettext, pcre-cpp, yajl, fribidi, which -, openssl, gperf, tinyxml2, tinyxml-2, taglib, libssh, swig, jre_headless +, openssl, gperf, tinyxml2, tinyxml-2, taglib, libssh, jre_headless , gtest, ncurses, spdlog , libxml2, systemd , alsa-lib, libGLU, libGL, ffmpeg, fontconfig, freetype, ftgl @@ -13,7 +13,7 @@ , libogg, libvorbis, flac, libxslt , lzo, libcdio, libmodplug, libass, libbluray, libudfread , sqlite, libmysqlclient, nasm, gnutls, libva, libdrm -, curl, bzip2, zip, unzip, glxinfo +, curl, bzip2, zip, unzip, mesa-demos , libcec, libcec_platform, dcadec, libuuid , libcrossguid, libmicrohttpd , bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn2, libpthreadstubs, libtasn1 @@ -87,16 +87,20 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "kodi"; - version = "21.0"; + version = "21.1"; kodiReleaseName = "Omega"; src = fetchFromGitHub { owner = "xbmc"; repo = "xbmc"; rev = "${finalAttrs.version}-${finalAttrs.kodiReleaseName}"; - hash = "sha256-xrFWqgwTkurEwt3/+/e4SCM6Uk9nxuW62SrCFWWqZO0="; + hash = "sha256-NjId1T1cw9dl0Fx1QDsijiN1VUpuQ/EFl1kxWSESCR4="; }; + patches = [ + ./no-python-lib.patch + ]; + # make derivations declared in the let binding available here, so # they can be overridden inherit libdvdcss libdvdnav libdvdread groovy @@ -115,7 +119,7 @@ in stdenv.mkDerivation (finalAttrs: { libogg libvorbis flac libxslt systemd lzo libcdio libmodplug libass libbluray libudfread sqlite libmysqlclient avahi lame - curl bzip2 zip unzip glxinfo + curl bzip2 zip unzip mesa-demos libcec libcec_platform dcadec libuuid libxcrypt libgcrypt libgpg-error libunistring libcrossguid libplist @@ -189,6 +193,7 @@ in stdenv.mkDerivation (finalAttrs: { "-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig" "-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc" "-DPYTHON_EXECUTABLE=${buildPackages.python3Packages.python}/bin/python" + "-DPYTHON_LIB_PATH=${python3Packages.python.sitePackages}" # When wrapped KODI_HOME will likely contain symlinks to static assets # that Kodi's built in webserver will cautiously refuse to serve up # (because their realpaths are outside of KODI_HOME and the other @@ -224,7 +229,7 @@ in stdenv.mkDerivation (finalAttrs: { # TODO: figure out which binaries should be wrapped this way and which shouldn't for p in $(ls --ignore=kodi-send $out/bin/) ; do wrapProgram $out/bin/$p \ - --prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python glxinfo ] + --prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python mesa-demos ] ++ lib.optional x11Support xdpyinfo ++ lib.optional sambaSupport samba)}" \ --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath ([ curl systemd libmad libcec libcec_platform libass ] @@ -256,5 +261,6 @@ in stdenv.mkDerivation (finalAttrs: { license = licenses.gpl2Plus; platforms = platforms.linux; maintainers = teams.kodi.members; + mainProgram = "kodi"; }; }) |