Merge pull request #52522 from talyz/master

nomachine-client: Fix audio support and update 6.3.6_1 -> 6.4.6_1
This commit is contained in:
Renaud 2018-12-19 16:17:42 +01:00 committed by GitHub
commit 42d37e45d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
{ stdenv, lib, file, fetchurl, makeWrapper, autoPatchelfHook, jsoncpp }:
{ stdenv, lib, file, fetchurl, makeWrapper,
autoPatchelfHook, jsoncpp, libpulseaudio }:
let
versionMajor = "6.3";
versionMajor = "6.4";
versionMinor = "6_1";
in
stdenv.mkDerivation rec {
@ -11,12 +12,12 @@ in
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_x86_64.tar.gz";
sha256 = "1035j2z2rqmdfb8cfm1pakd05c575640604b8lkljmilpky9mw5d";
sha256 = "141pv277kl5ij1pmc0iadc0hnslxri2qaqvsjkmmvls4432jh0yi";
}
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_i686.tar.gz";
sha256 = "07j9f6mlq9m01ch8ik5dybi283vrp5dlv156jr5n7n2chzk34kf3";
sha256 = "0a2vi4ygw34yw8rcjhw17mqx5qbjnym4jkap8paik8lisb5mhnyj";
}
else
throw "NoMachine client is not supported on ${stdenv.hostPlatform.system}";
@ -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;