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-05-01 11:51:01 +02:00
version = "10.3.2";
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-05-01 11:51:01 +02:00
sha256 = "0cwmaq61xhdb34f53m2vhnw8v4zrj266vjzfdm106gyychpr46vz";
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 minijackson ];
2019-03-07 22:22:37 +01:00
};
}