2020-07-23 18:37:52 +00:00
|
|
|
{ alsaLib
|
|
|
|
, alsaUtils
|
|
|
|
, autoPatchelfHook
|
|
|
|
, cifs-utils
|
|
|
|
, fetchurl
|
|
|
|
, ffmpeg
|
|
|
|
, freetype
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
, zlib
|
|
|
|
}: stdenv.mkDerivation rec {
|
2019-06-21 18:58:20 +00:00
|
|
|
name = "roon-server";
|
2020-07-23 18:37:52 +00:00
|
|
|
version = "100700571";
|
2019-06-21 18:58:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.roonlabs.com/updates/stable/RoonServer_linuxx64_${version}.tar.bz2";
|
2020-07-23 18:37:52 +00:00
|
|
|
sha256 = "191vlzf10ypkk1prp6x2rszlmsihdwpd3wvgf2jg6ckwyxy2hc6k";
|
2019-06-21 18:58:20 +00:00
|
|
|
};
|
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
alsaLib
|
|
|
|
alsaUtils
|
|
|
|
cifs-utils
|
|
|
|
ffmpeg
|
|
|
|
freetype
|
|
|
|
zlib
|
|
|
|
];
|
2019-06-21 18:58:20 +00:00
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
2019-06-21 18:58:20 +00:00
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
mv * $out
|
2019-06-21 18:58:20 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
postFixup =
|
|
|
|
let
|
|
|
|
linkFix = bin: ''
|
|
|
|
sed -i '/ulimit/d' ${bin}
|
|
|
|
sed -i '/ln -sf/d' ${bin}
|
|
|
|
ln -sf $out/RoonMono/bin/mono-sgen $out/RoonMono/bin/${builtins.baseNameOf bin}
|
|
|
|
'';
|
|
|
|
wrapFix = bin: ''
|
|
|
|
wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsaUtils cifs-utils ffmpeg ]}
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
''
|
|
|
|
${linkFix "$out/Appliance/RAATServer"}
|
|
|
|
${linkFix "$out/Appliance/RoonAppliance"}
|
|
|
|
${linkFix "$out/Server/RoonServer"}
|
2019-06-21 18:58:20 +00:00
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
sed -i '/which avconv/c\ WHICH_AVCONV=1' $out/check.sh
|
|
|
|
sed -i '/^check_ulimit/d' $out/check.sh
|
|
|
|
${wrapFix "$out/check.sh"}
|
|
|
|
${wrapFix "$out/start.sh"}
|
|
|
|
'';
|
2019-06-21 18:58:20 +00:00
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
meta = with lib; {
|
2019-06-21 18:58:20 +00:00
|
|
|
description = "The music player for music lovers.";
|
2020-07-23 18:37:52 +00:00
|
|
|
homepage = "https://roonlabs.com";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault steell ];
|
|
|
|
platforms = platforms.linux;
|
2019-06-21 18:58:20 +00:00
|
|
|
};
|
|
|
|
}
|