From 23d1d19d6c879cd1bc9c92bc589f855e3a47d7f1 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 9 Dec 2025 10:55:13 +0300 Subject: [PATCH] jellyfin-media-player: 1.12.0 -> 2.0.0, build with Qt6, clean up --- .../video/jellyfin-media-player/default.nix | 91 +++++++------------ .../disable-update-notifications.patch | 13 --- .../jellyfin-media-player/fix-web-path.patch | 38 -------- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 32 insertions(+), 112 deletions(-) delete mode 100644 pkgs/applications/video/jellyfin-media-player/disable-update-notifications.patch delete mode 100644 pkgs/applications/video/jellyfin-media-player/fix-web-path.patch diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix index 771a101512d5..4927d2c563f0 100644 --- a/pkgs/applications/video/jellyfin-media-player/default.nix +++ b/pkgs/applications/video/jellyfin-media-player/default.nix @@ -1,88 +1,59 @@ { lib, fetchFromGitHub, - fetchpatch, - mkDerivation, stdenv, - SDL2, cmake, - libGL, - libX11, - libXrandr, - libvdpau, - mpv, ninja, - pkg-config, - python3, + wrapQtAppsHook, qtbase, - qtwayland, + qtdeclarative, qtwebchannel, qtwebengine, - qtx11extras, - jellyfin-web, - withDbus ? stdenv.hostPlatform.isLinux, + mpvqt, + libcec, + SDL2, + libXrandr, }: - -mkDerivation rec { +stdenv.mkDerivation rec { pname = "jellyfin-media-player"; - version = "1.12.0"; + version = "2.0.0"; src = fetchFromGitHub { owner = "jellyfin"; repo = "jellyfin-media-player"; rev = "v${version}"; - sha256 = "sha256-IXinyenadnW+a+anQ9e61h+N8vG2r77JPboHm5dN4Iw="; + hash = "sha256-tdjmOeuC3LFEIDSH8X9LG/myvE1FoxwR1zpDQRyaTkQ="; }; - patches = [ - # fix the location of the jellyfin-web path - ./fix-web-path.patch - # disable update notifications since the end user can't simply download the release artifacts to update - ./disable-update-notifications.patch - - # cmake 4 compatibility - (fetchpatch { - url = "https://github.com/jellyfin/jellyfin-media-player/commit/6c5c603a1db489872832ed560581d98fdee89d6f.patch"; - hash = "sha256-Blq7y7kOygbZ6uKxPJl9aDXJWqhE0jnM5GNEAwyQEA0="; - }) - ]; - - buildInputs = [ - SDL2 - libGL - libX11 - libXrandr - libvdpau - mpv - qtbase - qtwebchannel - qtwebengine - qtx11extras - ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ - qtwayland - ]; - nativeBuildInputs = [ cmake ninja - pkg-config - python3 + wrapQtAppsHook + ]; + + buildInputs = [ + qtbase + qtdeclarative + qtwebchannel + qtwebengine + + mpvqt + + # input sources + libcec + SDL2 + + # frame rate switching + libXrandr ]; cmakeFlags = [ - "-DQTROOT=${qtbase}" - "-GNinja" - ] - ++ lib.optionals (!withDbus) [ - "-DLINUX_X11POWER=ON" + "-DCHECK_FOR_UPDATES=OFF" + "-DUSE_STATIC_MPVQT=OFF" + # workaround for Qt cmake weirdness + "-DQT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES=ON" ]; - preConfigure = '' - # link the jellyfin-web files to be copied by cmake (see fix-web-path.patch) - ln -s ${jellyfin-web}/share/jellyfin-web . - ''; - postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin $out/Applications mv "$out/Jellyfin Media Player.app" $out/Applications @@ -91,7 +62,7 @@ mkDerivation rec { meta = { homepage = "https://github.com/jellyfin/jellyfin-media-player"; - description = "Jellyfin Desktop Client based on Plex Media Player"; + description = "Jellyfin Desktop Client"; license = with lib.licenses; [ gpl2Only mit diff --git a/pkgs/applications/video/jellyfin-media-player/disable-update-notifications.patch b/pkgs/applications/video/jellyfin-media-player/disable-update-notifications.patch deleted file mode 100644 index 82978b65c677..000000000000 --- a/pkgs/applications/video/jellyfin-media-player/disable-update-notifications.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/resources/settings/settings_description.json b/resources/settings/settings_description.json -index 3329d0d..ccd5718 100644 ---- a/resources/settings/settings_description.json -+++ b/resources/settings/settings_description.json -@@ -127,7 +127,7 @@ - "value": "checkForUpdates", - "display_name": "Check For Updates", - "help": "Allows user to disable update check plugin script.", -- "default": true -+ "default": false - }, - { - "value": "enableInputRepeat", diff --git a/pkgs/applications/video/jellyfin-media-player/fix-web-path.patch b/pkgs/applications/video/jellyfin-media-player/fix-web-path.patch deleted file mode 100644 index 3f182fd407ef..000000000000 --- a/pkgs/applications/video/jellyfin-media-player/fix-web-path.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 9df49da..be1c479 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -106,7 +106,8 @@ endif() - set(RESOURCE_ROOT .) - if(APPLE) - set(RESOURCE_ROOT Resources) -- add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_SOURCE_DIR}/native/ DEST ${RESOURCE_ROOT}/web-client/extension) -+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../jellyfin-web/ DESTINATION ${RESOURCE_ROOT}/web-client/desktop) -+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/native/ DESTINATION ${RESOURCE_ROOT}/web-client/extension) - endif() - - if(NOT APPLE) -@@ -119,6 +120,7 @@ if(NOT APPLE) - install(FILES ${loc}/qtwebengine_devtools_resources.pak DESTINATION resources) - endif() - endforeach() -+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../jellyfin-web/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/desktop) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/native/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/extension) - endif() - -diff --git a/src/settings/SettingsComponent.cpp b/src/settings/SettingsComponent.cpp -index c398523..7023948 100644 ---- a/src/settings/SettingsComponent.cpp -+++ b/src/settings/SettingsComponent.cpp -@@ -748,7 +748,7 @@ QString SettingsComponent::getWebClientUrl(bool desktop) - - if (url == "bundled") - { -- auto path = Paths::webExtensionPath() + "find-webclient.html"; -+ auto path = Paths::webClientPath("desktop"); - - url = "file:///" + path; - } --- -2.36.0 - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index addbfcaa78f9..56b684baa014 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2046,7 +2046,7 @@ with pkgs; intensity-normalization = with python3Packages; toPythonApplication intensity-normalization; - jellyfin-media-player = libsForQt5.callPackage ../applications/video/jellyfin-media-player { }; + jellyfin-media-player = kdePackages.callPackage ../applications/video/jellyfin-media-player { }; jellyfin-mpv-shim = python3Packages.callPackage ../applications/video/jellyfin-mpv-shim { };