2017-01-30 19:20:11 +00:00
|
|
|
{ stdenv, fetchurl, pkgs, unzip, sqlite, makeWrapper, mono46, ffmpeg, ... }:
|
2016-04-23 14:08:45 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "emby-${version}";
|
2017-07-02 19:35:01 +01:00
|
|
|
version = "3.2.22.0";
|
2016-04-23 14:08:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-01-30 19:20:11 +00:00
|
|
|
url = "https://github.com/MediaBrowser/Emby/releases/download/${version}/Emby.Mono.zip";
|
2017-07-02 19:35:01 +01:00
|
|
|
sha256 = "0vc9391q1mi16k05yl5lqs2cmsgcid339pbqm9fyqzm33fk7d73r";
|
2016-04-23 14:08:45 +01:00
|
|
|
};
|
|
|
|
|
2016-10-03 11:14:46 +01:00
|
|
|
buildInputs = with pkgs; [
|
2017-01-30 19:20:11 +00:00
|
|
|
unzip
|
2016-10-03 11:14:46 +01:00
|
|
|
makeWrapper
|
|
|
|
];
|
2016-05-25 20:23:42 +01:00
|
|
|
propagatedBuildInputs = with pkgs; [
|
2017-01-30 19:20:11 +00:00
|
|
|
mono46
|
2016-05-25 20:23:42 +01:00
|
|
|
sqlite
|
|
|
|
];
|
2016-04-23 14:08:45 +01:00
|
|
|
|
2017-01-30 19:20:11 +00:00
|
|
|
# Need to set sourceRoot as unpacker will complain about multiple directory output
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2016-05-25 20:23:42 +01:00
|
|
|
buildPhase = ''
|
2017-01-30 19:20:11 +00:00
|
|
|
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 14:08:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2017-01-30 19:20:11 +00:00
|
|
|
cp -r * $out/bin
|
2016-10-03 11:14:46 +01:00
|
|
|
|
2017-01-30 19:20:11 +00:00
|
|
|
makeWrapper "${mono46}/bin/mono" $out/bin/MediaBrowser.Server.Mono \
|
2016-10-03 11:14:46 +01:00
|
|
|
--add-flags "$out/bin/MediaBrowser.Server.Mono.exe -ffmpeg ${ffmpeg}/bin/ffmpeg -ffprobe ${ffmpeg}/bin/ffprobe"
|
2016-04-23 14:08:45 +01: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;
|
|
|
|
};
|
|
|
|
}
|