mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
Merge pull request #144630 from lovesegfault/roon-server-486
roon-server: 1.8-831 -> 1.8-846
This commit is contained in:
commit
4e18eac594
2 changed files with 51 additions and 29 deletions
|
@ -42,7 +42,7 @@ in {
|
||||||
environment.ROON_DATAROOT = "/var/lib/${name}";
|
environment.ROON_DATAROOT = "/var/lib/${name}";
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.roon-server}/start.sh";
|
ExecStart = "${pkgs.roon-server}/bin/RoonServer";
|
||||||
LimitNOFILE = 8192;
|
LimitNOFILE = 8192;
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
|
|
|
@ -5,14 +5,16 @@
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, ffmpeg
|
, ffmpeg
|
||||||
, freetype
|
, freetype
|
||||||
|
, icu66
|
||||||
|
, krb5
|
||||||
, lib
|
, lib
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, stdenv
|
, stdenv
|
||||||
, zlib
|
, openssl
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "roon-server";
|
pname = "roon-server";
|
||||||
version = "1.8-831";
|
version = "1.8-846";
|
||||||
|
|
||||||
src =
|
src =
|
||||||
let
|
let
|
||||||
|
@ -20,47 +22,67 @@ stdenv.mkDerivation rec {
|
||||||
in
|
in
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "http://download.roonlabs.com/builds/RoonServer_linuxx64_${urlVersion}.tar.bz2";
|
url = "http://download.roonlabs.com/builds/RoonServer_linuxx64_${urlVersion}.tar.bz2";
|
||||||
sha256 = "sha256-SeMSC7K6DV7rVr1w/SqMnLvipoWbypS/gJnSZmpfXZk=";
|
sha256 = "sha256-BoHvODaAcK5b4/syOm3vpOTpq9ETovpWKUqG+UGr2e0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
alsa-utils
|
|
||||||
cifs-utils
|
|
||||||
ffmpeg
|
|
||||||
freetype
|
freetype
|
||||||
zlib
|
krb5
|
||||||
|
stdenv.cc.cc.lib
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
propagatedBuildInputs = [ alsa-utils cifs-utils ffmpeg ];
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out
|
|
||||||
mv * $out
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup =
|
installPhase =
|
||||||
let
|
let
|
||||||
linkFix = bin: ''
|
# NB: While this might seem like odd behavior, it's what Roon expects. The
|
||||||
sed -i '/ulimit/d' ${bin}
|
# tarball distribution provides scripts that do a bunch of nonsense on top
|
||||||
sed -i '/ln -sf/d' ${bin}
|
# of what wrapBin is doing here, so consider it the lesser of two evils.
|
||||||
ln -sf $out/RoonMono/bin/mono-sgen $out/RoonMono/bin/${builtins.baseNameOf bin}
|
# I didn't bother checking whether the symlinks are really necessary, but
|
||||||
'';
|
# I wouldn't put it past Roon to have custom code based on the binary
|
||||||
wrapFix = bin: ''
|
# name, so we're playing it safe.
|
||||||
wrapProgram ${bin} --prefix PATH : ${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}
|
wrapBin = binPath: ''
|
||||||
|
(
|
||||||
|
binDir="$(dirname "${binPath}")"
|
||||||
|
binName="$(basename "${binPath}")"
|
||||||
|
dotnetDir="$out/RoonDotnet"
|
||||||
|
|
||||||
|
ln -sf "$dotnetDir/dotnet" "$dotnetDir/$binName"
|
||||||
|
rm "${binPath}"
|
||||||
|
makeWrapper "$dotnetDir/$binName" "${binPath}" \
|
||||||
|
--add-flags "$binDir/$binName.dll" \
|
||||||
|
--argv0 "$binName" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ icu66 openssl ]}" \
|
||||||
|
--prefix PATH : "$dotnetDir" \
|
||||||
|
--run "cd $binDir" \
|
||||||
|
--set DOTNET_ROOT "$dotnetDir"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
${linkFix "$out/Appliance/RAATServer"}
|
runHook preInstall
|
||||||
${linkFix "$out/Appliance/RoonAppliance"}
|
mkdir -p $out
|
||||||
${linkFix "$out/Server/RoonServer"}
|
mv * $out
|
||||||
|
|
||||||
sed -i '/which avconv/c\ WHICH_AVCONV=1' $out/check.sh
|
rm $out/check.sh
|
||||||
sed -i '/^check_ulimit/d' $out/check.sh
|
rm $out/start.sh
|
||||||
${wrapFix "$out/check.sh"}
|
rm $out/VERSION
|
||||||
${wrapFix "$out/start.sh"}
|
|
||||||
|
${wrapBin "$out/Appliance/RAATServer"}
|
||||||
|
${wrapBin "$out/Appliance/RoonAppliance"}
|
||||||
|
${wrapBin "$out/Server/RoonServer"}
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --run "cd $out"
|
||||||
|
|
||||||
|
# This is unused and depends on an ancient version of lttng-ust, so we
|
||||||
|
# just patch it out
|
||||||
|
patchelf --remove-needed liblttng-ust.so.0 $out/RoonDotnet/shared/Microsoft.NETCore.App/5.0.0/libcoreclrtraceptprovider.so
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue