roon-bridge: 1.8-814 -> 1.8-880

This commit is contained in:
Bernardo Meurer 2022-01-31 17:43:47 -08:00
parent 4319059b42
commit 1ae972c019
No known key found for this signature in database
GPG Key ID: F4C0D53B8D14C246

View File

@ -2,71 +2,80 @@
, alsa-utils , alsa-utils
, autoPatchelfHook , autoPatchelfHook
, fetchurl , fetchurl
, ffmpeg
, lib , lib
, makeWrapper , makeWrapper
, openssl
, stdenv , stdenv
, zlib , zlib
}: }:
let
inherit (stdenv.targetPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "roon-bridge"; pname = "roon-bridge";
version = "1.8-814"; version = "1.8-880";
src = src =
let let
urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "00" ] version; urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "00" ] version;
inherit (stdenv.targetPlatform) system;
noSuchSystem = throw "Unsupposed system: ${system}";
in in
{ {
x86_64-linux = fetchurl { x86_64-linux = fetchurl {
url = "http://download.roonlabs.com/builds/RoonBridge_linuxx64_${urlVersion}.tar.bz2"; url = "http://download.roonlabs.com/builds/RoonBridge_linuxx64_${urlVersion}.tar.bz2";
sha256 = "sha256-dersaP/8qkl9k81FrgMieB0P4nKmDwjLW5poqKhEn7A="; sha256 = "sha256-YTLy3D1CQR1hlsGw2MmZtxHT82T0PCYZxD4adt2m1+o=";
}; };
aarch64-linux = fetchurl { aarch64-linux = fetchurl {
url = "http://download.roonlabs.com/builds/RoonBridge_linuxarmv8_${urlVersion}.tar.bz2"; url = "http://download.roonlabs.com/builds/RoonBridge_linuxarmv8_${urlVersion}.tar.bz2";
sha256 = "sha256-zZj7PkLUYYHo3dngqErv1RqynSXi6/D5VPZWfrppX5U="; sha256 = "sha256-aCQtYMUIzwhmYJW4a8cFzIRuxyMVIkeaJH4w1Lasp3M=";
}; };
}.${system} or throwSystem; }.${system} or noSuchSystem;
dontConfigure = true;
dontBuild = true;
buildInputs = [ buildInputs = [
alsa-lib alsa-lib
alsa-utils
zlib zlib
stdenv.cc.cc.lib
]; ];
nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
installPhase = '' installPhase =
runHook preInstall
mkdir -p $out
mv * $out
runHook postInstall
'';
postFixup =
let let
linkFix = bin: '' fixBin = binPath: ''
sed -i '/ulimit/d' ${bin} (
sed -i '/ln -sf/d' ${bin} sed -i '/ulimit/d' ${binPath}
ln -sf $out/RoonMono/bin/mono-sgen $out/RoonMono/bin/${builtins.baseNameOf bin} sed -i 's@^SCRIPT=.*@SCRIPT="$(basename "${binPath}")"@' ${binPath}
''; wrapProgram ${binPath} \
wrapFix = bin: '' --argv0 "$(basename ${binPath})" \
wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsa-utils ]} --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ alsa-lib ffmpeg openssl ]}" \
--prefix PATH : "${lib.makeBinPath [ alsa-utils ffmpeg ]}"
)
''; '';
in in
'' ''
${linkFix "$out/Bridge/RAATServer"} runHook preInstall
${linkFix "$out/Bridge/RoonBridge"} mkdir -p $out
${linkFix "$out/Bridge/RoonBridgeHelper"} mv * $out
${wrapFix "$out/check.sh"} rm $out/check.sh
${wrapFix "$out/start.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
makeWrapper "$out/Bridge/RoonBridge" "$out/bin/RoonBridge" --run "cd $out"
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {
description = "The music player for music lovers"; description = "The music player for music lovers";
changelog = "https://community.roonlabs.com/c/roon/software-release-notes/18";
homepage = "https://roonlabs.com"; homepage = "https://roonlabs.com";
license = licenses.unfree; license = licenses.unfree;
maintainers = with maintainers; [ lovesegfault ]; maintainers = with maintainers; [ lovesegfault ];