2021-06-10 02:57:09 +00:00
|
|
|
{ alsa-lib
|
2021-06-10 04:10:52 +00:00
|
|
|
, alsa-utils
|
2020-07-23 18:37:52 +00:00
|
|
|
, autoPatchelfHook
|
|
|
|
, cifs-utils
|
|
|
|
, fetchurl
|
|
|
|
, ffmpeg
|
|
|
|
, freetype
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
, zlib
|
|
|
|
}: stdenv.mkDerivation rec {
|
2021-06-10 06:04:56 +00:00
|
|
|
pname = "roon-server";
|
2021-07-29 15:58:12 +00:00
|
|
|
version = "1.8-814";
|
2019-06-21 18:58:20 +00:00
|
|
|
|
2021-02-01 04:14:12 +00:00
|
|
|
# N.B. The URL is unstable. I've asked for them to provide a stable URL but
|
|
|
|
# they have ignored me. If this package fails to build for you, you may need
|
|
|
|
# to update the version and sha256.
|
|
|
|
# c.f. https://community.roonlabs.com/t/latest-roon-server-is-not-available-for-download-on-nixos/118129
|
2019-06-21 18:58:20 +00:00
|
|
|
src = fetchurl {
|
2021-07-29 15:58:12 +00:00
|
|
|
url = "https://web.archive.org/web/20210729154130/http://download.roonlabs.com/builds/RoonServer_linuxx64.tar.bz2";
|
|
|
|
sha256 = "sha256-GbWcgNq+dmzoHNFZyB/QFCvJ7Hh48v8IuGS4WMNlKgI=";
|
2019-06-21 18:58:20 +00:00
|
|
|
};
|
|
|
|
|
2020-07-23 18:37:52 +00:00
|
|
|
buildInputs = [
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2021-06-10 04:10:52 +00:00
|
|
|
alsa-utils
|
2020-07-23 18:37:52 +00:00
|
|
|
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: ''
|
2021-06-10 04:10:52 +00:00
|
|
|
wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}
|
2020-07-23 18:37:52 +00:00
|
|
|
'';
|
|
|
|
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; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "The music player for music lovers";
|
2021-06-10 06:04:56 +00:00
|
|
|
changelog = "https://community.roonlabs.com/c/roon/software-release-notes/18";
|
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
|
|
|
};
|
|
|
|
}
|