···
stdenv.mkDerivation rec {
15
-
version = "1.8-831";
17
+
version = "1.8-846";
···
url = "http://download.roonlabs.com/builds/RoonServer_linuxx64_${urlVersion}.tar.bz2";
23
-
sha256 = "sha256-SeMSC7K6DV7rVr1w/SqMnLvipoWbypS/gJnSZmpfXZk=";
25
+
sha256 = "sha256-BoHvODaAcK5b4/syOm3vpOTpq9ETovpWKUqG+UGr2e0=";
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
37
+
propagatedBuildInputs = [ alsa-utils cifs-utils ffmpeg ];
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}
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: ''
49
+
binDir="$(dirname "${binPath}")"
50
+
binName="$(basename "${binPath}")"
51
+
dotnetDir="$out/RoonDotnet"
53
+
ln -sf "$dotnetDir/dotnet" "$dotnetDir/$binName"
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"
56
-
${linkFix "$out/Appliance/RAATServer"}
57
-
${linkFix "$out/Appliance/RoonAppliance"}
58
-
${linkFix "$out/Server/RoonServer"}
74
+
${wrapBin "$out/Appliance/RAATServer"}
75
+
${wrapBin "$out/Appliance/RoonAppliance"}
76
+
${wrapBin "$out/Server/RoonServer"}
79
+
makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --run "cd $out"
81
+
# This is unused and depends on an ancient version of lttng-ust, so we
83
+
patchelf --remove-needed liblttng-ust.so.0 $out/RoonDotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclrtraceptprovider.so
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"}