Merge pull request #87797 from plumelo/feature/nomachine-client-6.10.12

nomachine-client: 6.9.2 -> 6.10.12
This commit is contained in:
Kim Lindberger 2020-05-14 22:48:41 +02:00 committed by GitHub
commit 4f7a8b4b37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,29 +1,29 @@
{ stdenv, file, fetchurl, makeWrapper,
autoPatchelfHook, jsoncpp, libpulseaudio }:
let
versionMajor = "6.9";
versionMinor = "2";
versionMajor = "6.10";
versionMinor = "12";
versionBuild_x86_64 = "1";
versionBuild_i686 = "1";
in
stdenv.mkDerivation rec {
pname = "nomachine-client";
version = "${versionMajor}.${versionMinor}";
src =
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_${versionBuild_x86_64}_x86_64.tar.gz";
sha256 = "1z2pcfkzicjma4lxrj4qx43xyml993v7qyjd7k8xy8hw85fwnzii";
sha256 = "17yb377ry7i7cmkb72xmhyqkfggv1ygqlz55ymvmrs7psbh7ql01";
}
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_${versionBuild_i686}_i686.tar.gz";
sha256 = "03421s0k91c02ga9k6bdvixw71brlgi13q82cinnfayg3fhb0rb6";
sha256 = "0k6dspmwdkm0zf0c2zqlqy0jya8qgsg90wwv9wa12fn4chp66gqg";
}
else
throw "NoMachine client is not supported on ${stdenv.hostPlatform.system}";
postUnpack = ''
mv $(find . -type f -name nxclient.tar.gz) .
mv $(find . -type f -name nxplayer.tar.gz) .
@ -32,7 +32,7 @@ in
tar xf nxplayer.tar.gz
rm $(find . -maxdepth 1 -type f)
'';
nativeBuildInputs = [ file makeWrapper autoPatchelfHook ];
buildInputs = [ jsoncpp libpulseaudio ];
@ -50,7 +50,7 @@ in
cp "$i"/* "$out/share/icons/hicolor/$(basename $i)/apps/"
fi
done
mkdir $out/share/applications
cp share/applnk/player/xdg/*.desktop $out/share/applications/
cp share/applnk/client/xdg-mime/*.desktop $out/share/applications/
@ -62,7 +62,7 @@ in
substituteInPlace "$i" --replace /usr/NX/bin $out/bin
done
'';
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
@ -71,7 +71,7 @@ in
# have a DT_NEEDED entry for it.
patchelf --add-needed libpulse.so.0 $out/NX/lib/libnxcau.so
'';
dontBuild = true;
dontStrip = true;
@ -87,4 +87,4 @@ in
platforms = [ "x86_64-linux" "i686-linux" ];
};
}