3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/jellyfin/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2019-03-07 21:22:37 +00:00
{ stdenv, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg }:
stdenv.mkDerivation rec {
pname = "jellyfin";
2019-05-01 10:51:01 +01:00
version = "10.3.2";
2019-03-07 21:22:37 +00:00
# Impossible to build anything offline with dotnet
src = fetchurl {
url = "https://github.com/jellyfin/jellyfin/releases/download/v${version}/jellyfin_${version}_portable.tar.gz";
2019-05-01 10:51:01 +01:00
sha256 = "0cwmaq61xhdb34f53m2vhnw8v4zrj266vjzfdm106gyychpr46vz";
2019-03-07 21:22:37 +00:00
};
buildInputs = [
unzip
makeWrapper
];
propagatedBuildInputs = [
dotnet-sdk
sqlite
];
preferLocalBuild = true;
installPhase = ''
install -dm 755 "$out/opt/jellyfin"
cp -r * "$out/opt/jellyfin"
makeWrapper "${dotnet-sdk}/bin/dotnet" $out/bin/jellyfin \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
sqlite
]}" \
2019-04-21 11:04:47 +01:00
--add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
2019-03-07 21:22:37 +00:00
'';
meta = with stdenv.lib; {
description = "The Free Software Media System";
homepage = https://jellyfin.github.io/;
license = licenses.gpl2;
maintainers = with maintainers; [ nyanloutre minijackson ];
2019-03-07 21:22:37 +00:00
};
}