2021-06-10 08:41:34 +02:00
|
|
|
{ mkDerivation
|
|
|
|
, alsa-lib
|
|
|
|
, autoPatchelfHook
|
|
|
|
, fetchurl
|
|
|
|
, flac
|
|
|
|
, lib
|
|
|
|
, libmicrohttpd
|
|
|
|
, llvmPackages_10
|
|
|
|
, qtcharts
|
|
|
|
, qtdeclarative
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtwebengine
|
|
|
|
, qtwebview
|
|
|
|
, rpmextract
|
|
|
|
, wavpack
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hqplayer-desktop";
|
2021-06-16 22:44:43 +02:00
|
|
|
version = "4.12.1-35";
|
2021-06-10 08:41:34 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-16 22:44:43 +02:00
|
|
|
# FIXME: use the fc34 sources when we get glibc 2.33 in nixpkgs
|
|
|
|
# c.f. https://github.com/NixOS/nixpkgs/pull/111616
|
2021-06-10 08:41:34 +02:00
|
|
|
url = "https://www.signalyst.eu/bins/hqplayer/fc33/hqplayer4desktop-${version}.fc33.x86_64.rpm";
|
2021-06-16 22:44:43 +02:00
|
|
|
sha256 = "sha256-DLnZNX+uAan9dhPLMvINeXsIn3Yv2CgsvyTcX0hbEK8=";
|
2021-06-10 08:41:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
${rpmextract}/bin/rpmextract $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook rpmextract ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
flac
|
|
|
|
libmicrohttpd
|
|
|
|
llvmPackages_10.openmp
|
|
|
|
qtquickcontrols2
|
|
|
|
qtcharts
|
|
|
|
qtdeclarative
|
|
|
|
qtwebengine
|
|
|
|
qtwebview
|
|
|
|
wavpack
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-16 22:44:27 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-06-10 08:41:34 +02:00
|
|
|
# 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
|
2021-06-16 22:44:27 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-06-10 08:41:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for desktopFile in $out/share/applications/*; do
|
|
|
|
substituteInPlace "$desktopFile" \
|
2021-06-16 22:51:47 +02:00
|
|
|
--replace /usr/bin/ $out/bin/ \
|
|
|
|
--replace /usr/share/doc/ $out/share/doc/
|
2021-06-10 08:41:34 +02:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|