19 urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "0" ] version;
22 pname = "roon-server";
26 url = "https://download.roonlabs.com/updates/production/RoonServer_linuxx64_${urlVersion}.tar.bz2";
27 hash = "sha256-D6Xdij92bDUchkSTT9/ADaNALqCyYwL9EnLqma48alg=";
42 nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
46 # NB: While this might seem like odd behavior, it's what Roon expects. The
47 # tarball distribution provides scripts that do a bunch of nonsense on top
48 # of what wrapBin is doing here, so consider it the lesser of two evils.
49 # I didn't bother checking whether the symlinks are really necessary, but
50 # I wouldn't put it past Roon to have custom code based on the binary
51 # name, so we're playing it safe.
54 binDir="$(dirname "${binPath}")"
55 binName="$(basename "${binPath}")"
56 dotnetDir="$out/RoonDotnet"
58 ln -sf "$dotnetDir/dotnet" "$dotnetDir/$binName"
60 makeWrapper "$dotnetDir/$binName" "${binPath}" \
61 --add-flags "$binDir/$binName.dll" \
63 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ alsa-lib icu66 ffmpeg openssl ]}" \
64 --prefix PATH : "$dotnetDir" \
65 --prefix PATH : "${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}" \
67 --set DOTNET_ROOT "$dotnetDir"
80 ${wrapBin "$out/Appliance/RAATServer"}
81 ${wrapBin "$out/Appliance/RoonAppliance"}
82 ${wrapBin "$out/Server/RoonServer"}
85 makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --chdir "$out"
91 description = "Music player for music lovers";
92 changelog = "https://community.roonlabs.com/c/roon/software-release-notes/18";
93 homepage = "https://roonlabs.com";
94 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
95 license = licenses.unfree;
96 maintainers = with maintainers; [ lovesegfault steell ];
97 platforms = [ "x86_64-linux" ];
98 mainProgram = "RoonServer";