2021-06-28 23:13:55 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, alsa-lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
, fetchurl
|
|
|
|
, flac
|
2021-07-24 12:14:16 +00:00
|
|
|
, gcc11
|
2021-06-28 23:13:55 +00:00
|
|
|
, lib
|
|
|
|
, libmicrohttpd
|
|
|
|
, llvmPackages_10
|
|
|
|
, qtcharts
|
|
|
|
, qtdeclarative
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtwebengine
|
|
|
|
, qtwebview
|
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hqplayer-desktop";
|
2021-07-24 12:14:16 +00:00
|
|
|
version = "4.12.2-36";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-24 12:14:16 +00:00
|
|
|
url = "https://www.signalyst.eu/bins/hqplayer/fc34/hqplayer4desktop-${version}.fc34.x86_64.rpm";
|
|
|
|
sha256 = "sha256-ng0Tkx6CSnzTxuunStaBhUYjxUmzx31ZaOY2gBWnH6Q=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${rpmextract}/bin/rpmextract $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook rpmextract ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
flac
|
2021-07-24 12:14:16 +00:00
|
|
|
gcc11.cc.lib
|
2021-06-28 23:13:55 +00:00
|
|
|
libmicrohttpd
|
|
|
|
llvmPackages_10.openmp
|
|
|
|
qtcharts
|
|
|
|
qtdeclarative
|
2021-07-24 12:14:16 +00:00
|
|
|
qtquickcontrols2
|
2021-06-28 23:13:55 +00:00
|
|
|
qtwebengine
|
|
|
|
qtwebview
|
|
|
|
wavpack
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
# main executable
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./usr/bin/* $out/bin
|
|
|
|
|
|
|
|
# desktop files
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp ./usr/share/applications/* $out/share/applications
|
|
|
|
|
|
|
|
# documentation
|
|
|
|
mkdir -p $out/share/doc/${pname}
|
|
|
|
cp ./usr/share/doc/hqplayer4desktop/* $out/share/doc/${pname}
|
|
|
|
|
|
|
|
# pixmaps
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
cp ./usr/share/pixmaps/* $out/share/pixmaps
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for desktopFile in $out/share/applications/*; do
|
|
|
|
substituteInPlace "$desktopFile" \
|
|
|
|
--replace /usr/bin/ $out/bin/ \
|
|
|
|
--replace /usr/share/doc/ $out/share/doc/
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchelf --replace-needed libomp.so.5 libomp.so $out/bin/.hqplayer4desktop-wrapped
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.signalyst.com/custom.html";
|
|
|
|
description = "High-end upsampling multichannel software HD-audio player";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|