Merge pull request #142524 from lovesegfault/hqplayerd-gpu-fixes

hqplayerd: add OpenGL to runpath
This commit is contained in:
Bernardo Meurer 2021-10-22 15:58:43 -07:00 committed by GitHub
commit 8a4a0a7669
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
{ stdenv
, alsa-lib
, addOpenGLRunpath
, autoPatchelfHook
, cairo
, fetchurl
@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
${rpmextract}/bin/rpmextract $src
'';
nativeBuildInputs = [ autoPatchelfHook rpmextract ];
nativeBuildInputs = [ addOpenGLRunpath autoPatchelfHook rpmextract ];
buildInputs = [
alsa-lib
@ -86,8 +87,12 @@ stdenv.mkDerivation rec {
--replace "NetworkManager-wait-online.service" ""
'';
postFixup = ''
patchelf --replace-needed libomp.so.5 libomp.so $out/bin/hqplayerd
# 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
'';
meta = with lib; {