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-05 15:53:02 +00:00
|
|
|
version = "10.9.3";
|
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}";
|
|
|
|
hash = "sha256-duq2tilUDEzj7o3Nq3Ku5qVJm4XDqVmqkQQIK/dlTpE=";
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
npmDepsHash = "sha256-nKA/mR1ug1yq4+jJGhWGtAL9Zsx3KjDPqt5rkCE4LFU=";
|
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
|
|
|
};
|
|
|
|
}
|