2022-04-27 09:35:20 +00:00
|
|
|
{ stdenv, lib
|
2024-07-31 10:19:44 +00:00
|
|
|
, addDriverRunpath
|
2022-04-27 09:35:20 +00:00
|
|
|
, alsa-lib
|
2021-06-28 23:13:55 +00:00
|
|
|
, autoPatchelfHook
|
|
|
|
, cairo
|
|
|
|
, fetchurl
|
|
|
|
, flac
|
2022-08-12 12:06:08 +00:00
|
|
|
, gcc12
|
2021-06-28 23:13:55 +00:00
|
|
|
, gssdp
|
2022-04-27 09:35:20 +00:00
|
|
|
, gupnp
|
|
|
|
, gupnp-av
|
2022-01-23 02:10:13 +00:00
|
|
|
, lame
|
2021-06-28 23:13:55 +00:00
|
|
|
, libgmpris
|
2022-04-27 09:35:20 +00:00
|
|
|
, libusb-compat-0_1
|
2022-11-21 17:40:18 +00:00
|
|
|
, llvmPackages_14
|
2021-12-06 16:07:01 +00:00
|
|
|
, mpg123
|
2021-06-28 23:13:55 +00:00
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
, callPackage
|
|
|
|
, rygel ? null
|
|
|
|
}@inputs:
|
|
|
|
let
|
|
|
|
# FIXME: Replace with gnome.rygel once hqplayerd releases a new version.
|
|
|
|
rygel-hqplayerd = inputs.rygel or (callPackage ./rygel.nix { });
|
|
|
|
in
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hqplayerd";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.5.0-13";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://www.signalyst.eu/bins/${pname}/fc37/${pname}-${version}.fc37.x86_64.rpm";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-yfdgsQu2w56apq5lyD0JcEkM9/EtlfdZQ9I5x1BBOcU=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${rpmextract}/bin/rpmextract $src
|
|
|
|
'';
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
nativeBuildInputs = [ addDriverRunpath autoPatchelfHook rpmextract ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
cairo
|
|
|
|
flac
|
2022-08-12 12:06:08 +00:00
|
|
|
gcc12.cc.lib
|
2022-11-21 17:40:18 +00:00
|
|
|
rygel-hqplayerd
|
2021-06-28 23:13:55 +00:00
|
|
|
gssdp
|
2022-04-27 09:35:20 +00:00
|
|
|
gupnp
|
|
|
|
gupnp-av
|
2022-01-23 02:10:13 +00:00
|
|
|
lame
|
2021-06-28 23:13:55 +00:00
|
|
|
libgmpris
|
2022-04-27 09:35:20 +00:00
|
|
|
libusb-compat-0_1
|
2022-11-21 17:40:18 +00:00
|
|
|
llvmPackages_14.openmp
|
2021-12-06 16:07:01 +00:00
|
|
|
mpg123
|
2021-06-28 23:13:55 +00:00
|
|
|
wavpack
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# executables
|
|
|
|
mkdir -p $out
|
|
|
|
cp -rv ./usr/bin $out/bin
|
|
|
|
|
|
|
|
# libs
|
|
|
|
mkdir -p $out
|
|
|
|
cp -rv ./opt/hqplayerd/lib $out
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# configuration
|
|
|
|
mkdir -p $out/etc
|
|
|
|
cp -rv ./etc/hqplayer $out/etc/
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# systemd service file
|
2022-04-27 09:35:20 +00:00
|
|
|
mkdir -p $out/lib/systemd
|
|
|
|
cp -rv ./usr/lib/systemd/system $out/lib/systemd/
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# documentation
|
2022-04-27 09:35:20 +00:00
|
|
|
mkdir -p $out/share/doc
|
|
|
|
cp -rv ./usr/share/doc/hqplayerd $out/share/doc/
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# misc service support files
|
2022-04-27 09:35:20 +00:00
|
|
|
mkdir -p $out/var/lib
|
|
|
|
cp -rv ./var/lib/hqplayer $out/var/lib/
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace $out/lib/systemd/system/hqplayerd.service \
|
2021-08-05 21:33:18 +00:00
|
|
|
--replace /usr/bin/hqplayerd $out/bin/hqplayerd \
|
|
|
|
--replace "NetworkManager-wait-online.service" ""
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
# NB: addDriverRunpath needs to run _after_ autoPatchelfHook, which runs in
|
2021-10-28 06:52:43 +00:00
|
|
|
# postFixup, so we tack it on here.
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
2024-07-31 10:19:44 +00:00
|
|
|
addDriverRunpath $out/bin/hqplayerd
|
2021-10-28 06:52:43 +00:00
|
|
|
$out/bin/hqplayerd --version
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
passthru = {
|
|
|
|
rygel = rygel-hqplayerd;
|
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.signalyst.com/custom.html";
|
|
|
|
description = "High-end upsampling multichannel software embedded HD-audio player";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.unfree;
|
2022-04-27 09:35:20 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|