2021-06-28 23:13:55 +00:00
|
|
|
{ stdenv
|
|
|
|
, alsa-lib
|
2021-10-28 06:52:43 +00:00
|
|
|
, addOpenGLRunpath
|
2021-06-28 23:13:55 +00:00
|
|
|
, autoPatchelfHook
|
|
|
|
, cairo
|
|
|
|
, fetchurl
|
|
|
|
, flac
|
2021-07-24 12:14:16 +00:00
|
|
|
, gcc11
|
2021-06-28 23:13:55 +00:00
|
|
|
, gnome
|
|
|
|
, gssdp
|
|
|
|
, lib
|
|
|
|
, libgmpris
|
|
|
|
, llvmPackages_10
|
2021-12-06 16:07:01 +00:00
|
|
|
, mpg123
|
2021-06-28 23:13:55 +00:00
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
, gupnp
|
|
|
|
, gupnp-av
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
# hqplayerd relies on some package versions available for the fc34 release,
|
|
|
|
# which has out-of-date pkgs compared to nixpkgs. The following drvs
|
|
|
|
# can/should be removed when the fc35 hqplayer rpm is made available.
|
|
|
|
gupnp_1_2 = gupnp.overrideAttrs (old: rec {
|
|
|
|
pname = "gupnp";
|
|
|
|
version = "1.2.7";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/gupnp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "sha256-hEEnbxr9AXbm9ZUCajpQfu0YCav6BAJrrT8hYis1I+w=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
gupnp-av_0_12 = gupnp-av.overrideAttrs (old: rec {
|
|
|
|
pname = "gupnp-av";
|
|
|
|
version = "0.12.11";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "sha256-aJ3PFJKriZHa6ikTZaMlSKd9GiKU2FszYitVzKnOb9w=";
|
|
|
|
};
|
|
|
|
nativeBuildInputs = lib.subtractLists [ meson ninja ] old.nativeBuildInputs;
|
|
|
|
});
|
|
|
|
in
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hqplayerd";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "4.27.2-72";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://www.signalyst.eu/bins/${pname}/fc34/${pname}-${version}sse42.fc34.x86_64.rpm";
|
|
|
|
sha256 = "sha256-oCZS68n9R6Hm6lltcL6zQhPaU9FRqtB59DrstRNjnH8=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${rpmextract}/bin/rpmextract $src
|
|
|
|
'';
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
nativeBuildInputs = [ addOpenGLRunpath autoPatchelfHook rpmextract ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
cairo
|
|
|
|
flac
|
2021-07-24 12:14:16 +00:00
|
|
|
gcc11.cc.lib
|
2021-06-28 23:13:55 +00:00
|
|
|
gnome.rygel
|
|
|
|
gssdp
|
2021-10-28 06:52:43 +00:00
|
|
|
gupnp_1_2
|
|
|
|
gupnp-av_0_12
|
2021-06-28 23:13:55 +00:00
|
|
|
libgmpris
|
|
|
|
llvmPackages_10.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
|
|
|
|
|
|
|
|
# main executable
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./usr/bin/hqplayerd $out/bin
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
# main configuration
|
|
|
|
mkdir -p $out/etc/hqplayer
|
|
|
|
cp ./etc/hqplayer/hqplayerd.xml $out/etc/hqplayer/
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# udev rules
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
2021-08-05 21:33:18 +00:00
|
|
|
cp ./etc/udev/rules.d/50-taudio2.rules $out/etc/udev/rules.d/
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# kernel module cfgs
|
|
|
|
mkdir -p $out/etc/modules-load.d
|
2021-08-05 21:33:18 +00:00
|
|
|
cp ./etc/modules-load.d/taudio2.conf $out/etc/modules-load.d/
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# systemd service file
|
|
|
|
mkdir -p $out/lib/systemd/system
|
2021-08-05 21:33:18 +00:00
|
|
|
cp ./usr/lib/systemd/system/hqplayerd.service $out/lib/systemd/system/
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# documentation
|
|
|
|
mkdir -p $out/share/doc/hqplayerd
|
2021-08-05 21:33:18 +00:00
|
|
|
cp ./usr/share/doc/hqplayerd/* $out/share/doc/hqplayerd/
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# misc service support files
|
2021-08-05 21:33:18 +00:00
|
|
|
mkdir -p $out/var/lib/hqplayer
|
2021-07-24 12:14:16 +00:00
|
|
|
cp -r ./var/lib/hqplayer/web $out/var/lib/hqplayer
|
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
|
|
|
'';
|
|
|
|
|
2021-10-28 06:52:43 +00: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-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";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|