2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
overrideSDK,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildNpmPackage,
|
2024-06-05 15:53:02 +00:00
|
|
|
jellyfin,
|
2024-05-15 15:35:15 +00:00
|
|
|
nix-update-script,
|
|
|
|
pkg-config,
|
|
|
|
xcbuild,
|
|
|
|
pango,
|
|
|
|
giflib,
|
|
|
|
darwin,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2024-05-15 15:35:15 +00:00
|
|
|
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 {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "jellyfin-web";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "10.9.6";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src =
|
|
|
|
assert version == jellyfin.version;
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "jellyfin";
|
|
|
|
repo = "jellyfin-web";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-cKMKcT2roah35Pv36KJqYIhwoYXaT1yYfvOsxbt+EfE=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
npmDepsHash = "sha256-9uAFWlbzDzd8f8G/v/eLWJ3Is4aO5mqEd4o/YZXDkTQ=";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
npmBuildScript = [ "build:production" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ pango ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
giflib
|
|
|
|
darwin.apple_sdk.frameworks.CoreText
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -a dist $out/share/jellyfin-web
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Web Client for Jellyfin";
|
|
|
|
homepage = "https://jellyfin.org/";
|
|
|
|
license = licenses.gpl2Plus;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
nyanloutre
|
|
|
|
minijackson
|
|
|
|
purcell
|
|
|
|
jojosch
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|