nixpkgs-suyu/pkgs/servers/emby/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgs, unzip, sqlite, makeWrapper, mono46, ffmpeg, ... }:
2016-04-23 15:08:45 +02:00
stdenv.mkDerivation rec {
name = "emby-${version}";
2017-06-05 12:57:40 +02:00
version = "3.2.19.0";
2016-04-23 15:08:45 +02:00
src = fetchurl {
url = "https://github.com/MediaBrowser/Emby/releases/download/${version}/Emby.Mono.zip";
2017-06-05 12:57:40 +02:00
sha256 = "14gwkglngaf29zzjqyph8pqz8i8i9j2vha9g2m17slgdxif4ijzc";
2016-04-23 15:08:45 +02:00
};
buildInputs = with pkgs; [
unzip
makeWrapper
];
propagatedBuildInputs = with pkgs; [
mono46
sqlite
];
2016-04-23 15:08:45 +02:00
# Need to set sourceRoot as unpacker will complain about multiple directory output
sourceRoot = ".";
buildPhase = ''
substituteInPlace SQLitePCLRaw.provider.sqlite3.dll.config --replace libsqlite3.so ${sqlite.out}/lib/libsqlite3.so
substituteInPlace MediaBrowser.Server.Mono.exe.config --replace ProgramData-Server "/var/lib/emby/ProgramData-Server"
2016-04-23 15:08:45 +02:00
'';
installPhase = ''
mkdir -p $out/bin
cp -r * $out/bin
makeWrapper "${mono46}/bin/mono" $out/bin/MediaBrowser.Server.Mono \
--add-flags "$out/bin/MediaBrowser.Server.Mono.exe -ffmpeg ${ffmpeg}/bin/ffmpeg -ffprobe ${ffmpeg}/bin/ffprobe"
2016-04-23 15:08:45 +02:00
'';
meta = {
description = "MediaBrowser - Bring together your videos, music, photos, and live television";
homepage = http://emby.media/;
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.fadenb ];
platforms = stdenv.lib.platforms.all;
};
}