nixpkgs/pkgs/servers/jellyfin/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2019-03-07 22:22:37 +01:00
{ stdenv, fetchurl, unzip, sqlite, makeWrapper, dotnet-sdk, ffmpeg }:
stdenv.mkDerivation rec {
pname = "jellyfin";
2019-04-24 14:26:12 +02:00
version = "10.3.1";
2019-03-07 22:22:37 +01: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-04-24 14:26:12 +02:00
sha256 = "1j6jyrbc0ha348y63wk5jv9wjcjydma9cr3jxva1y85pjrmm7z90";
2019-03-07 22:22:37 +01: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 12:04:47 +02:00
--add-flags "$out/opt/jellyfin/jellyfin.dll --ffmpeg ${ffmpeg}/bin/ffmpeg"
2019-03-07 22:22:37 +01:00
'';
meta = with stdenv.lib; {
description = "The Free Software Media System";
homepage = https://jellyfin.github.io/;
license = licenses.gpl2;
maintainers = with maintainers; [ nyanloutre ];
};
}