lol

Merge pull request #144630 from lovesegfault/roon-server-486

roon-server: 1.8-831 -> 1.8-846

authored by

Bernardo Meurer and committed by
GitHub
4e18eac5 51289b6b

+51 -29
+1 -1
nixos/modules/services/audio/roon-server.nix
··· 42 42 environment.ROON_DATAROOT = "/var/lib/${name}"; 43 43 44 44 serviceConfig = { 45 - ExecStart = "${pkgs.roon-server}/start.sh"; 45 + ExecStart = "${pkgs.roon-server}/bin/RoonServer"; 46 46 LimitNOFILE = 8192; 47 47 User = cfg.user; 48 48 Group = cfg.group;
+50 -28
pkgs/servers/roon-server/default.nix
··· 5 5 , fetchurl 6 6 , ffmpeg 7 7 , freetype 8 + , icu66 9 + , krb5 8 10 , lib 9 11 , makeWrapper 10 12 , stdenv 11 - , zlib 13 + , openssl 12 14 }: 13 15 stdenv.mkDerivation rec { 14 16 pname = "roon-server"; 15 - version = "1.8-831"; 17 + version = "1.8-846"; 16 18 17 19 src = 18 20 let ··· 20 22 in 21 23 fetchurl { 22 24 url = "http://download.roonlabs.com/builds/RoonServer_linuxx64_${urlVersion}.tar.bz2"; 23 - sha256 = "sha256-SeMSC7K6DV7rVr1w/SqMnLvipoWbypS/gJnSZmpfXZk="; 25 + sha256 = "sha256-BoHvODaAcK5b4/syOm3vpOTpq9ETovpWKUqG+UGr2e0="; 24 26 }; 25 27 26 28 buildInputs = [ 27 29 alsa-lib 28 - alsa-utils 29 - cifs-utils 30 - ffmpeg 31 30 freetype 32 - zlib 31 + krb5 32 + stdenv.cc.cc.lib 33 33 ]; 34 34 35 35 nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; 36 36 37 - installPhase = '' 38 - runHook preInstall 39 - mkdir -p $out 40 - mv * $out 41 - runHook postInstall 42 - ''; 37 + propagatedBuildInputs = [ alsa-utils cifs-utils ffmpeg ]; 43 38 44 - postFixup = 39 + installPhase = 45 40 let 46 - linkFix = bin: '' 47 - sed -i '/ulimit/d' ${bin} 48 - sed -i '/ln -sf/d' ${bin} 49 - ln -sf $out/RoonMono/bin/mono-sgen $out/RoonMono/bin/${builtins.baseNameOf bin} 50 - ''; 51 - wrapFix = bin: '' 52 - wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]} 41 + # NB: While this might seem like odd behavior, it's what Roon expects. The 42 + # tarball distribution provides scripts that do a bunch of nonsense on top 43 + # of what wrapBin is doing here, so consider it the lesser of two evils. 44 + # I didn't bother checking whether the symlinks are really necessary, but 45 + # I wouldn't put it past Roon to have custom code based on the binary 46 + # name, so we're playing it safe. 47 + wrapBin = binPath: '' 48 + ( 49 + binDir="$(dirname "${binPath}")" 50 + binName="$(basename "${binPath}")" 51 + dotnetDir="$out/RoonDotnet" 52 + 53 + ln -sf "$dotnetDir/dotnet" "$dotnetDir/$binName" 54 + rm "${binPath}" 55 + makeWrapper "$dotnetDir/$binName" "${binPath}" \ 56 + --add-flags "$binDir/$binName.dll" \ 57 + --argv0 "$binName" \ 58 + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ icu66 openssl ]}" \ 59 + --prefix PATH : "$dotnetDir" \ 60 + --run "cd $binDir" \ 61 + --set DOTNET_ROOT "$dotnetDir" 62 + ) 53 63 ''; 54 64 in 55 65 '' 56 - ${linkFix "$out/Appliance/RAATServer"} 57 - ${linkFix "$out/Appliance/RoonAppliance"} 58 - ${linkFix "$out/Server/RoonServer"} 66 + runHook preInstall 67 + mkdir -p $out 68 + mv * $out 69 + 70 + rm $out/check.sh 71 + rm $out/start.sh 72 + rm $out/VERSION 73 + 74 + ${wrapBin "$out/Appliance/RAATServer"} 75 + ${wrapBin "$out/Appliance/RoonAppliance"} 76 + ${wrapBin "$out/Server/RoonServer"} 77 + 78 + mkdir -p $out/bin 79 + makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --run "cd $out" 80 + 81 + # This is unused and depends on an ancient version of lttng-ust, so we 82 + # just patch it out 83 + patchelf --remove-needed liblttng-ust.so.0 $out/RoonDotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclrtraceptprovider.so 59 84 60 - sed -i '/which avconv/c\ WHICH_AVCONV=1' $out/check.sh 61 - sed -i '/^check_ulimit/d' $out/check.sh 62 - ${wrapFix "$out/check.sh"} 63 - ${wrapFix "$out/start.sh"} 85 + runHook postInstall 64 86 ''; 65 87 66 88 meta = with lib; {