blob: 8d9dd0f657dc8b7e80a89631f71baae849103d4e (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{
lib,
stdenv,
fetchFromGitHub,
buildNpmPackage,
nodejs_20,
nix-update-script,
pkg-config,
xcbuild,
pango,
giflib,
jellyfin,
}:
buildNpmPackage rec {
pname = "jellyfin-web";
version = "10.10.6";
src =
assert version == jellyfin.version;
fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin-web";
rev = "v${version}";
hash = "sha256-A6Y4tAJtocfRZ8R8Sio1RhgIDfvRG4Mk2JMhz2QZNwo=";
};
nodejs = nodejs_20; # does not build with 22
postPatch = ''
substituteInPlace webpack.common.js \
--replace-fail "git describe --always --dirty" "echo ${src.rev}" \
'';
npmDepsHash = "sha256-ggRbZ7vjFe4KG+amcLEcjiZMtUc0JwSZoiKE9qwy0y4=";
preBuild = ''
# using sass-embedded fails at executing node_modules/sass-embedded-linux-x64/dart-sass/src/dart
rm -r node_modules/sass-embedded*
'';
npmBuildScript = [ "build:production" ];
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ];
buildInputs =
[ pango ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
giflib
];
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
];
};
}
|