about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2024-05-11 22:48:30 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-05-13 09:09:41 +0000
commited2dcbf94ced71d275ebba94bbd406a4ee3e362e (patch)
treef40f3a702092b50eb45f42c2d9921483619fa5bc
parentc7b37b43c394f94c96eb83539f0d7f681043b634 (diff)
jellyfin-web: 10.8.13 -> 10.9.1
(cherry picked from commit a010f5e9c5018c90c53fd0b948f8115a47d3dc22)
-rw-r--r--pkgs/servers/jellyfin/web.nix57
1 files changed, 45 insertions, 12 deletions
diff --git a/pkgs/servers/jellyfin/web.nix b/pkgs/servers/jellyfin/web.nix
index b2a40c0690832..a2437af14ee41 100644
--- a/pkgs/servers/jellyfin/web.nix
+++ b/pkgs/servers/jellyfin/web.nix
@@ -1,25 +1,53 @@
-{ lib
-, fetchFromGitHub
-, stdenv
-, buildNpmPackage
-, nix-update-script
+{
+  lib,
+  stdenv,
+  overrideSDK,
+  fetchFromGitHub,
+  buildNpmPackage,
+  nix-update-script,
+  pkg-config,
+  xcbuild,
+  pango,
+  giflib,
+  darwin,
 }:
-
-buildNpmPackage rec {
+let
+  # node-canvas builds code that requires aligned_alloc,
+  # which on Darwin requires at least the 10.15 SDK
+  stdenv' =
+    if stdenv.isDarwin then
+      overrideSDK stdenv {
+        darwinMinVersion = "10.15";
+        darwinSdkVersion = "11.0";
+      }
+    else
+      stdenv;
+  buildNpmPackage' = buildNpmPackage.override { stdenv = stdenv'; };
+in
+buildNpmPackage' rec {
   pname = "jellyfin-web";
-  version = "10.8.13";
+  version = "10.9.1";
 
   src = fetchFromGitHub {
     owner = "jellyfin";
     repo = "jellyfin-web";
     rev = "v${version}";
-    hash = "sha256-2W9s8TQV9BtxNYIrCbGRh5EUw0brwxSHohnb7269pQE=";
+    hash = "sha256-KkPZ8OvGN/0gdoSVh9q0qEilae3tccgHRQQvrTsvycA=";
   };
 
-  npmDepsHash = "sha256-i077UAxY2K12VXkHYbGYZRV1uhgdGUnoDbokSk2ZDIA=";
+  npmDepsHash = "sha256-LmbygyCYSp0gtjU2pNCV17WEyEoaIzPs7H9UoMFV+PU=";
 
   npmBuildScript = [ "build:production" ];
 
+  nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
+
+  buildInputs =
+    [ pango ]
+    ++ lib.optionals stdenv.isDarwin [
+      giflib
+      darwin.apple_sdk.frameworks.CoreText
+    ];
+
   installPhase = ''
     runHook preInstall
 
@@ -29,12 +57,17 @@ buildNpmPackage rec {
     runHook postInstall
   '';
 
-  passthru.updateScript = nix-update-script {};
+  passthru.updateScript = nix-update-script { };
 
   meta = with lib; {
     description = "Web Client for Jellyfin";
     homepage = "https://jellyfin.org/";
     license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ nyanloutre minijackson purcell jojosch ];
+    maintainers = with maintainers; [
+      nyanloutre
+      minijackson
+      purcell
+      jojosch
+    ];
   };
 }