2021-02-13 07:45:02 +01:00
|
|
|
{ alsa-lib
|
|
|
|
, alsa-utils
|
2021-02-13 07:38:50 +01:00
|
|
|
, autoPatchelfHook
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
, zlib
|
|
|
|
}:
|
2021-08-03 09:19:10 +02:00
|
|
|
let
|
|
|
|
inherit (stdenv.targetPlatform) system;
|
|
|
|
throwSystem = throw "Unsupported system: ${system}";
|
|
|
|
in
|
2021-02-13 07:38:50 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "roon-bridge";
|
2021-07-29 17:58:03 +02:00
|
|
|
version = "1.8-814";
|
2021-02-13 07:38:50 +01:00
|
|
|
|
2021-09-27 23:08:33 +02:00
|
|
|
src =
|
|
|
|
let
|
|
|
|
urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "00" ] version;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "http://download.roonlabs.com/builds/RoonBridge_linuxx64_${urlVersion}.tar.bz2";
|
|
|
|
sha256 = "sha256-dersaP/8qkl9k81FrgMieB0P4nKmDwjLW5poqKhEn7A=";
|
|
|
|
};
|
|
|
|
aarch64-linux = fetchurl {
|
|
|
|
url = "http://download.roonlabs.com/builds/RoonBridge_linuxarmv8_${urlVersion}.tar.bz2";
|
|
|
|
sha256 = "sha256-zZj7PkLUYYHo3dngqErv1RqynSXi6/D5VPZWfrppX5U=";
|
|
|
|
};
|
|
|
|
}.${system} or throwSystem;
|
2021-02-13 07:38:50 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-02-13 07:45:02 +01:00
|
|
|
alsa-lib
|
|
|
|
alsa-utils
|
2021-02-13 07:38:50 +01:00
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
mv * $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
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-02-13 07:45:02 +01:00
|
|
|
wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsa-utils ]}
|
2021-02-13 07:38:50 +01:00
|
|
|
'';
|
|
|
|
in
|
|
|
|
''
|
|
|
|
${linkFix "$out/Bridge/RAATServer"}
|
|
|
|
${linkFix "$out/Bridge/RoonBridge"}
|
|
|
|
${linkFix "$out/Bridge/RoonBridgeHelper"}
|
|
|
|
|
|
|
|
${wrapFix "$out/check.sh"}
|
|
|
|
${wrapFix "$out/start.sh"}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The music player for music lovers";
|
|
|
|
homepage = "https://roonlabs.com";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
2021-09-28 19:58:55 +02:00
|
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
2021-02-13 07:38:50 +01:00
|
|
|
};
|
|
|
|
}
|