2015-11-08 11:52:04 +03:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, libzen, libmediainfo , jre8
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "ums";
|
2020-05-07 01:17:17 +03:00
|
|
|
version = "9.4.2";
|
|
|
|
|
|
|
|
src = {
|
|
|
|
i686-linux = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/unimediaserver/${version}/" + stdenv.lib.toUpper "${pname}-${version}" + "-x86.tgz";
|
|
|
|
sha256 = "0i319g2c3z9j131nwh5m92clgnxxxs3izplzhjb30bx4lldmjs1j";
|
|
|
|
};
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/unimediaserver/${version}/" + stdenv.lib.toUpper "${pname}-${version}" + "-x86_64.tgz";
|
|
|
|
sha256 = "07wc0is86fdfyz4as3f17q8pfzl8x55ci65zvpls0a9rfyyvjjw3";
|
|
|
|
};
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2015-11-08 11:52:04 +03:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -a . $out/
|
|
|
|
mkdir $out/bin
|
|
|
|
mv $out/documentation /$out/doc
|
|
|
|
|
2020-01-18 02:31:09 +03:00
|
|
|
# ums >= 9.0.0 ships its own JRE in the package. if we remove it, the `UMS.sh`
|
|
|
|
# script will correctly fall back to the JRE specified by JAVA_HOME
|
2020-05-07 01:17:17 +03:00
|
|
|
rm -rf $out/jre
|
2020-01-18 02:31:09 +03:00
|
|
|
|
2015-11-08 11:52:04 +03:00
|
|
|
makeWrapper "$out/UMS.sh" "$out/bin/ums" \
|
2016-06-07 21:18:38 +03:00
|
|
|
--prefix LD_LIBRARY_PATH ":" "${stdenv.lib.makeLibraryPath [ libzen libmediainfo] }" \
|
2015-11-08 11:52:04 +03:00
|
|
|
--set JAVA_HOME "${jre8}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2016-02-27 20:24:00 +03:00
|
|
|
description = "Universal Media Server: a DLNA-compliant UPnP Media Server";
|
2015-11-08 11:52:04 +03:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2020-05-07 01:20:15 +03:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ thall snicket2100 ];
|
2015-11-08 11:52:04 +03:00
|
|
|
};
|
|
|
|
}
|