2021-06-10 07:40:27 +01:00
|
|
|
{ stdenv
|
|
|
|
, alsa-lib
|
2021-10-21 23:14:36 +01:00
|
|
|
, addOpenGLRunpath
|
2021-06-10 07:40:27 +01:00
|
|
|
, autoPatchelfHook
|
|
|
|
, cairo
|
|
|
|
, fetchurl
|
|
|
|
, flac
|
2021-07-21 20:27:26 +01:00
|
|
|
, gcc11
|
2021-06-10 07:40:27 +01:00
|
|
|
, gnome
|
|
|
|
, gssdp
|
2022-01-22 20:19:48 +00:00
|
|
|
, lame
|
2021-06-10 07:40:27 +01:00
|
|
|
, lib
|
|
|
|
, libgmpris
|
|
|
|
, llvmPackages_10
|
2021-11-04 22:32:34 +00:00
|
|
|
, mpg123
|
2021-06-10 07:40:27 +01:00
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
2021-10-25 19:31:18 +01:00
|
|
|
|
|
|
|
, gupnp
|
|
|
|
, gupnp-av
|
|
|
|
, meson
|
|
|
|
, ninja
|
2021-06-10 07:40:27 +01:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hqplayerd";
|
2022-03-11 18:31:33 +00:00
|
|
|
version = "4.30.3-87";
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-04-18 07:58:59 +01:00
|
|
|
url = "https://www.signalyst.eu/bins/${pname}/fc35/${pname}-${version}.fc35.x86_64.rpm";
|
|
|
|
hash = "sha256-fEze4aScWDwHDTXU0GatdopQf6FWcywWCGhR/7zXK7A=";
|
2021-06-10 07:40:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${rpmextract}/bin/rpmextract $src
|
|
|
|
'';
|
|
|
|
|
2021-10-21 23:14:36 +01:00
|
|
|
nativeBuildInputs = [ addOpenGLRunpath autoPatchelfHook rpmextract ];
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
cairo
|
|
|
|
flac
|
2021-07-21 20:27:26 +01:00
|
|
|
gcc11.cc.lib
|
2021-06-10 07:40:27 +01:00
|
|
|
gnome.rygel
|
|
|
|
gssdp
|
2022-04-18 07:58:59 +01:00
|
|
|
gupnp
|
|
|
|
gupnp-av
|
2022-01-22 20:19:48 +00:00
|
|
|
lame
|
2021-06-10 07:40:27 +01:00
|
|
|
libgmpris
|
|
|
|
llvmPackages_10.openmp
|
2021-11-04 22:32:34 +00:00
|
|
|
mpg123
|
2021-06-10 07:40:27 +01:00
|
|
|
wavpack
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-13 23:12:55 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-06-10 07:40:27 +01:00
|
|
|
# main executable
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./usr/bin/hqplayerd $out/bin
|
|
|
|
|
2021-08-04 18:18:24 +01:00
|
|
|
# main configuration
|
|
|
|
mkdir -p $out/etc/hqplayer
|
|
|
|
cp ./etc/hqplayer/hqplayerd.xml $out/etc/hqplayer/
|
|
|
|
|
2021-06-10 07:40:27 +01:00
|
|
|
# udev rules
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
2021-08-04 18:18:24 +01:00
|
|
|
cp ./etc/udev/rules.d/50-taudio2.rules $out/etc/udev/rules.d/
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
# kernel module cfgs
|
|
|
|
mkdir -p $out/etc/modules-load.d
|
2021-08-04 18:18:24 +01:00
|
|
|
cp ./etc/modules-load.d/taudio2.conf $out/etc/modules-load.d/
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
# systemd service file
|
|
|
|
mkdir -p $out/lib/systemd/system
|
2021-08-04 18:18:24 +01:00
|
|
|
cp ./usr/lib/systemd/system/hqplayerd.service $out/lib/systemd/system/
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
# documentation
|
2021-06-13 23:12:55 +01:00
|
|
|
mkdir -p $out/share/doc/hqplayerd
|
2021-08-04 18:18:24 +01:00
|
|
|
cp ./usr/share/doc/hqplayerd/* $out/share/doc/hqplayerd/
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
# misc service support files
|
2021-07-22 17:28:51 +01:00
|
|
|
mkdir -p $out/var/lib/hqplayer
|
2021-08-04 18:18:24 +01:00
|
|
|
cp -r ./var/lib/hqplayer/web $out/var/lib/hqplayer
|
2021-06-13 23:12:55 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-06-10 07:40:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace $out/lib/systemd/system/hqplayerd.service \
|
2021-08-04 19:27:02 +01:00
|
|
|
--replace /usr/bin/hqplayerd $out/bin/hqplayerd \
|
|
|
|
--replace "NetworkManager-wait-online.service" ""
|
2021-06-10 07:40:27 +01:00
|
|
|
'';
|
|
|
|
|
2021-10-21 23:14:36 +01:00
|
|
|
# NB: addOpenGLRunpath needs to run _after_ autoPatchelfHook, which runs in
|
|
|
|
# postFixup, so we tack it on here.
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
addOpenGLRunpath $out/bin/hqplayerd
|
|
|
|
$out/bin/hqplayerd --version
|
2021-06-10 07:40:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.signalyst.com/custom.html";
|
|
|
|
description = "High-end upsampling multichannel software embedded HD-audio player";
|
|
|
|
license = licenses.unfree;
|
2022-03-22 17:59:05 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-06-10 07:40:27 +01:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|