diff options
author | Minijackson <minijackson@riseup.net> | 2019-05-18 12:11:19 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2019-05-18 12:15:38 +0200 |
commit | 5251cbb05126a42c6fe480f0428ec87a9f4c82b9 (patch) | |
tree | 9f496447284d1bf823c38695e4a6475bd9e58e18 /pkgs/servers | |
parent | c0a0dc19ce8259aacd0f4559f38ff829f689aeaa (diff) |
jellyfin: add bundled libraries to LD_LIBRARY_PATH
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/jellyfin/default.nix | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/pkgs/servers/jellyfin/default.nix b/pkgs/servers/jellyfin/default.nix index d41c94eee562..649fdb4f9367 100644 --- a/pkgs/servers/jellyfin/default.nix +++ b/pkgs/servers/jellyfin/default.nix @@ -1,6 +1,22 @@ -{ stdenv, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg }: - -stdenv.mkDerivation rec { +{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg, + fontconfig, freetype }: + +let + os = if stdenv.isDarwin then "osx" else "linux"; + arch = + with stdenv.hostPlatform; + if isx86_32 then "x86" + else if isx86_64 then "x64" + else if isAarch32 then "arm" + else if isAarch64 then "arm64" + else lib.warn "Unsupported architecture, some image processing features might be unavailable" "unknown"; + musl = lib.optionalString stdenv.hostPlatform.isMusl + (if (arch != "x64") + then lib.warn "Some image processing features might be unavailable for non x86-64 with Musl" "musl-" + else "musl-"); + runtimeDir = "${os}-${musl}${arch}"; + +in stdenv.mkDerivation rec { pname = "jellyfin"; version = "10.3.2"; @@ -28,8 +44,8 @@ stdenv.mkDerivation rec { makeWrapper "${dotnet-sdk}/bin/dotnet" $out/bin/jellyfin \ --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ - sqlite - ]}" \ + sqlite fontconfig freetype stdenv.cc.cc.lib + ]}:$out/opt/jellyfin/runtimes/${runtimeDir}/native/" \ --add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg" ''; |