nixpkgs/pkgs/by-name/je/jellyfin-web/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.6 KiB
Nix
Raw Normal View History

2024-05-11 20:48:30 +00:00
{
lib,
stdenv,
fetchFromGitHub,
buildNpmPackage,
nix-update-script,
pkg-config,
xcbuild,
pango,
giflib,
2024-11-01 16:54:41 +00:00
apple-sdk_11,
darwinMinVersionHook,
2021-04-24 11:43:32 +00:00
}:
2024-11-01 16:54:41 +00:00
buildNpmPackage rec {
2021-04-24 11:43:32 +00:00
pname = "jellyfin-web";
2024-11-04 15:10:17 +00:00
version = "10.10.1";
2021-04-24 11:43:32 +00:00
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin-web";
rev = "v${version}";
2024-11-04 15:10:17 +00:00
hash = "sha256-+f+chR00eDCVZvAGNDB61c0htsVvqFK62oZorW3Qdsg=";
};
postPatch = ''
substituteInPlace webpack.common.js \
--replace-fail "git describe --always --dirty" "echo ${src.rev}" \
'';
2021-04-24 11:43:32 +00:00
2024-11-04 15:10:17 +00:00
npmDepsHash = "sha256-kL57KmBHmBwJEhsUciPaj826qdoSQxZXxtFNGkddGZk=";
preBuild = ''
# using sass-embedded fails at executing node_modules/sass-embedded-linux-x64/dart-sass/src/dart
rm -r node_modules/sass-embedded*
'';
2021-04-24 11:43:32 +00:00
2023-05-07 08:40:00 +00:00
npmBuildScript = [ "build:production" ];
2021-04-24 11:43:32 +00:00
2024-05-11 20:48:30 +00:00
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ];
buildInputs =
[ pango ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
giflib
2024-11-01 16:54:41 +00:00
apple-sdk_11
# node-canvas builds code that requires aligned_alloc,
# which on Darwin requires at least the 10.15 SDK
(darwinMinVersionHook "10.15")
2024-05-11 20:48:30 +00:00
];
2021-04-24 11:43:32 +00:00
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -a dist $out/share/jellyfin-web
runHook postInstall
'';
2024-05-11 20:48:30 +00:00
passthru.updateScript = nix-update-script { };
2021-04-24 11:43:32 +00:00
meta = with lib; {
description = "Web Client for Jellyfin";
homepage = "https://jellyfin.org/";
license = licenses.gpl2Plus;
2024-05-11 20:48:30 +00:00
maintainers = with maintainers; [
nyanloutre
minijackson
purcell
jojosch
];
2021-04-24 11:43:32 +00:00
};
}