nomachine-client: Fix audio support

libnxcau.so needs libpulse.so.0 for audio to work, but doesn't
have a DT_NEEDED entry for it, so it's not automatically
detected. This adds the missing entry and libpulseaudio to
buildInputs, enabling autoPatchelfHook to fix the RPATH.
This commit is contained in:
talyz 2018-12-19 14:14:09 +01:00
parent 1fc12ef702
commit aaf353e7ad

View file

@ -1,4 +1,5 @@
{ stdenv, lib, file, fetchurl, makeWrapper, autoPatchelfHook, jsoncpp }:
{ stdenv, lib, file, fetchurl, makeWrapper,
autoPatchelfHook, jsoncpp, libpulseaudio }:
let
versionMajor = "6.4";
versionMinor = "6_1";
@ -31,7 +32,7 @@ in
'';
nativeBuildInputs = [ file makeWrapper autoPatchelfHook ];
buildInputs = [ jsoncpp ];
buildInputs = [ jsoncpp libpulseaudio ];
installPhase = ''
rm bin/nxplayer bin/nxclient
@ -63,6 +64,10 @@ in
postFixup = ''
makeWrapper $out/bin/nxplayer.bin $out/bin/nxplayer --set NX_SYSTEM $out/NX
makeWrapper $out/bin/nxclient.bin $out/bin/nxclient --set NX_SYSTEM $out/NX
# libnxcau.so needs libpulse.so.0 for audio to work, but doesn't
# have a DT_NEEDED entry for it.
patchelf --add-needed libpulse.so.0 $out/NX/lib/libnxcau.so
'';
dontBuild = true;