2021-06-10 03:57:09 +01:00
|
|
|
{ alsa-lib
|
2021-06-10 05:10:52 +01:00
|
|
|
, alsa-utils
|
2020-07-23 19:37:52 +01:00
|
|
|
, autoPatchelfHook
|
|
|
|
, cifs-utils
|
|
|
|
, fetchurl
|
|
|
|
, ffmpeg
|
|
|
|
, freetype
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
, zlib
|
2021-09-27 22:03:55 +01:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-10 07:04:56 +01:00
|
|
|
pname = "roon-server";
|
2021-09-21 17:20:12 +01:00
|
|
|
version = "1.8-831";
|
2019-06-21 19:58:20 +01:00
|
|
|
|
2021-09-27 22:03:55 +01:00
|
|
|
src =
|
|
|
|
let
|
|
|
|
urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "00" ] version;
|
|
|
|
in
|
|
|
|
fetchurl {
|
|
|
|
url = "http://download.roonlabs.com/builds/RoonServer_linuxx64_${urlVersion}.tar.bz2";
|
|
|
|
sha256 = "sha256-SeMSC7K6DV7rVr1w/SqMnLvipoWbypS/gJnSZmpfXZk=";
|
|
|
|
};
|
2019-06-21 19:58:20 +01:00
|
|
|
|
2020-07-23 19:37:52 +01:00
|
|
|
buildInputs = [
|
2021-06-10 03:57:09 +01:00
|
|
|
alsa-lib
|
2021-06-10 05:10:52 +01:00
|
|
|
alsa-utils
|
2020-07-23 19:37:52 +01:00
|
|
|
cifs-utils
|
|
|
|
ffmpeg
|
|
|
|
freetype
|
|
|
|
zlib
|
|
|
|
];
|
2019-06-21 19:58:20 +01:00
|
|
|
|
2020-07-23 19:37:52 +01:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
2019-06-21 19:58:20 +01:00
|
|
|
|
2020-07-23 19:37:52 +01:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
mv * $out
|
2019-06-21 19:58:20 +01:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2020-07-23 19:37:52 +01: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: ''
|
2021-06-10 05:10:52 +01:00
|
|
|
wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}
|
2020-07-23 19:37:52 +01:00
|
|
|
'';
|
|
|
|
in
|
|
|
|
''
|
|
|
|
${linkFix "$out/Appliance/RAATServer"}
|
|
|
|
${linkFix "$out/Appliance/RoonAppliance"}
|
|
|
|
${linkFix "$out/Server/RoonServer"}
|
2019-06-21 19:58:20 +01:00
|
|
|
|
2020-07-23 19:37:52 +01: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 19:58:20 +01:00
|
|
|
|
2020-07-23 19:37:52 +01:00
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "The music player for music lovers";
|
2021-06-10 07:04:56 +01:00
|
|
|
changelog = "https://community.roonlabs.com/c/roon/software-release-notes/18";
|
2020-07-23 19:37:52 +01:00
|
|
|
homepage = "https://roonlabs.com";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault steell ];
|
2021-09-28 18:59:03 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-06-21 19:58:20 +01:00
|
|
|
};
|
|
|
|
}
|