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-04-24 12:26:12 +00:00
version = "10.3.1";
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-04-24 12:26:12 +00:00
sha256 = "1j6jyrbc0ha348y63wk5jv9wjcjydma9cr3jxva1y85pjrmm7z90";
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 10:04:47 +00: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
};
}