mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
vmware-workstation: reorder attrs
This commit is contained in:
parent
18ba6d1375
commit
5e3aa011a0
1 changed files with 39 additions and 39 deletions
|
@ -38,11 +38,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
version = "17.6.3";
|
version = "17.6.3";
|
||||||
build = "24583834";
|
build = "24583834";
|
||||||
|
|
||||||
macOSUnlockerSrc = fetchFromGitHub {
|
src = requireFile {
|
||||||
owner = "paolo-projects";
|
name = "VMware-Workstation-Full-${finalAttrs.version}-${finalAttrs.build}.x86_64.bundle";
|
||||||
repo = "unlocker";
|
url = "https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Workstation%20Pro&freeDownloads=true";
|
||||||
tag = "3.0.5";
|
hash = "sha256-eVdZF3KN7UxtC4n0q2qBvpp3PADuto0dEqwNsSVHjuA=";
|
||||||
hash = "sha256-JSEW1gqQuLGRkathlwZU/TnG6dL/xWKW4//SfE+kO0A=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
vmware-unpack-env = buildFHSEnv {
|
vmware-unpack-env = buildFHSEnv {
|
||||||
|
@ -51,6 +50,27 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
targetPkgs = pkgs: [ zlib ];
|
targetPkgs = pkgs: [ zlib ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
${finalAttrs.vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${finalAttrs.src} --extract unpacked"
|
||||||
|
'';
|
||||||
|
|
||||||
|
macOSUnlockerSrc = fetchFromGitHub {
|
||||||
|
owner = "paolo-projects";
|
||||||
|
repo = "unlocker";
|
||||||
|
tag = "3.0.5";
|
||||||
|
hash = "sha256-JSEW1gqQuLGRkathlwZU/TnG6dL/xWKW4//SfE+kO0A=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString enableMacOSGuests ''
|
||||||
|
cp -R "${finalAttrs.macOSUnlockerSrc}" 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"
|
||||||
|
'';
|
||||||
|
|
||||||
readline70_compat63 = symlinkJoin {
|
readline70_compat63 = symlinkJoin {
|
||||||
name = "readline70_compat63";
|
name = "readline70_compat63";
|
||||||
paths = [ readline70 ];
|
paths = [ readline70 ];
|
||||||
|
@ -59,6 +79,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs =
|
||||||
|
[
|
||||||
|
python3
|
||||||
|
finalAttrs.vmware-unpack-env
|
||||||
|
autoPatchelfHook
|
||||||
|
makeWrapper
|
||||||
|
]
|
||||||
|
++ lib.optionals enableInstaller [
|
||||||
|
bzip2
|
||||||
|
sqlite
|
||||||
|
finalAttrs.readline70_compat63
|
||||||
|
]
|
||||||
|
++ lib.optionals enableMacOSGuests [ unzip ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libxslt
|
libxslt
|
||||||
libxml2
|
libxml2
|
||||||
|
@ -91,40 +125,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
xorg.libXtst
|
xorg.libXtst
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs =
|
|
||||||
[
|
|
||||||
python3
|
|
||||||
finalAttrs.vmware-unpack-env
|
|
||||||
autoPatchelfHook
|
|
||||||
makeWrapper
|
|
||||||
]
|
|
||||||
++ lib.optionals enableInstaller [
|
|
||||||
bzip2
|
|
||||||
sqlite
|
|
||||||
finalAttrs.readline70_compat63
|
|
||||||
]
|
|
||||||
++ lib.optionals enableMacOSGuests [ unzip ];
|
|
||||||
|
|
||||||
src = requireFile {
|
|
||||||
name = "VMware-Workstation-Full-${finalAttrs.version}-${finalAttrs.build}.x86_64.bundle";
|
|
||||||
url = "https://support.broadcom.com/group/ecx/productdownloads?subfamily=VMware%20Workstation%20Pro&freeDownloads=true";
|
|
||||||
hash = "sha256-eVdZF3KN7UxtC4n0q2qBvpp3PADuto0dEqwNsSVHjuA=";
|
|
||||||
};
|
|
||||||
|
|
||||||
unpackPhase = ''
|
|
||||||
${finalAttrs.vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${finalAttrs.src} --extract unpacked"
|
|
||||||
'';
|
|
||||||
|
|
||||||
postPatch = lib.optionalString enableMacOSGuests ''
|
|
||||||
cp -R "${finalAttrs.macOSUnlockerSrc}" 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 = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue