@@ -1,61 +0,0 @@
1−{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnetCorePackages, ffmpeg,
2− fontconfig, freetype, nixosTests }:
3−
4−let
5− os = if stdenv.isDarwin then "osx" else "linux";
6− arch =
7− with stdenv.hostPlatform;
8− if isx86_32 then "x86"
9− else if isx86_64 then "x64"
10− else if isAarch32 then "arm"
11− else if isAarch64 then "arm64"
12− else lib.warn "Unsupported architecture, some image processing features might be unavailable" "unknown";
13− musl = lib.optionalString stdenv.hostPlatform.isMusl
14− (if (arch != "x64")
15− then lib.warn "Some image processing features might be unavailable for non x86-64 with Musl" "musl-"
16− else "musl-");
17− runtimeDir = "${os}-${musl}${arch}";
18−
19−in stdenv.mkDerivation rec {
20− pname = "jellyfin";
21− version = "10.5.5";
22−
23− # Impossible to build anything offline with dotnet
24− src = fetchurl {
25− url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz";
26− sha256 = "1s3hva1j5w74qc9wyqnmr5clk4smzfi7wvx8qrzrwy81mx7r5w27";
27− };
28−
29− nativeBuildInputs = [ unzip ];
30− buildInputs = [
31− makeWrapper
32− ];
33−
34− propagatedBuildInputs = [
35− dotnetCorePackages.aspnetcore_3_1
36− sqlite
37− ];
38−
39− preferLocalBuild = true;
40−
41− installPhase = ''
42− install -dm 755 "$out/opt/jellyfin"
43− cp -r * "$out/opt/jellyfin"
44− makeWrapper "${dotnetCorePackages.aspnetcore_3_1}/bin/dotnet" $out/bin/jellyfin \
45− --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
46− sqlite fontconfig freetype stdenv.cc.cc.lib
47− ]}:$out/opt/jellyfin/runtimes/${runtimeDir}/native/" \
48− --add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
49− '';
50−
51− passthru.tests = {
52− smoke-test = nixosTests.jellyfin;
53− };
54−
55− meta = with lib; {
56− description = "The Free Software Media System";
57− homepage = "https://jellyfin.org/";
58− license = licenses.gpl2;
59− maintainers = with maintainers; [ nyanloutre minijackson ];
60− };
61−}