2021-06-10 07:40:27 +01:00
|
|
|
{ stdenv
|
|
|
|
, alsa-lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
, cairo
|
|
|
|
, fetchurl
|
|
|
|
, flac
|
2021-07-21 20:27:26 +01:00
|
|
|
, gcc11
|
2021-06-10 07:40:27 +01:00
|
|
|
, gnome
|
|
|
|
, gssdp
|
|
|
|
, gupnp
|
|
|
|
, lib
|
|
|
|
, libgmpris
|
|
|
|
, llvmPackages_10
|
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hqplayerd";
|
2021-07-21 20:27:26 +01:00
|
|
|
version = "4.24.2-63";
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 20:27:26 +01:00
|
|
|
url = "https://www.signalyst.eu/bins/${pname}/fc34/${pname}-${version}.fc34.x86_64.rpm";
|
|
|
|
sha256 = "sha256-6JUgHDO+S73n/IVQhkmC0Nw4GQVzTLtiBbz/wZiflRg=";
|
2021-06-10 07:40:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${rpmextract}/bin/rpmextract $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook rpmextract ];
|
|
|
|
|
|
|
|
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
|
|
|
|
gupnp
|
|
|
|
libgmpris
|
|
|
|
llvmPackages_10.openmp
|
|
|
|
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
|
|
|
|
|
|
|
|
# udev rules
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
|
|
|
cp ./etc/udev/rules.d/50-taudio2.rules $out/etc/udev/rules.d
|
|
|
|
|
|
|
|
# kernel module cfgs
|
|
|
|
mkdir -p $out/etc/modules-load.d
|
|
|
|
cp ./etc/modules-load.d/taudio2.conf $out/etc/modules-load.d
|
|
|
|
|
|
|
|
# systemd service file
|
|
|
|
mkdir -p $out/lib/systemd/system
|
|
|
|
cp ./usr/lib/systemd/system/hqplayerd.service $out/lib/systemd/system
|
|
|
|
|
|
|
|
# documentation
|
2021-06-13 23:12:55 +01:00
|
|
|
mkdir -p $out/share/doc/hqplayerd
|
|
|
|
cp ./usr/share/doc/hqplayerd/* $out/share/doc/hqplayerd
|
2021-06-10 07:40:27 +01:00
|
|
|
|
|
|
|
# misc service support files
|
2021-06-13 23:12:55 +01:00
|
|
|
mkdir -p $out/var/lib/hqplayerd
|
2021-07-21 20:27:26 +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 \
|
|
|
|
--replace /usr/bin/hqplayerd $out/bin/hqplayerd
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchelf --replace-needed libomp.so.5 libomp.so $out/bin/hqplayerd
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.signalyst.com/custom.html";
|
|
|
|
description = "High-end upsampling multichannel software embedded HD-audio player";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|