bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
76 lines
1.6 KiB
Nix
76 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
overrideSDK,
|
|
fetchFromGitHub,
|
|
buildNpmPackage,
|
|
jellyfin,
|
|
nix-update-script,
|
|
pkg-config,
|
|
xcbuild,
|
|
pango,
|
|
giflib,
|
|
darwin,
|
|
}:
|
|
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.9.6";
|
|
|
|
src =
|
|
assert version == jellyfin.version;
|
|
fetchFromGitHub {
|
|
owner = "jellyfin";
|
|
repo = "jellyfin-web";
|
|
rev = "v${version}";
|
|
hash = "sha256-cKMKcT2roah35Pv36KJqYIhwoYXaT1yYfvOsxbt+EfE=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-9uAFWlbzDzd8f8G/v/eLWJ3Is4aO5mqEd4o/YZXDkTQ=";
|
|
|
|
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
|
|
|
|
mkdir -p $out/share
|
|
cp -a dist $out/share/jellyfin-web
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
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
|
|
];
|
|
};
|
|
}
|