Merge pull request #61668 from minijackson/jellyfin-skia

jellyfin: add bundled libraries to LD_LIBRARY_PATH
This commit is contained in:
Matthew Bauer 2019-06-08 12:02:42 -04:00 committed by GitHub
commit 70de27bbb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,22 @@
{ stdenv, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg }:
{ stdenv, lib, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg,
fontconfig, freetype }:
stdenv.mkDerivation rec {
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.4";
@ -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"
'';