2021-06-10 08:41:34 +02:00
|
|
|
{ mkDerivation
|
|
|
|
, alsa-lib
|
|
|
|
, autoPatchelfHook
|
2023-05-05 01:33:34 +02:00
|
|
|
, evince
|
2021-06-10 08:41:34 +02:00
|
|
|
, fetchurl
|
|
|
|
, flac
|
2023-05-05 01:33:34 +02:00
|
|
|
, gcc12
|
2021-06-10 08:41:34 +02:00
|
|
|
, lib
|
|
|
|
, libmicrohttpd
|
2023-05-05 01:33:34 +02:00
|
|
|
, libusb-compat-0_1
|
2021-06-10 08:41:34 +02:00
|
|
|
, llvmPackages_10
|
|
|
|
, qtcharts
|
|
|
|
, qtdeclarative
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtwebengine
|
|
|
|
, qtwebview
|
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hqplayer-desktop";
|
2023-05-05 01:33:34 +02:00
|
|
|
version = "4.22.0-65";
|
2021-06-10 08:41:34 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-05-05 01:33:34 +02:00
|
|
|
url = "https://www.signalyst.eu/bins/hqplayer4desktop-${version}.fc36.x86_64.rpm";
|
|
|
|
sha256 = "sha256-PA8amsqy4O9cMruNYVhG+uBiUGQ5WfnZC2ARppmZd7g=";
|
2021-06-10 08:41:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2023-05-05 01:33:34 +02:00
|
|
|
${rpmextract}/bin/rpmextract "$src"
|
2021-06-10 08:41:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook rpmextract ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
flac
|
2023-05-05 01:33:34 +02:00
|
|
|
gcc12.cc.lib
|
2021-06-10 08:41:34 +02:00
|
|
|
libmicrohttpd
|
2023-05-05 01:33:34 +02:00
|
|
|
libusb-compat-0_1
|
2021-06-10 08:41:34 +02:00
|
|
|
llvmPackages_10.openmp
|
|
|
|
qtcharts
|
|
|
|
qtdeclarative
|
2021-07-21 21:08:58 +02:00
|
|
|
qtquickcontrols2
|
2021-06-10 08:41:34 +02:00
|
|
|
qtwebengine
|
|
|
|
qtwebview
|
|
|
|
wavpack
|
|
|
|
];
|
|
|
|
|
2023-05-05 01:33:34 +02:00
|
|
|
dontPatch = true;
|
2021-06-10 08:41:34 +02:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-16 22:44:27 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2023-05-05 01:33:34 +02:00
|
|
|
# additional library
|
|
|
|
mkdir -p "$out"/lib
|
|
|
|
mv ./opt/hqplayer4desktop/lib/* "$out"/lib
|
2021-06-10 08:41:34 +02:00
|
|
|
|
2023-05-05 01:33:34 +02:00
|
|
|
# main executable
|
|
|
|
mkdir -p "$out"/bin
|
|
|
|
mv ./usr/bin/* "$out"/bin
|
2021-06-10 08:41:34 +02:00
|
|
|
|
|
|
|
# documentation
|
2023-05-05 01:33:34 +02:00
|
|
|
mkdir -p "$doc/share/doc/${pname}" "$doc/share/applications"
|
|
|
|
mv ./usr/share/doc/hqplayer4desktop/* "$doc/share/doc/${pname}"
|
|
|
|
mv ./usr/share/applications/hqplayer4desktop-manual.desktop "$doc/share/applications"
|
|
|
|
|
|
|
|
# desktop files
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
mv ./usr/share/applications/* "$out/share/applications"
|
2021-06-10 08:41:34 +02:00
|
|
|
|
|
|
|
# pixmaps
|
2023-05-05 01:33:34 +02:00
|
|
|
mkdir -p "$out/share/pixmaps"
|
|
|
|
mv ./usr/share/pixmaps/* "$out/share/pixmaps"
|
2021-06-16 22:44:27 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-06-10 08:41:34 +02:00
|
|
|
'';
|
|
|
|
|
2023-05-05 01:33:34 +02:00
|
|
|
# doc has dependencies on evince that is not required by main app
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
2021-06-10 08:41:34 +02:00
|
|
|
postInstall = ''
|
2023-05-05 01:33:34 +02:00
|
|
|
for desktopFile in $out/share/applications/hqplayer4{desktop-nostyle,desktop-highdpi,-client,desktop}.desktop; do
|
2021-06-10 08:41:34 +02:00
|
|
|
substituteInPlace "$desktopFile" \
|
2023-05-05 01:33:34 +02:00
|
|
|
--replace /usr/bin "$out"/bin
|
2021-06-10 08:41:34 +02:00
|
|
|
done
|
2023-05-05 01:33:34 +02:00
|
|
|
substituteInPlace "$doc/share/applications/hqplayer4desktop-manual.desktop" \
|
|
|
|
--replace /usr/share/doc/hqplayer4desktop "$doc/share/doc/${pname}" \
|
|
|
|
--replace evince "${evince}/bin/evince"
|
2021-06-10 08:41:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2023-05-05 01:33:34 +02:00
|
|
|
patchelf --replace-needed libomp.so.5 libomp.so "$out/bin/.hqplayer4desktop-wrapped"
|
2021-06-10 08:41:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.signalyst.com/custom.html";
|
|
|
|
description = "High-end upsampling multichannel software HD-audio player";
|
|
|
|
license = licenses.unfree;
|
2022-06-05 00:19:25 +02:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-03-22 18:59:05 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-06-10 08:41:34 +02:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|