vmware-workstation: 16.2.3 -> 17.0.0 and support macOS guests
This commit is contained in:
@@ -26,13 +26,29 @@
|
|||||||
, makeWrapper
|
, makeWrapper
|
||||||
, sqlite
|
, sqlite
|
||||||
, enableInstaller ? false
|
, enableInstaller ? false
|
||||||
|
, enableMacOSGuests ? false, fetchFromGitHub, gnutar, unzip
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
vmware-unpack-env = buildFHSUserEnv rec {
|
# macOS - versions
|
||||||
name = "vmware-unpack-env";
|
fusionVersion = "13.0.0";
|
||||||
targetPkgs = pkgs: [ zlib ];
|
fusionBuild = "20802013";
|
||||||
|
unlockerVersion = "3.0.4";
|
||||||
|
|
||||||
|
# macOS - ISOs
|
||||||
|
darwinIsoSrc = fetchurl {
|
||||||
|
url = "https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${fusionVersion}/${fusionBuild}/x86/core/com.vmware.fusion.zip.tar";
|
||||||
|
sha256 = "sha256-cSboek+nhkVj8rjdic6yzWQfjXiiLlch6gBWn73BzRU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# macOS - Unlocker
|
||||||
|
unlockerSrc = fetchFromGitHub {
|
||||||
|
owner = "paolo-projects";
|
||||||
|
repo = "unlocker";
|
||||||
|
rev = "${unlockerVersion}";
|
||||||
|
sha256 = "sha256-kpvrRiiygfjQni8z+ju9mPBVqy2gs08Wj4cHxE9eorQ=";
|
||||||
|
};
|
||||||
|
|
||||||
gdbm3 = gdbm.overrideAttrs (old: rec {
|
gdbm3 = gdbm.overrideAttrs (old: rec {
|
||||||
version = "1.8.3";
|
version = "1.8.3";
|
||||||
|
|
||||||
@@ -46,11 +62,16 @@ let
|
|||||||
cp .libs/libgdbm*.so* $out/lib/
|
cp .libs/libgdbm*.so* $out/lib/
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
vmware-unpack-env = buildFHSUserEnv rec {
|
||||||
|
name = "vmware-unpack-env";
|
||||||
|
targetPkgs = pkgs: [ zlib ];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "vmware-workstation";
|
pname = "vmware-workstation";
|
||||||
version = "16.2.3";
|
version = "17.0.0";
|
||||||
build = "19376536";
|
build = "20800274";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libxslt
|
libxslt
|
||||||
@@ -73,15 +94,35 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 vmware-unpack-env autoPatchelfHook makeWrapper ]
|
nativeBuildInputs = [ python3 vmware-unpack-env autoPatchelfHook makeWrapper ]
|
||||||
++ lib.optionals enableInstaller [ sqlite bzip2 ];
|
++ lib.optionals enableInstaller [ sqlite bzip2 ]
|
||||||
|
++ lib.optionals enableMacOSGuests [ gnutar unzip ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download3.vmware.com/software/WKST-1623-LX-New/VMware-Workstation-Full-${version}-${build}.x86_64.bundle";
|
url = "https://download3.vmware.com/software/WKST-1700-LX/VMware-Workstation-Full-${version}-${build}.x86_64.bundle";
|
||||||
sha256 = "sha256-+JE1KnRfawcaBannIyEr1TNZTF7YXRYYaFMVq0/erbM=";
|
sha256 = "sha256-kBTocGb1tg5i+dvWmOaPfPUHxrWcX8/obeKqRGR+mRA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} --extract unpacked"
|
${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} --extract unpacked"
|
||||||
|
|
||||||
|
${lib.optionalString enableMacOSGuests ''
|
||||||
|
mkdir -p fusion/
|
||||||
|
tar -xvpf "${darwinIsoSrc}" -C fusion/
|
||||||
|
unzip "fusion/com.vmware.fusion.zip" \
|
||||||
|
"payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/darwin.iso" \
|
||||||
|
"payload/VMware Fusion.app/Contents/Library/isoimages/x86_x64/darwinPre15.iso" \
|
||||||
|
-d fusion/
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
|
patchPhase = lib.optionalString enableMacOSGuests ''
|
||||||
|
cp -R "${unlockerSrc}" unlocker/
|
||||||
|
|
||||||
|
substituteInPlace unlocker/unlocker.py --replace \
|
||||||
|
"/usr/lib/vmware/bin/" "$out/lib/vmware/bin"
|
||||||
|
|
||||||
|
substituteInPlace unlocker/unlocker.py --replace \
|
||||||
|
"/usr/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so" "$out/lib/vmware/lib/libvmwarebase.so/libvmwarebase.so"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@@ -226,6 +267,14 @@ stdenv.mkDerivation rec {
|
|||||||
unpacked/vmware-tools-solaris/solaris.iso \
|
unpacked/vmware-tools-solaris/solaris.iso \
|
||||||
$out/lib/vmware/isoimages/
|
$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
|
## VMware Player Application
|
||||||
echo "Installing VMware Player Application"
|
echo "Installing VMware Player Application"
|
||||||
unpacked="unpacked/vmware-player-app"
|
unpacked="unpacked/vmware-player-app"
|
||||||
@@ -290,9 +339,9 @@ stdenv.mkDerivation rec {
|
|||||||
mkdir -p $out/include/
|
mkdir -p $out/include/
|
||||||
cp -r $unpacked/include/* $out/include/
|
cp -r $unpacked/include/* $out/include/
|
||||||
|
|
||||||
## VMware VIX Workstation-16.0.0 Library
|
## VMware VIX Workstation-17.0.0 Library
|
||||||
echo "Installing VMware VIX Workstation-16.0.0 Library"
|
echo "Installing VMware VIX Workstation-17.0.0 Library"
|
||||||
unpacked="unpacked/vmware-vix-lib-Workstation1600"
|
unpacked="unpacked/vmware-vix-lib-Workstation1700"
|
||||||
cp -r $unpacked/lib/* $out/lib/vmware-vix/
|
cp -r $unpacked/lib/* $out/lib/vmware-vix/
|
||||||
|
|
||||||
## VMware VProbes component for Linux
|
## VMware VProbes component for Linux
|
||||||
@@ -327,6 +376,11 @@ stdenv.mkDerivation rec {
|
|||||||
sed -i -e "s,/usr/local/sbin,/run/vmware/bin," "$out/$lib"
|
sed -i -e "s,/usr/local/sbin,/run/vmware/bin," "$out/$lib"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
${lib.optionalString enableMacOSGuests ''
|
||||||
|
echo "Running VMWare Unlocker to enable macOS Guests"
|
||||||
|
python3 unlocker/unlocker.py
|
||||||
|
''}
|
||||||
|
|
||||||
# SUID hack
|
# SUID hack
|
||||||
wrapProgram $out/lib/vmware/bin/vmware-vmx
|
wrapProgram $out/lib/vmware/bin/vmware-vmx
|
||||||
rm $out/lib/vmware/bin/vmware-vmx
|
rm $out/lib/vmware/bin/vmware-vmx
|
||||||
@@ -339,6 +393,6 @@ stdenv.mkDerivation rec {
|
|||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
maintainers = with maintainers; [ deinferno ];
|
maintainers = with maintainers; [ cawilliamson deinferno ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ stdenv.mkDerivation rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mkubecek";
|
owner = "mkubecek";
|
||||||
repo = "vmware-host-modules";
|
repo = "vmware-host-modules";
|
||||||
rev = "w${vmware-workstation.version}-k5.18";
|
rev = "w${vmware-workstation.version}";
|
||||||
sha256 = "sha256-sAeCjaSrBXGP5szfCY5CpMrGwzCw4aM67EN+YfA3AWA=";
|
sha256 = "sha256-EHMiSmljpUjYuZH6r/0Vk5OVGeyQyNngy0AVJO/48a0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [ "pic" ];
|
hardeningDisable = [ "pic" ];
|
||||||
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = "https://github.com/mkubecek/vmware-host-modules";
|
homepage = "https://github.com/mkubecek/vmware-host-modules";
|
||||||
license = licenses.gpl2Only;
|
license = licenses.gpl2Only;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
broken = (kernel.kernelOlder "5.5" && kernel.isHardened) || kernel.kernelAtLeast "5.19";
|
broken = (kernel.kernelOlder "5.5" && kernel.isHardened);
|
||||||
maintainers = with maintainers; [ deinferno ];
|
maintainers = with maintainers; [ deinferno ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user