From 60b743d7430bc07b23634b3b27fbdcfc267a9b4b Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Thu, 19 Sep 2024 15:31:24 +0200 Subject: [PATCH 1/4] linuxPackages.vmware: workstation-17.5.1-unstable-2024-01-12 -> workstation-17.6.1-unstable-2024-10-12 Upstream isn't updated yet, philipl has a fork which seems OK until mkubecek gets around to updating himself. --- pkgs/os-specific/linux/vmware/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/vmware/default.nix b/pkgs/os-specific/linux/vmware/default.nix index d63e5247dc512..9269ec20d9d36 100644 --- a/pkgs/os-specific/linux/vmware/default.nix +++ b/pkgs/os-specific/linux/vmware/default.nix @@ -2,15 +2,15 @@ stdenv.mkDerivation rec { pname = "vmware-modules"; - version = "workstation-17.5.1-unstable-2024-01-12-${kernel.version}"; + version = "workstation-17.6.1-unstable-2024-10-12-${kernel.version}"; src = fetchFromGitHub { - owner = "mkubecek"; + owner = "philipl"; repo = "vmware-host-modules"; # Developer no longer provides tags for kernel compatibility fixes - # Commit hash for branch workstation-17.5.1 as of 2024-03-07 - rev = "2c6d66f3f1947384038b765c897b102ecdb18298"; - hash = "sha256-VKN6nxtgQqElVrSD5++UdngjZio4+vmetGCgTAfgtTs="; + # Commit hash for branch workstation-17.6.1 as of 2024-10-15 + rev = "3a7595bddb2239c2149d7f730a4b57c8bb120d99"; + hash = "sha256-YqRnym5bOZ2ApMegOAeiUNyhsEsF5g1TVALtkUz/v6E="; }; hardeningDisable = [ "pic" ]; From aa6426334a06196a50a50e76d5a871940f521c3c Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Thu, 19 Sep 2024 15:32:47 +0200 Subject: [PATCH 2/4] vmware-workstation: 17.5.2 -> 17.6.1 --- .../vmware-workstation/default.nix | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/virtualization/vmware-workstation/default.nix b/pkgs/applications/virtualization/vmware-workstation/default.nix index b60875c381295..26a1355890b46 100644 --- a/pkgs/applications/virtualization/vmware-workstation/default.nix +++ b/pkgs/applications/virtualization/vmware-workstation/default.nix @@ -34,13 +34,13 @@ let # base - versions - version = "17.5.2"; - build = "23775571"; + version = "17.6.1"; + build = "24319023"; baseUrl = "https://softwareupdate.vmware.com/cds/vmw-desktop/ws/${version}/${build}/linux"; # tools - versions - toolsVersion = "12.4.0"; - toolsBuild = "23259341"; + toolsVersion = "12.4.5"; + toolsBuild = "23787635"; # macOS - versions fusionVersion = "13.5.2"; @@ -55,13 +55,8 @@ let stripRoot = false; } + "/vmware-tools-${system}-${toolsVersion}-${toolsBuild}.x86_64.component"); in lib.mapAttrsToList fetchComponent { - linux = "sha256-vT08mR6cCXZjiQgb9jy+MaqYzS0hFbNUM7xGAHIJ8Ao="; - linuxPreGlibc25 = "sha256-BodN1lxuhxyLlxIQSlVhGKItJ10VPlti/sEyxcRF2SA="; - netware = "sha256-o/S4wAYLR782Fn20fTQ871+rzsa1twnAxb9laV16XIk="; - solaris = "sha256-3LdFoI4TD5zxlohDGR3DRGbF6jwDZAoSMEpHWU4vSGU="; - winPre2k = "sha256-+QcvWfY3aCDxUwAfSuj7Wf9sxIO+ztWBrRolMim8Dfw="; - winPreVista = "sha256-3NgO/GdRFTpKNo45TMet0msjzxduuoF4nVLtnOUTHUA="; - windows = "sha256-2F7UPjNvtibmWAJxpB8IOnol12aMOGMy+403WeCTXw8="; + windows = "sha256-cv/5hv73c9ZaJsbDYdiedHtVARhw6YaFyJ+66rR/T3Y="; + windows-x86 = "sha256-4ZtihmocGIF+4yMlqP5Hb9gFt+AxXGzdHQbVCxTs41Q="; }; # macOS - ISOs @@ -123,7 +118,7 @@ stdenv.mkDerivation rec { src = fetchzip { url = "${baseUrl}/core/VMware-Workstation-${version}-${build}.x86_64.bundle.tar"; - sha256 = "sha256-5PZZpXN/V687TXjqeTm8MEays4/QTf02jVfdpi9C7GI="; + sha256 = "sha256-VzfiIawBDz0f1w3eynivW41Pn4SqvYf/8o9q14hln4s="; stripRoot = false; } + "/VMware-Workstation-${version}-${build}.x86_64.bundle"; @@ -286,13 +281,8 @@ stdenv.mkDerivation rec { ${lib.optionalString enableGuestTools '' echo "Installing VMware Tools" - cp unpacked/vmware-tools-linux/linux.iso \ - unpacked/vmware-tools-linuxPreGlibc25/linuxPreGlibc25.iso \ - unpacked/vmware-tools-netware/netware.iso \ - unpacked/vmware-tools-solaris/solaris.iso \ - unpacked/vmware-tools-winPre2k/winPre2k.iso \ - unpacked/vmware-tools-winPreVista/winPreVista.iso \ - unpacked/vmware-tools-windows/windows.iso \ + cp unpacked/vmware-tools-windows/windows.iso \ + unpacked/vmware-tools-windows-x86/windows-x86.iso \ $out/lib/vmware/isoimages/ ''} From 29a10b382139b954a65def44ff1091ebd3e37c9b Mon Sep 17 00:00:00 2001 From: Adrian Pistol Date: Tue, 15 Oct 2024 14:32:48 +0200 Subject: [PATCH 3/4] vmware-workstation: remove bundled guest tools They haven't ever worked for me and Workstation has the option of downloading them on-demand. --- .../vmware-workstation/default.nix | 57 +------------------ 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/pkgs/applications/virtualization/vmware-workstation/default.nix b/pkgs/applications/virtualization/vmware-workstation/default.nix index 26a1355890b46..976ab974ec589 100644 --- a/pkgs/applications/virtualization/vmware-workstation/default.nix +++ b/pkgs/applications/virtualization/vmware-workstation/default.nix @@ -29,7 +29,6 @@ , symlinkJoin , enableInstaller ? false, bzip2, sqlite , enableMacOSGuests ? false, fetchFromGitHub, unzip -, enableGuestTools ? true, }: let @@ -38,34 +37,9 @@ let build = "24319023"; baseUrl = "https://softwareupdate.vmware.com/cds/vmw-desktop/ws/${version}/${build}/linux"; - # tools - versions - toolsVersion = "12.4.5"; - toolsBuild = "23787635"; - # macOS - versions - fusionVersion = "13.5.2"; - fusionBuild = "23775688"; unlockerVersion = "3.0.5"; - guestToolsSrc = - let - fetchComponent = (system: hash: fetchzip { - inherit hash; - url = "${baseUrl}/packages/vmware-tools-${system}-${toolsVersion}-${toolsBuild}.x86_64.component.tar"; - stripRoot = false; - } + "/vmware-tools-${system}-${toolsVersion}-${toolsBuild}.x86_64.component"); - in lib.mapAttrsToList fetchComponent { - windows = "sha256-cv/5hv73c9ZaJsbDYdiedHtVARhw6YaFyJ+66rR/T3Y="; - windows-x86 = "sha256-4ZtihmocGIF+4yMlqP5Hb9gFt+AxXGzdHQbVCxTs41Q="; - }; - - # macOS - ISOs - darwinIsoSrc = fetchzip { - url = "https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${fusionVersion}/${fusionBuild}/universal/core/com.vmware.fusion.zip.tar"; - sha256 = "sha256-DDLRWAVRI3ZeXV5bUXWwput9mEC1qsJUsjojI0CJYMI="; - stripRoot = false; - } + "/com.vmware.fusion.zip"; - # macOS - Unlocker unlockerSrc = fetchFromGitHub { owner = "paolo-projects"; @@ -122,19 +96,9 @@ stdenv.mkDerivation rec { stripRoot = false; } + "/VMware-Workstation-${version}-${build}.x86_64.bundle"; - unpackPhase = let - guestTools = lib.optionalString enableGuestTools (lib.concatMapStringsSep " " (src: "--install-component ${src}") guestToolsSrc); - in + unpackPhase = '' - ${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} ${guestTools} --extract unpacked" - - ${lib.optionalString enableMacOSGuests '' - mkdir -p fusion/ - unzip "${darwinIsoSrc}" \ - "payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/darwin.iso" \ - "payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/darwinPre15.iso" \ - -d fusion/ - ''} + ${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} --extract unpacked" ''; postPatch = lib.optionalString enableMacOSGuests '' @@ -277,23 +241,6 @@ stdenv.mkDerivation rec { unpacked="unpacked/vmware-network-editor" cp -r $unpacked/lib $out/lib/vmware/ - mkdir -p $out/lib/vmware/isoimages/ - - ${lib.optionalString enableGuestTools '' - echo "Installing VMware Tools" - cp unpacked/vmware-tools-windows/windows.iso \ - unpacked/vmware-tools-windows-x86/windows-x86.iso \ - $out/lib/vmware/isoimages/ - ''} - - ${lib.optionalString enableMacOSGuests '' - echo "Installing VMWare Tools for MacOS" - cp -v \ - "fusion/payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/darwin.iso" \ - "fusion/payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/darwinPre15.iso" \ - $out/lib/vmware/isoimages/ - ''} - ## VMware Player Application echo "Installing VMware Player Application" unpacked="unpacked/vmware-player-app" From af32e9affa26d9542464dd79de5338267a27add7 Mon Sep 17 00:00:00 2001 From: js6pak Date: Sun, 13 Oct 2024 20:57:07 +0200 Subject: [PATCH 4/4] vmware-workstation: use system X11 libraries --- .../vmware-workstation/default.nix | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/virtualization/vmware-workstation/default.nix b/pkgs/applications/virtualization/vmware-workstation/default.nix index 976ab974ec589..4aad879e7da06 100644 --- a/pkgs/applications/virtualization/vmware-workstation/default.nix +++ b/pkgs/applications/virtualization/vmware-workstation/default.nix @@ -12,7 +12,6 @@ , readline70 , xz , cups -, glibc , libaio , vulkan-loader , alsa-lib @@ -20,8 +19,7 @@ , libxcrypt-legacy , libGL , numactl -, libX11 -, libXi +, xorg , kmod , python3 , autoPatchelfHook @@ -73,7 +71,6 @@ stdenv.mkDerivation rec { readline xz cups - glibc libaio vulkan-loader alsa-lib @@ -81,9 +78,21 @@ stdenv.mkDerivation rec { libxcrypt-legacy libGL numactl - libX11 - libXi - kmod + xorg.libX11 + xorg.libXau + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXdmcp + xorg.libXext + xorg.libXfixes + xorg.libXft + xorg.libXinerama + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXScrnSaver + xorg.libXtst ]; nativeBuildInputs = [ python3 vmware-unpack-env autoPatchelfHook makeWrapper ] @@ -217,8 +226,8 @@ stdenv.mkDerivation rec { --add-needed ${libpulseaudio}/lib/libpulse.so.0 \ --add-needed ${libGL}/lib/libEGL.so.1 \ --add-needed ${numactl}/lib/libnuma.so.1 \ - --add-needed ${libX11}/lib/libX11.so.6 \ - --add-needed ${libXi}/lib/libXi.so.6 \ + --add-needed ${xorg.libX11}/lib/libX11.so.6 \ + --add-needed ${xorg.libXi}/lib/libXi.so.6 \ --add-needed ${libGL}/lib/libGL.so.1 \ $out/lib/vmware/bin/$binary done @@ -345,6 +354,14 @@ stdenv.mkDerivation rec { rm $out/lib/vmware/bin/vmware-vmx ln -s /run/wrappers/bin/vmware-vmx $out/lib/vmware/bin/vmware-vmx + # Remove shipped X11 libraries + for lib in $out/lib/vmware/lib/* $out/lib/vmware-ovftool/lib*.so*; do + lib_name="$(basename "$lib")" + if [[ "$lib_name" == libX* || "$lib_name" == libxcb* ]]; then + rm -rf "$lib" + fi + done + runHook postInstall '';