git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #61668 from minijackson/jellyfin-skia

jellyfin: add bundled libraries to LD_LIBRARY_PATH

commit70de27bbb4758038e5b87f725d964eefda4898e1 authorMatthew Bauer <mjbauer95@gmail.com> dateSat 8 Jun 2019, 12:02 (7 years ago) parent635e3b15251cbb
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.4";
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