2021-02-13 06:45:02 +00:00
|
|
|
{ alsa-lib
|
|
|
|
, alsa-utils
|
2021-02-13 06:38:50 +00:00
|
|
|
, autoPatchelfHook
|
|
|
|
, fetchurl
|
2022-02-01 01:43:47 +00:00
|
|
|
, ffmpeg
|
2021-02-13 06:38:50 +00:00
|
|
|
, lib
|
|
|
|
, makeWrapper
|
2022-02-01 01:43:47 +00:00
|
|
|
, openssl
|
2021-02-13 06:38:50 +00:00
|
|
|
, stdenv
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "roon-bridge";
|
2022-03-29 19:01:32 +00:00
|
|
|
version = "1.8-918";
|
2021-02-13 06:38:50 +00:00
|
|
|
|
2021-09-27 21:08:33 +00:00
|
|
|
src =
|
|
|
|
let
|
|
|
|
urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "00" ] version;
|
2022-02-01 01:43:47 +00:00
|
|
|
inherit (stdenv.targetPlatform) system;
|
2021-09-27 21:08:33 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "http://download.roonlabs.com/builds/RoonBridge_linuxx64_${urlVersion}.tar.bz2";
|
2022-03-29 19:01:32 +00:00
|
|
|
hash = "sha256-Tx8KmGKh6BNoo2RKJm0HfPHRXiFsz+FtX5gQZ1FCEEg=";
|
2021-09-27 21:08:33 +00:00
|
|
|
};
|
|
|
|
aarch64-linux = fetchurl {
|
|
|
|
url = "http://download.roonlabs.com/builds/RoonBridge_linuxarmv8_${urlVersion}.tar.bz2";
|
2022-03-29 19:01:32 +00:00
|
|
|
hash = "sha256-UkdAs+/l9c4j8PNlAZfNNCJogjxZItcDikS+tOjYjA0=";
|
2021-09-27 21:08:33 +00:00
|
|
|
};
|
2022-03-29 19:01:32 +00:00
|
|
|
}.${system} or (throw "Unsupposed system: ${system}");
|
2022-02-01 01:43:47 +00:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
2021-02-13 06:38:50 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-02-13 06:45:02 +00:00
|
|
|
alsa-lib
|
2021-02-13 06:38:50 +00:00
|
|
|
zlib
|
2022-02-01 01:43:47 +00:00
|
|
|
stdenv.cc.cc.lib
|
2021-02-13 06:38:50 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
|
|
|
|
2022-02-01 01:43:47 +00:00
|
|
|
installPhase =
|
2021-02-13 06:38:50 +00:00
|
|
|
let
|
2022-02-01 01:43:47 +00:00
|
|
|
fixBin = binPath: ''
|
|
|
|
(
|
|
|
|
sed -i '/ulimit/d' ${binPath}
|
|
|
|
sed -i 's@^SCRIPT=.*@SCRIPT="$(basename "${binPath}")"@' ${binPath}
|
|
|
|
wrapProgram ${binPath} \
|
|
|
|
--argv0 "$(basename ${binPath})" \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ alsa-lib ffmpeg openssl ]}" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ alsa-utils ffmpeg ]}"
|
|
|
|
)
|
2021-02-13 06:38:50 +00:00
|
|
|
'';
|
|
|
|
in
|
|
|
|
''
|
2022-02-01 01:43:47 +00:00
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
mv * $out
|
|
|
|
|
|
|
|
rm $out/check.sh
|
|
|
|
rm $out/start.sh
|
|
|
|
rm $out/VERSION
|
|
|
|
|
|
|
|
${fixBin "${placeholder "out"}/Bridge/RAATServer"}
|
|
|
|
${fixBin "${placeholder "out"}/Bridge/RoonBridge"}
|
|
|
|
${fixBin "${placeholder "out"}/Bridge/RoonBridgeHelper"}
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
2022-03-14 18:06:00 +00:00
|
|
|
makeWrapper "$out/Bridge/RoonBridge" "$out/bin/RoonBridge" --chdir "$out"
|
2021-02-13 06:38:50 +00:00
|
|
|
|
2022-02-01 01:43:47 +00:00
|
|
|
runHook postInstall
|
2021-02-13 06:38:50 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The music player for music lovers";
|
2022-02-01 01:43:47 +00:00
|
|
|
changelog = "https://community.roonlabs.com/c/roon/software-release-notes/18";
|
2021-02-13 06:38:50 +00:00
|
|
|
homepage = "https://roonlabs.com";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
2021-09-28 17:58:55 +00:00
|
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
2021-02-13 06:38:50 +00:00
|
|
|
};
|
|
|
|
}
|