1 { lib, stdenv, fetchurl, makeWrapper
2 , libzen, libmediainfo , jre8
5 stdenv.mkDerivation rec {
10 i686-linux = fetchurl {
11 url = "mirror://sourceforge/project/unimediaserver/${version}/" + lib.toUpper "${pname}-${version}" + "-x86.tgz";
12 sha256 = "0j3d5zcwwswlcr2vicmvnnr7n8cg3q46svz0mbmga4j3da4473i6";
14 x86_64-linux = fetchurl {
15 url = "mirror://sourceforge/project/unimediaserver/${version}/" + lib.toUpper "${pname}-${version}" + "-x86_64.tgz";
16 sha256 = "06f96vkf593aasyfw458fa4x3rnai2k83vpgzc83hlwr0rw70qfn";
18 }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
20 nativeBuildInputs = [ makeWrapper ];
25 mv $out/documentation /$out/doc
27 # ums >= 9.0.0 ships its own JRE in the package. if we remove it, the `UMS.sh`
28 # script will correctly fall back to the JRE specified by JAVA_HOME
31 makeWrapper "$out/UMS.sh" "$out/bin/ums" \
32 --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath [ libzen libmediainfo] }" \
33 --set JAVA_HOME "${jre8}"
37 description = "Universal Media Server: a DLNA-compliant UPnP Media Server";
38 license = lib.licenses.gpl2Only;
39 platforms = lib.platforms.linux;
40 maintainers = with lib.maintainers; [ thall snicket2100 ];