2021-06-28 23:13:55 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, alsa-lib
|
|
|
|
, autoPatchelfHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, evince
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchurl
|
|
|
|
, flac
|
2023-05-24 13:37:59 +00:00
|
|
|
, gcc12
|
2021-06-28 23:13:55 +00:00
|
|
|
, lib
|
|
|
|
, libmicrohttpd
|
2023-05-24 13:37:59 +00:00
|
|
|
, libusb-compat-0_1
|
2024-02-07 01:22:34 +00:00
|
|
|
, llvmPackages
|
2021-06-28 23:13:55 +00:00
|
|
|
, qtcharts
|
|
|
|
, qtdeclarative
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtwebengine
|
|
|
|
, qtwebview
|
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hqplayer-desktop";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "4.22.0-65";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-05-24 13:37:59 +00:00
|
|
|
url = "https://www.signalyst.eu/bins/hqplayer4desktop-${version}.fc36.x86_64.rpm";
|
|
|
|
sha256 = "sha256-PA8amsqy4O9cMruNYVhG+uBiUGQ5WfnZC2ARppmZd7g=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
${rpmextract}/bin/rpmextract "$src"
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook rpmextract ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
flac
|
2023-05-24 13:37:59 +00:00
|
|
|
gcc12.cc.lib
|
2021-06-28 23:13:55 +00:00
|
|
|
libmicrohttpd
|
2023-05-24 13:37:59 +00:00
|
|
|
libusb-compat-0_1
|
2024-02-07 01:22:34 +00:00
|
|
|
llvmPackages.openmp
|
2021-06-28 23:13:55 +00:00
|
|
|
qtcharts
|
|
|
|
qtdeclarative
|
2021-07-24 12:14:16 +00:00
|
|
|
qtquickcontrols2
|
2021-06-28 23:13:55 +00:00
|
|
|
qtwebengine
|
|
|
|
qtwebview
|
|
|
|
wavpack
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
dontPatch = true;
|
2021-06-28 23:13:55 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# additional library
|
|
|
|
mkdir -p "$out"/lib
|
|
|
|
mv ./opt/hqplayer4desktop/lib/* "$out"/lib
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# main executable
|
|
|
|
mkdir -p "$out"/bin
|
|
|
|
mv ./usr/bin/* "$out"/bin
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# documentation
|
2023-05-24 13:37:59 +00: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-28 23:13:55 +00:00
|
|
|
|
|
|
|
# pixmaps
|
2023-05-24 13:37:59 +00:00
|
|
|
mkdir -p "$out/share/pixmaps"
|
|
|
|
mv ./usr/share/pixmaps/* "$out/share/pixmaps"
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# doc has dependencies on evince that is not required by main app
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postInstall = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
for desktopFile in $out/share/applications/hqplayer4{desktop-nostyle,desktop-highdpi,-client,desktop}.desktop; do
|
2021-06-28 23:13:55 +00:00
|
|
|
substituteInPlace "$desktopFile" \
|
2023-05-24 13:37:59 +00:00
|
|
|
--replace /usr/bin "$out"/bin
|
2021-06-28 23:13:55 +00:00
|
|
|
done
|
2023-05-24 13:37:59 +00:00
|
|
|
substituteInPlace "$doc/share/applications/hqplayer4desktop-manual.desktop" \
|
|
|
|
--replace /usr/share/doc/hqplayer4desktop "$doc/share/doc/${pname}" \
|
|
|
|
--replace evince "${evince}/bin/evince"
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
patchelf --replace-needed libomp.so.5 libomp.so "$out/bin/.hqplayer4desktop-wrapped"
|
2021-06-28 23:13:55 +00: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-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-04-27 09:35:20 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|