about summary refs log tree commit diff
path: root/pkgs/applications/video/jellyfin-media-player
diff options
context:
space:
mode:
authorJohannes Schleifenbaum <johannes@js-webcoding.de>2023-03-13 11:29:09 +0100
committerJohannes Schleifenbaum <johannes@js-webcoding.de>2023-03-13 11:41:13 +0100
commit84e212d2f2a37ec7861c4d53b93f6a31c07e737b (patch)
treebc5ff94e3932410485845788b1cae991b2fe3fa5 /pkgs/applications/video/jellyfin-media-player
parent0a0b081e0932bed9b38a142fa4a85dd4b6ebcb42 (diff)
jellyfin-media-player: 1.8.1 -> 1.9.0
Diffstat (limited to 'pkgs/applications/video/jellyfin-media-player')
-rw-r--r--pkgs/applications/video/jellyfin-media-player/default.nix14
-rw-r--r--pkgs/applications/video/jellyfin-media-player/fix-osx-resources.patch15
-rw-r--r--pkgs/applications/video/jellyfin-media-player/fix-web-path.patch28
3 files changed, 35 insertions, 22 deletions
diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix
index d6379550e884f..c9cea8cb81c67 100644
--- a/pkgs/applications/video/jellyfin-media-player/default.nix
+++ b/pkgs/applications/video/jellyfin-media-player/default.nix
@@ -28,18 +28,18 @@
 
 mkDerivation rec {
   pname = "jellyfin-media-player";
-  version = "1.8.1";
+  version = "1.9.0";
 
   src = fetchFromGitHub {
     owner = "jellyfin";
     repo = "jellyfin-media-player";
     rev = "v${version}";
-    sha256 = "sha256-/FqxZd0cFSfkeBQmZ2gU+5FUZZ+WbQ8c2IjaZ4/uGt8=";
+    sha256 = "sha256-PfzBxvGroHgjEz4OchnECSfcb1Ds8xbE28yxneaiPuo=";
   };
 
   patches = [
-    # the webclient-files are not copied in the regular build script. Copy them just like the linux build
-    ./fix-osx-resources.patch
+    # 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
   ];
@@ -79,9 +79,9 @@ mkDerivation rec {
     "-DLINUX_X11POWER=ON"
   ];
 
-  preBuild = ''
-    # link the jellyfin-web files to the expected "dist" directory
-    ln -s ${jellyfin-web}/share/jellyfin-web dist
+  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.isDarwin ''
diff --git a/pkgs/applications/video/jellyfin-media-player/fix-osx-resources.patch b/pkgs/applications/video/jellyfin-media-player/fix-osx-resources.patch
deleted file mode 100644
index 5c562295b40ea..0000000000000
--- a/pkgs/applications/video/jellyfin-media-player/fix-osx-resources.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 780c0d3..d9c2341 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -108,8 +108,8 @@ endif()
- set(RESOURCE_ROOT .)
- if(APPLE)
-   set(RESOURCE_ROOT Resources)
--  add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DEST ${RESOURCE_ROOT}/web-client/desktop)
--  add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_SOURCE_DIR}/native/ DEST ${RESOURCE_ROOT}/web-client/extension)
-+  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DESTINATION ${RESOURCE_ROOT}/web-client/desktop)
-+  install(DIRECTORY ${CMAKE_SOURCE_DIR}/native/ DESTINATION ${RESOURCE_ROOT}/web-client/extension)
- endif()
- 
- if(NOT APPLE)
diff --git a/pkgs/applications/video/jellyfin-media-player/fix-web-path.patch b/pkgs/applications/video/jellyfin-media-player/fix-web-path.patch
new file mode 100644
index 0000000000000..250a5c0695450
--- /dev/null
+++ b/pkgs/applications/video/jellyfin-media-player/fix-web-path.patch
@@ -0,0 +1,28 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 5abca9b..d09176b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -107,10 +107,8 @@ endif()
+ set(RESOURCE_ROOT .)
+ if(APPLE)
+   set(RESOURCE_ROOT Resources)
+-  if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/../dist/)
+-    add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DEST ${RESOURCE_ROOT}/web-client/desktop)
+-  endif()
+-  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)
+@@ -123,9 +121,7 @@ if(NOT APPLE)
+       install(FILES ${loc}/qtwebengine_devtools_resources.pak DESTINATION resources)
+     endif()
+   endforeach()
+-  if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/../dist/)
+-    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../dist/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/desktop)
+-  endif()
++  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()
+