nixpkgs/pkgs/servers/emby/default.nix
Tristan Helmich d70c26df09 emby: 3.0.8500 -> 3.1.5
Notable changes:
* mono46 is now required by emby
* switch back to pre-built binaries due to problems building from source
* sqlite path is now configured in SQLitePCLRaw.provider.sqlite3.dll.config
2017-01-30 20:20:11 +01:00

45 lines
1.4 KiB
Nix

{ stdenv, fetchurl, pkgs, unzip, sqlite, makeWrapper, mono46, ffmpeg, ... }:
stdenv.mkDerivation rec {
name = "emby-${version}";
version = "3.1.5";
src = fetchurl {
url = "https://github.com/MediaBrowser/Emby/releases/download/${version}/Emby.Mono.zip";
sha256 = "0s0m456rxdrj58zbaby6mdgc1ndc3zx2c07n94hn3hdlgralgwaa";
};
buildInputs = with pkgs; [
unzip
makeWrapper
];
propagatedBuildInputs = with pkgs; [
mono46
sqlite
];
# 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"
'';
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"
'';
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;
};
}