git.iko.soy/typeable/nixpkgs
on master help sign in
jellyfin: add bundled libraries to LD_LIBRARY_PATH
commit5251cbb05126a42c6fe480f0428ec87a9f4c82b9 authorMinijackson <minijackson@riseup.net> dateSat 18 May 2019, 12:11 (8 years ago) parentc0a0dc1
1 file changed+21−5
pkgs/servers/jellyfin/default.nix+21−5
pkgs/servers/jellyfin/default.nix+21−5
@@ -1,6 +1,22 @@
1−{ stdenv, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg }:
2−
3−stdenv.mkDerivation rec {
1+{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg,
2+ fontconfig, freetype }:
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 {
420 pname = "jellyfin";
521 version = "10.3.2";
622
@@ -28,8 +44,8 @@ stdenv.mkDerivation rec {
2844
2945 makeWrapper "${dotnet-sdk}/bin/dotnet" $out/bin/jellyfin \
3046 --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
31− sqlite
32− ]}" \
47+ sqlite fontconfig freetype stdenv.cc.cc.lib
48+ ]}:$out/opt/jellyfin/runtimes/${runtimeDir}/native/" \
3349 --add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
3450 '';
3551