Merge pull request #110780 from buckley310/vmwareview

vmware-horizon-client: 2006 -> 2012

authored by

Sandro and committed by
GitHub
a17a03e6 27df874f

+113 -16
+86 -16
pkgs/applications/networking/remote/vmware-horizon-client/default.nix
··· 1 - { lib, stdenv, buildFHSUserEnv, fetchurl, makeWrapper, makeDesktopItem, libxslt, atk 2 - , fontconfig, freetype, gdk-pixbuf, glib, gtk2, libudev0-shim, libxml2 3 - , pango, pixman, libX11, libXext, libXinerama, libXrandr , libXrender 4 - , libXtst, libXcursor, libXi, libxkbfile , libXScrnSaver, zlib, liberation_ttf 5 - , libtiff, dbus, at-spi2-atk, harfbuzz, gtk3-x11, libuuid, pcsclite 6 }: 7 - 8 let 9 - version = "2006"; 10 11 sysArch = 12 if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 13 else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 14 - # The downloaded archive also contains i386 and ARM binaries, but these have not been tested. 15 16 vmwareHorizonClientFiles = stdenv.mkDerivation { 17 name = "vmwareHorizonClientFiles"; 18 inherit version; 19 src = fetchurl { 20 - url = https://download3.vmware.com/software/view/viewclients/CART21FQ2/vmware-view-client-linux-2006-8.0.0-16522670.tar.gz; 21 - sha256 = "8c46d49fea42f8c1f7cf32a5f038f5a47d2b304743b1e4f4c68c658621b0e79c"; 22 }; 23 buildInputs = [ makeWrapper ]; 24 installPhase = '' ··· 30 # when it cannot detect a new enough version already present on the system. 31 # The checks are distribution-specific and do not function correctly on NixOS. 32 # Deleting the bundled library is the simplest way to force it to use our version. 33 - rm -f "$out/lib/vmware/gcc/libstdc++.so.6" 34 35 # Force the default GTK theme (Adwaita) because Horizon is prone to 36 # UI usability issues when using non-default themes, such as Adwaita-dark. 37 makeWrapper "$out/bin/vmware-view" "$out/bin/vmware-view_wrapper" \ 38 --set GTK_THEME Adwaita \ 39 --suffix LD_LIBRARY_PATH : "$out/lib/vmware/view/crtbora:$out/lib/vmware" 40 ''; 41 }; ··· 46 runScript = "${vmwareHorizonClientFiles}/bin/vmware-view_wrapper"; 47 48 targetPkgs = pkgs: [ 49 - pcsclite dbus vmwareHorizonClientFiles atk fontconfig freetype gdk-pixbuf glib gtk2 50 - libudev0-shim libxml2 pango pixman liberation_ttf libX11 libXext libXinerama 51 - libXrandr libXrender libXtst libXcursor libXi libxkbfile at-spi2-atk libXScrnSaver 52 - zlib libtiff harfbuzz gtk3-x11 libuuid 53 ]; 54 }; 55 ··· 61 mimeType = "x-scheme-handler/vmware-view"; 62 }; 63 64 - in stdenv.mkDerivation { 65 name = "vmware-view"; 66 dontUnpack = true; 67 installPhase = '' 68 mkdir -p $out/bin $out/share/applications 69 cp "${desktopItem}"/share/applications/* $out/share/applications/ 70 ln -s "${vmwareFHSUserEnv}/bin/vmware-view" "$out/bin/" 71 ''; 72 73 meta = with lib; { 74 description = "Allows you to connect to your VMware Horizon virtual desktop";
··· 1 + { stdenv 2 + , lib 3 + , at-spi2-atk 4 + , atk 5 + , buildFHSUserEnv 6 + , dbus 7 + , fetchurl 8 + , fontconfig 9 + , freetype 10 + , gdk-pixbuf 11 + , glib 12 + , gsettings-desktop-schemas 13 + , gtk2 14 + , gtk3-x11 15 + , harfbuzz 16 + , liberation_ttf 17 + , libjpeg 18 + , libtiff 19 + , libudev0-shim 20 + , libuuid 21 + , libX11 22 + , libXcursor 23 + , libXext 24 + , libXi 25 + , libXinerama 26 + , libxkbfile 27 + , libxml2 28 + , libXrandr 29 + , libXrender 30 + , libXScrnSaver 31 + , libxslt 32 + , libXtst 33 + , makeDesktopItem 34 + , makeWrapper 35 + , pango 36 + , pcsclite 37 + , pixman 38 + , zlib 39 }: 40 let 41 + version = "2012"; 42 43 sysArch = 44 if stdenv.hostPlatform.system == "x86_64-linux" then "x64" 45 else throw "Unsupported system: ${stdenv.hostPlatform.system}"; 46 + # The downloaded archive also contains i386 and ARM binaries, but these have not been tested. 47 48 vmwareHorizonClientFiles = stdenv.mkDerivation { 49 name = "vmwareHorizonClientFiles"; 50 inherit version; 51 src = fetchurl { 52 + url = "https://download3.vmware.com/software/view/viewclients/CART21FQ4/VMware-Horizon-Client-Linux-2012-8.1.0-17349998.tar.gz"; 53 + sha256 = "0afda1f3116e75a4e7f89990d8ee60ccea5f3bb8a2360652162fa11c795724ce"; 54 }; 55 buildInputs = [ makeWrapper ]; 56 installPhase = '' ··· 62 # when it cannot detect a new enough version already present on the system. 63 # The checks are distribution-specific and do not function correctly on NixOS. 64 # Deleting the bundled library is the simplest way to force it to use our version. 65 + rm "$out/lib/vmware/gcc/libstdc++.so.6" 66 + 67 + # This libjpeg library interferes with Chromium, so we will be using ours instead. 68 + rm $out/lib/vmware/libjpeg.* 69 70 # Force the default GTK theme (Adwaita) because Horizon is prone to 71 # UI usability issues when using non-default themes, such as Adwaita-dark. 72 makeWrapper "$out/bin/vmware-view" "$out/bin/vmware-view_wrapper" \ 73 --set GTK_THEME Adwaita \ 74 + --suffix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ 75 --suffix LD_LIBRARY_PATH : "$out/lib/vmware/view/crtbora:$out/lib/vmware" 76 ''; 77 }; ··· 82 runScript = "${vmwareHorizonClientFiles}/bin/vmware-view_wrapper"; 83 84 targetPkgs = pkgs: [ 85 + at-spi2-atk 86 + atk 87 + dbus 88 + fontconfig 89 + freetype 90 + gdk-pixbuf 91 + glib 92 + gtk2 93 + gtk3-x11 94 + harfbuzz 95 + liberation_ttf 96 + libjpeg 97 + libtiff 98 + libudev0-shim 99 + libuuid 100 + libX11 101 + libXcursor 102 + libXext 103 + libXi 104 + libXinerama 105 + libxkbfile 106 + libxml2 107 + libXrandr 108 + libXrender 109 + libXScrnSaver 110 + libXtst 111 + pango 112 + pcsclite 113 + pixman 114 + vmwareHorizonClientFiles 115 + zlib 116 ]; 117 }; 118 ··· 124 mimeType = "x-scheme-handler/vmware-view"; 125 }; 126 127 + in 128 + stdenv.mkDerivation { 129 name = "vmware-view"; 130 + 131 dontUnpack = true; 132 + 133 installPhase = '' 134 mkdir -p $out/bin $out/share/applications 135 cp "${desktopItem}"/share/applications/* $out/share/applications/ 136 ln -s "${vmwareFHSUserEnv}/bin/vmware-view" "$out/bin/" 137 ''; 138 + 139 + unwrapped = vmwareHorizonClientFiles; 140 + 141 + passthru.updateScript = ./update.sh; 142 143 meta = with lib; { 144 description = "Allows you to connect to your VMware Horizon virtual desktop";
+27
pkgs/applications/networking/remote/vmware-horizon-client/update.sh
···
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -p curl -p jq -p common-updater-scripts -i bash 3 + set -e 4 + 5 + entryPointURL='https://my.vmware.com/channel/public/api/v1.0/products/getRelatedDLGList?locale=en_US&category=desktop_end_user_computing&product=vmware_horizon_clients&version=horizon_8&dlgType=PRODUCT_BINARY' 6 + 7 + function getTarballMetaUrl { 8 + curl "$entryPointURL" | jq -r ' 9 + .dlgEditionsLists | .[] | select(.name | contains("Client for Linux")) | 10 + .dlgList | .[] | select(.name | contains("tarball version")) | 11 + @uri "https://my.vmware.com/channel/public/api/v1.0/dlg/details?locale=en_US&downloadGroup=\(.code)&productId=\(.productId)&rPId=\(.releasePackageId)" 12 + ' 13 + } 14 + 15 + meta="$( curl "$(getTarballMetaUrl)" | jq ".downloadFiles | .[]" )" 16 + 17 + ver="$( echo "$meta" | jq -r .version )" 18 + url="$( echo "$meta" | jq -r .thirdPartyDownloadUrl )" 19 + sum="$( echo "$meta" | jq -r .sha256checksum )" 20 + 21 + echo 22 + echo "version: $ver" 23 + echo "tar url: $url" 24 + echo " sha256: $sum" 25 + 26 + cd "$(dirname "$0")/../../../../.." 27 + update-source-version vmware-horizon-client.unwrapped "$ver" "$sum" "$url"