2021-06-10 04:57:09 +02:00
|
|
|
{ alsa-lib
|
2021-06-10 06:10:52 +02:00
|
|
|
, alsa-utils
|
2020-07-23 20:37:52 +02:00
|
|
|
, autoPatchelfHook
|
|
|
|
, cifs-utils
|
|
|
|
, fetchurl
|
|
|
|
, ffmpeg
|
|
|
|
, freetype
|
2021-11-04 17:37:07 +01:00
|
|
|
, icu66
|
|
|
|
, krb5
|
2020-07-23 20:37:52 +02:00
|
|
|
, lib
|
2021-12-26 17:39:41 +01:00
|
|
|
, libtasn1
|
2022-03-29 20:55:29 +02:00
|
|
|
, lttng-ust_2_12
|
2020-07-23 20:37:52 +02:00
|
|
|
, makeWrapper
|
2021-11-04 17:37:07 +01:00
|
|
|
, openssl
|
2022-03-29 20:55:29 +02:00
|
|
|
, stdenv
|
2021-09-27 23:03:55 +02:00
|
|
|
}:
|
2022-07-27 18:12:11 +02:00
|
|
|
let
|
2023-01-23 21:47:02 +01:00
|
|
|
version = "2.0-1193";
|
2022-07-27 18:12:11 +02:00
|
|
|
urlVersion = builtins.replaceStrings [ "." "-" ] [ "00" "0" ] version;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2021-06-10 08:04:56 +02:00
|
|
|
pname = "roon-server";
|
2022-07-27 18:12:11 +02:00
|
|
|
inherit version;
|
2019-06-21 20:58:20 +02:00
|
|
|
|
2022-07-27 18:12:11 +02:00
|
|
|
src = fetchurl {
|
2022-10-05 18:16:18 +02:00
|
|
|
url = "https://download.roonlabs.com/updates/production/RoonServer_linuxx64_${urlVersion}.tar.bz2";
|
2023-01-23 21:47:02 +01:00
|
|
|
hash = "sha256-yvM4mEFBelT8Nox0vzI4tlQbxDUkoMAB6q8l5LW8+b4=";
|
2022-07-27 18:12:11 +02:00
|
|
|
};
|
2019-06-21 20:58:20 +02:00
|
|
|
|
2021-12-26 17:46:30 +01:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
2020-07-23 20:37:52 +02:00
|
|
|
buildInputs = [
|
2021-06-10 04:57:09 +02:00
|
|
|
alsa-lib
|
2020-07-23 20:37:52 +02:00
|
|
|
freetype
|
2021-11-04 17:37:07 +01:00
|
|
|
krb5
|
2021-12-26 17:39:41 +01:00
|
|
|
libtasn1
|
2022-03-29 20:55:29 +02:00
|
|
|
lttng-ust_2_12
|
2021-11-04 17:37:07 +01:00
|
|
|
stdenv.cc.cc.lib
|
2020-07-23 20:37:52 +02:00
|
|
|
];
|
2019-06-21 20:58:20 +02:00
|
|
|
|
2020-07-23 20:37:52 +02:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
2019-06-21 20:58:20 +02:00
|
|
|
|
2021-11-04 17:37:07 +01:00
|
|
|
installPhase =
|
2020-07-23 20:37:52 +02:00
|
|
|
let
|
2021-11-04 17:37:07 +01:00
|
|
|
# NB: While this might seem like odd behavior, it's what Roon expects. The
|
|
|
|
# tarball distribution provides scripts that do a bunch of nonsense on top
|
|
|
|
# of what wrapBin is doing here, so consider it the lesser of two evils.
|
|
|
|
# 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
|
|
|
|
# name, so we're playing it safe.
|
|
|
|
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" \
|
2021-11-16 07:29:58 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ alsa-lib icu66 ffmpeg openssl ]}" \
|
2021-11-04 17:37:07 +01:00
|
|
|
--prefix PATH : "$dotnetDir" \
|
2021-11-10 07:31:08 +01:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ alsa-utils cifs-utils ffmpeg ]}" \
|
2022-03-14 19:06:00 +01:00
|
|
|
--chdir "$binDir" \
|
2021-11-04 17:37:07 +01:00
|
|
|
--set DOTNET_ROOT "$dotnetDir"
|
|
|
|
)
|
2020-07-23 20:37:52 +02:00
|
|
|
'';
|
|
|
|
in
|
|
|
|
''
|
2021-11-04 17:37:07 +01:00
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
mv * $out
|
|
|
|
|
|
|
|
rm $out/check.sh
|
|
|
|
rm $out/start.sh
|
|
|
|
rm $out/VERSION
|
|
|
|
|
|
|
|
${wrapBin "$out/Appliance/RAATServer"}
|
|
|
|
${wrapBin "$out/Appliance/RoonAppliance"}
|
|
|
|
${wrapBin "$out/Server/RoonServer"}
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
2022-03-14 19:06:00 +01:00
|
|
|
makeWrapper "$out/Server/RoonServer" "$out/bin/RoonServer" --chdir "$out"
|
2021-11-04 17:37:07 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-07-23 20:37:52 +02:00
|
|
|
'';
|
2019-06-21 20:58:20 +02:00
|
|
|
|
2020-07-23 20:37:52 +02:00
|
|
|
meta = with lib; {
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "The music player for music lovers";
|
2021-06-10 08:04:56 +02:00
|
|
|
changelog = "https://community.roonlabs.com/c/roon/software-release-notes/18";
|
2020-07-23 20:37:52 +02:00
|
|
|
homepage = "https://roonlabs.com";
|
2022-06-11 13:39:29 +02:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-07-23 20:37:52 +02:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault steell ];
|
2021-09-28 19:59:03 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-06-21 20:58:20 +02:00
|
|
|
};
|
|
|
|
}
|