1 { lib, stdenv, fetchurl, autoPatchelfHook, rpmextract, libX11, libXext }:
3 stdenv.mkDerivation rec {
4 pname = "realvnc-vnc-viewer";
8 "x86_64-linux" = fetchurl {
9 url = "https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-${version}-Linux-x64.rpm";
10 sha256 = "1l9kfmb1695pv2v9hm8z5yr7y5yhadbbs61s4yf9ksvvfypzwrpn";
12 "i686-linux" = fetchurl {
13 url = "https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-${version}-Linux-x86.rpm";
14 sha256 = "15fi1siwbsxmy7qi6f8r8ym346a8mx3kqcp9mvwvx39wm3ija6dh";
16 }.${stdenv.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
18 nativeBuildInputs = [ autoPatchelfHook rpmextract ];
19 buildInputs = [ libX11 libXext ];
26 substituteInPlace ./usr/share/applications/realvnc-vncviewer.desktop \
27 --replace /usr/share/icons/hicolor/48x48/apps/vncviewer48x48.png vncviewer48x48.png
28 substituteInPlace ./usr/share/mimelnk/application/realvnc-vncviewer-mime.desktop \
29 --replace /usr/share/icons/hicolor/48x48/apps/vncviewer48x48.png vncviewer48x48.png
41 description = "VNC remote desktop client software by RealVNC";
42 homepage = "https://www.realvnc.com/en/connect/download/viewer/";
43 mainProgram = "vncviewer";
44 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
46 fullName = "VNC Connect End User License Agreement";
47 url = "https://static.realvnc.com/media/documents/LICENSE-4.0a_en.pdf";
50 maintainers = with maintainers; [ emilytrau ];
51 platforms = [ "x86_64-linux" "i686-linux" ];