From 2bac6a445e191a6ab3f943036afefca272a916ae Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Fri, 12 Feb 2021 22:38:50 -0800 Subject: [PATCH] roon-bridge: init at 1.8-795 --- pkgs/servers/roon-bridge/default.nix | 66 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 68 insertions(+) create mode 100644 pkgs/servers/roon-bridge/default.nix diff --git a/pkgs/servers/roon-bridge/default.nix b/pkgs/servers/roon-bridge/default.nix new file mode 100644 index 000000000000..637d43737a1b --- /dev/null +++ b/pkgs/servers/roon-bridge/default.nix @@ -0,0 +1,66 @@ +{ alsaLib +, alsaUtils +, autoPatchelfHook +, fetchurl +, lib +, makeWrapper +, stdenv +, zlib +}: + +stdenv.mkDerivation rec { + pname = "roon-bridge"; + version = "100800753"; + + # 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 + src = fetchurl { + url = "https://web.archive.org/web/20201221152142/http://download.roonlabs.com/builds/RoonBridge_linuxx64.tar.bz2"; + sha256 = "sha256-ahdy0/TBOyMfCt4VTkcDTZGAFmwQJT2KvZuMtFcAY3w="; + }; + + buildInputs = [ + alsaLib + alsaUtils + 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: '' + wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsaUtils ]} + ''; + 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 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad5474958ba6..1becc8530704 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19845,6 +19845,8 @@ in boost = boost17x; }; + roon-bridge = callPackage ../servers/roon-bridge { }; + roon-server = callPackage ../servers/roon-server { }; s6 = skawarePackages.s6;