jellyfin: add bundled libraries to LD_LIBRARY_PATH
This commit is contained in:
parent
c0a0dc19ce
commit
5251cbb051
@ -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";
|
pname = "jellyfin";
|
||||||
version = "10.3.2";
|
version = "10.3.2";
|
||||||
|
|
||||||
@ -28,8 +44,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
makeWrapper "${dotnet-sdk}/bin/dotnet" $out/bin/jellyfin \
|
makeWrapper "${dotnet-sdk}/bin/dotnet" $out/bin/jellyfin \
|
||||||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
|
--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"
|
--add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user