commit
747719f235
@ -0,0 +1,166 @@ |
||||
{ config, pkgs, lib, ... }: |
||||
|
||||
let |
||||
cfg = config.virtualisation.vmware.host; |
||||
wrapperDir = "/run/vmware/bin"; # Perfectly fits as /usr/local/bin |
||||
parentWrapperDir = dirOf wrapperDir; |
||||
vmwareWrappers = # Needed as hardcoded paths workaround |
||||
let mkVmwareSymlink = |
||||
program: |
||||
'' |
||||
ln -s "${config.security.wrapperDir}/${program}" $wrapperDir/${program} |
||||
''; |
||||
in |
||||
[ |
||||
(mkVmwareSymlink "pkexec") |
||||
(mkVmwareSymlink "mount") |
||||
(mkVmwareSymlink "umount") |
||||
]; |
||||
in |
||||
{ |
||||
options = with lib; { |
||||
virtualisation.vmware.host = { |
||||
enable = mkEnableOption "VMware" // { |
||||
description = '' |
||||
This enables VMware host virtualisation for running VMs. |
||||
|
||||
<important><para> |
||||
<literal>vmware-vmx</literal> will cause kcompactd0 due to |
||||
<literal>Transparent Hugepages</literal> feature in kernel. |
||||
Apply <literal>[ "transparent_hugepage=never" ]</literal> in |
||||
option <option>boot.kernelParams</option> to disable them. |
||||
</para></important> |
||||
|
||||
<note><para> |
||||
If that didn't work disable <literal>TRANSPARENT_HUGEPAGE</literal>, |
||||
<literal>COMPACTION</literal> configs and recompile kernel. |
||||
</para></note> |
||||
''; |
||||
}; |
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.vmware-workstation; |
||||
defaultText = literalExpression "pkgs.vmware-workstation"; |
||||
description = "VMware host virtualisation package to use"; |
||||
}; |
||||
extraPackages = mkOption { |
||||
type = with types; listOf package; |
||||
default = with pkgs; [ ]; |
||||
description = "Extra packages to be used with VMware host."; |
||||
example = "with pkgs; [ ntfs3g ]"; |
||||
}; |
||||
extraConfig = mkOption { |
||||
type = types.lines; |
||||
default = ""; |
||||
description = "Add extra config to /etc/vmware/config"; |
||||
example = '' |
||||
# Allow unsupported device's OpenGL and Vulkan acceleration for guest vGPU |
||||
mks.gl.allowUnsupportedDrivers = "TRUE" |
||||
mks.vk.allowUnsupportedDevices = "TRUE" |
||||
''; |
||||
}; |
||||
}; |
||||
}; |
||||
|
||||
config = lib.mkIf cfg.enable { |
||||
boot.extraModulePackages = [ config.boot.kernelPackages.vmware ]; |
||||
boot.extraModprobeConfig = "alias char-major-10-229 fuse"; |
||||
boot.kernelModules = [ "vmw_pvscsi" "vmw_vmci" "vmmon" "vmnet" "fuse" ]; |
||||
|
||||
environment.systemPackages = [ cfg.package ] ++ cfg.extraPackages; |
||||
services.printing.drivers = [ cfg.package ]; |
||||
|
||||
environment.etc."vmware/config".text = '' |
||||
${builtins.readFile "${cfg.package}/etc/vmware/config"} |
||||
${cfg.extraConfig} |
||||
''; |
||||
|
||||
environment.etc."vmware/bootstrap".source = "${cfg.package}/etc/vmware/bootstrap"; |
||||
environment.etc."vmware/icu".source = "${cfg.package}/etc/vmware/icu"; |
||||
environment.etc."vmware-installer".source = "${cfg.package}/etc/vmware-installer"; |
||||
|
||||
# SUID wrappers |
||||
|
||||
security.wrappers = { |
||||
vmware-vmx = { |
||||
setuid = true; |
||||
owner = "root"; |
||||
group = "root"; |
||||
source = "${cfg.package}/lib/vmware/bin/.vmware-vmx-wrapped"; |
||||
}; |
||||
}; |
||||
|
||||
###### wrappers activation script |
||||
|
||||
system.activationScripts.vmwareWrappers = |
||||
lib.stringAfter [ "specialfs" "users" ] |
||||
'' |
||||
mkdir -p "${parentWrapperDir}" |
||||
chmod 755 "${parentWrapperDir}" |
||||
# We want to place the tmpdirs for the wrappers to the parent dir. |
||||
wrapperDir=$(mktemp --directory --tmpdir="${parentWrapperDir}" wrappers.XXXXXXXXXX) |
||||
chmod a+rx "$wrapperDir" |
||||
${lib.concatStringsSep "\n" (vmwareWrappers)} |
||||
if [ -L ${wrapperDir} ]; then |
||||
# Atomically replace the symlink |
||||
# See https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/ |
||||
old=$(readlink -f ${wrapperDir}) |
||||
if [ -e "${wrapperDir}-tmp" ]; then |
||||
rm --force --recursive "${wrapperDir}-tmp" |
||||
fi |
||||
ln --symbolic --force --no-dereference "$wrapperDir" "${wrapperDir}-tmp" |
||||
mv --no-target-directory "${wrapperDir}-tmp" "${wrapperDir}" |
||||
rm --force --recursive "$old" |
||||
else |
||||
# For initial setup |
||||
ln --symbolic "$wrapperDir" "${wrapperDir}" |
||||
fi |
||||
''; |
||||
|
||||
# Services |
||||
|
||||
systemd.services."vmware-authdlauncher" = { |
||||
description = "VMware Authentification Daemon"; |
||||
serviceConfig = { |
||||
Type = "forking"; |
||||
ExecStart = [ "${cfg.package}/bin/vmware-authdlauncher" ]; |
||||
}; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
}; |
||||
|
||||
systemd.services."vmware-networks-configuration" = { |
||||
description = "VMware Networks Configuration Generation"; |
||||
unitConfig.ConditionPathExists = "!/etc/vmware/networking"; |
||||
serviceConfig = { |
||||
UMask = "0077"; |
||||
ExecStart = [ |
||||
"${cfg.package}/bin/vmware-networks --postinstall vmware-player,0,1" |
||||
]; |
||||
Type = "oneshot"; |
||||
RemainAfterExit = "yes"; |
||||
}; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
}; |
||||
|
||||
systemd.services."vmware-networks" = { |
||||
description = "VMware Networks"; |
||||
after = [ "vmware-networks-configuration.service" ]; |
||||
requires = [ "vmware-networks-configuration.service" ]; |
||||
serviceConfig = { |
||||
Type = "forking"; |
||||
ExecCondition = [ "${pkgs.kmod}/bin/modprobe vmnet" ]; |
||||
ExecStart = [ "${cfg.package}/bin/vmware-networks --start" ]; |
||||
ExecStop = [ "${cfg.package}/bin/vmware-networks --stop" ]; |
||||
}; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
}; |
||||
|
||||
systemd.services."vmware-usbarbitrator" = { |
||||
description = "VMware USB Arbitrator"; |
||||
serviceConfig = { |
||||
ExecStart = [ "${cfg.package}/bin/vmware-usbarbitrator -f" ]; |
||||
}; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,6 @@ |
||||
[Desktop Entry] |
||||
Name=LibreOffice @app@... |
||||
Comment=Enter LibreOffice @app@ filename: |
||||
Type=Link |
||||
URL=.source/soffice.@ext@ |
||||
Icon=libreoffice-oasis-@type@ |
@ -1,19 +1,32 @@ |
||||
{ libreoffice, runCommand, dbus, bash }: |
||||
let |
||||
jdk = libreoffice.jdk; |
||||
in |
||||
(runCommand libreoffice.name { |
||||
inherit dbus libreoffice jdk bash; |
||||
} '' |
||||
{ lib, runCommand |
||||
, libreoffice, dbus, bash, substituteAll |
||||
, dolphinTemplates ? true |
||||
}: |
||||
runCommand libreoffice.name { |
||||
inherit (libreoffice) jdk meta; |
||||
inherit dbus libreoffice bash; |
||||
} ('' |
||||
mkdir -p "$out/bin" |
||||
ln -s "${libreoffice}/share" "$out/share" |
||||
substituteAll "${./wrapper.sh}" "$out/bin/soffice" |
||||
chmod a+x "$out/bin/soffice" |
||||
|
||||
for i in $(ls "${libreoffice}/bin/"); do |
||||
test "$i" = "soffice" || ln -s soffice "$out/bin/$(basename "$i")" |
||||
done |
||||
'') // { |
||||
inherit libreoffice dbus; |
||||
meta = libreoffice.meta; |
||||
} |
||||
|
||||
mkdir -p "$out/share" |
||||
ln -s "${libreoffice}/share"/* $out/share |
||||
'' + lib.optionalString dolphinTemplates '' |
||||
# Add templates to dolphin "Create new" menu - taken from debian |
||||
|
||||
# We need to unpack the core source since the necessary files aren't available in the libreoffice output |
||||
unpackFile "${libreoffice.src}" |
||||
|
||||
install -D "${libreoffice.name}"/extras/source/shellnew/soffice.* --target-directory="$out/share/templates/.source" |
||||
|
||||
cp ${substituteAll {src = ./soffice-template.desktop; app="Writer"; ext="odt"; type="text"; }} $out/share/templates/soffice.odt.desktop |
||||
cp ${substituteAll {src = ./soffice-template.desktop; app="Calc"; ext="ods"; type="spreadsheet"; }} $out/share/templates/soffice.ods.desktop |
||||
cp ${substituteAll {src = ./soffice-template.desktop; app="Impress"; ext="odp"; type="presentation";}} $out/share/templates/soffice.odp.desktop |
||||
cp ${substituteAll {src = ./soffice-template.desktop; app="Draw"; ext="odg"; type="drawing"; }} $out/share/templates/soffice.odg.desktop |
||||
'') |
||||
|
||||
|
@ -0,0 +1,341 @@ |
||||
{ stdenv |
||||
, buildFHSUserEnv |
||||
, fetchurl |
||||
, lib |
||||
, zlib |
||||
, gdbm |
||||
, bzip2 |
||||
, libxslt |
||||
, libxml2 |
||||
, libuuid |
||||
, readline |
||||
, xz |
||||
, cups |
||||
, glibc |
||||
, libaio |
||||
, vulkan-loader |
||||
, alsa-lib |
||||
, libpulseaudio |
||||
, libGL |
||||
, numactl |
||||
, libX11 |
||||
, libXi |
||||
, kmod |
||||
, python3 |
||||
, autoPatchelfHook |
||||
, makeWrapper |
||||
, sqlite |
||||
, enableInstaller ? false |
||||
}: |
||||
|
||||
let |
||||
vmware-unpack-env = buildFHSUserEnv rec { |
||||
name = "vmware-unpack-env"; |
||||
targetPkgs = pkgs: [ zlib ]; |
||||
}; |
||||
gdbm3 = gdbm.overrideAttrs (old: rec { |
||||
version = "1.8.3"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://gnu/gdbm/gdbm-${version}.tar.gz"; |
||||
sha256 = "sha256-zDQDOKLii0AFirnrU1SiHVP4ihWC6iG6C7GFw3ooHck="; |
||||
}; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out/lib |
||||
cp .libs/libgdbm*.so* $out/lib/ |
||||
''; |
||||
}); |
||||
in |
||||
stdenv.mkDerivation rec { |
||||
pname = "vmware-workstation"; |
||||
version = "16.2.3"; |
||||
build = "19376536"; |
||||
|
||||
buildInputs = [ |
||||
libxslt |
||||
libxml2 |
||||
libuuid |
||||
gdbm3 |
||||
readline |
||||
xz |
||||
cups |
||||
glibc |
||||
libaio |
||||
vulkan-loader |
||||
alsa-lib |
||||
libpulseaudio |
||||
libGL |
||||
numactl |
||||
libX11 |
||||
libXi |
||||
kmod |
||||
]; |
||||
|
||||
nativeBuildInputs = [ python3 vmware-unpack-env autoPatchelfHook makeWrapper ] |
||||
++ lib.optionals enableInstaller [ sqlite bzip2 ]; |
||||
|
||||
src = fetchurl { |
||||
url = "https://download3.vmware.com/software/WKST-1623-LX-New/VMware-Workstation-Full-${version}-${build}.x86_64.bundle"; |
||||
sha256 = "sha256-+JE1KnRfawcaBannIyEr1TNZTF7YXRYYaFMVq0/erbM="; |
||||
}; |
||||
|
||||
unpackPhase = '' |
||||
${vmware-unpack-env}/bin/vmware-unpack-env -c "sh ${src} --extract unpacked" |
||||
''; |
||||
|
||||
installPhase = '' |
||||
mkdir -p \ |
||||
$out/bin \ |
||||
$out/etc/vmware \ |
||||
$out/etc/init.d \ |
||||
$out/lib/vmware \ |
||||
$out/share/doc |
||||
|
||||
#### Replicate vmware-installer's order but VMX first because of appLoader |
||||
${lib.optionalString enableInstaller '' |
||||
## VMware installer |
||||
echo "Installing VMware Installer" |
||||
unpacked="unpacked/vmware-installer" |
||||
vmware_installer_version=$(cat "unpacked/vmware-installer/manifest.xml" | grep -oPm1 "(?<=<version>)[^<]+") |
||||
dest="$out/lib/vmware-installer/$vmware_installer_version" |
||||
|
||||
mkdir -p $dest |
||||
cp -r $unpacked/vmis* $dest/ |
||||
cp -r $unpacked/sopython $dest/ |
||||
cp -r $unpacked/python $dest/ |
||||
cp -r $unpacked/cdsHelper $dest/ |
||||
cp -r $unpacked/vmware* $dest/ |
||||
cp -r $unpacked/bin $dest/ |
||||
cp -r $unpacked/lib $dest/ |
||||
|
||||
chmod +x $dest/vmis-launcher $dest/sopython/* $dest/python/init.sh $dest/vmware-* |
||||
ln -s $dest/vmware-installer $out/bin/vmware-installer |
||||
|
||||
mkdir -p $out/etc/vmware-installer |
||||
cp ${./vmware-installer-bootstrap} $out/etc/vmware-installer/bootstrap |
||||
sed -i -e "s,@@INSTALLERDIR@@,$dest," $out/etc/vmware-installer/bootstrap |
||||
sed -i -e "s,@@IVERSION@@,$vmware_installer_version," $out/etc/vmware-installer/bootstrap |
||||
sed -i -e "s,@@BUILD@@,${build}," $out/etc/vmware-installer/bootstrap |
||||
|
||||
# create database of vmware guest tools (avoids vmware fetching them later) |
||||
mkdir -p $out/etc/vmware-installer/components |
||||
database_filename=$out/etc/vmware-installer/database |
||||
touch $database_filename |
||||
sqlite3 "$database_filename" "CREATE TABLE settings(key VARCHAR PRIMARY KEY, value VARCHAR NOT NULL, component_name VARCHAR NOT NULL);" |
||||
sqlite3 "$database_filename" "INSERT INTO settings(key,value,component_name) VALUES('db.schemaVersion','2','vmware-installer');" |
||||
sqlite3 "$database_filename" "CREATE TABLE components(id INTEGER PRIMARY KEY, name VARCHAR NOT NULL, version VARCHAR NOT NULL, buildNumber INTEGER NOT NULL, component_core_id INTEGER NOT NULL, longName VARCHAR NOT NULL, description VARCHAR, type INTEGER NOT NULL);" |
||||
for folder in unpacked/**/.installer ; do |
||||
component="$(basename $(dirname $folder))" |
||||
component_version=$(cat unpacked/$component/manifest.xml | grep -oPm1 "(?<=<version>)[^<]+") |
||||
component_core_id=$([ "$component" == "vmware-installer" ] && echo "-1" || echo "1") |
||||
type=$([ "$component" == "vmware-workstation" ] && echo "0" || echo "1") |
||||
sqlite3 "$database_filename" "INSERT INTO components(name,version,buildNumber,component_core_id,longName,description,type) VALUES(\"$component\",\"$component_version\",\"${build}\",$component_core_id,\"$component\",\"$component\",$type);" |
||||
mkdir -p $out/etc/vmware-installer/components/$component |
||||
cp -r $folder/* $out/etc/vmware-installer/components/$component |
||||
done |
||||
''} |
||||
|
||||
## VMware Bootstrap |
||||
echo "Installing VMware Bootstrap" |
||||
cp ${./vmware-bootstrap} $out/etc/vmware/bootstrap |
||||
sed -i -e "s,@@PREFIXDIR@@,$out," $out/etc/vmware/bootstrap |
||||
|
||||
## VMware Config |
||||
echo "Installing VMware Config" |
||||
cp ${./vmware-config} $out/etc/vmware/config |
||||
sed -i -e "s,@@VERSION@@,${version}," $out/etc/vmware/config |
||||
sed -i -e "s,@@BUILD@@,${build}," $out/etc/vmware/config |
||||
sed -i -e "s,@@PREFIXDIR@@,$out," $out/etc/vmware/config |
||||
|
||||
## VMware VMX |
||||
echo "Installing VMware VMX" |
||||
unpacked="unpacked/vmware-vmx" |
||||
cp -r $unpacked/bin/* $out/bin/ |
||||
cp -r $unpacked/etc/modprobe.d $out/etc/ |
||||
cp -r $unpacked/etc/init.d/* $out/etc/init.d/ |
||||
cp -r $unpacked/roms $out/lib/vmware/ |
||||
cp -r $unpacked/sbin/* $out/bin/ |
||||
|
||||
cp -r $unpacked/lib/libconf $out/lib/vmware/ |
||||
cp -r $unpacked/lib/bin $out/lib/vmware/ |
||||
cp -r $unpacked/lib/lib $out/lib/vmware/ |
||||
cp -r $unpacked/lib/scripts $out/lib/vmware/ |
||||
cp -r $unpacked/lib/icu $out/lib/vmware/ |
||||
cp -r $unpacked/lib/share $out/lib/vmware/ |
||||
cp -r $unpacked/lib/modules $out/lib/vmware/ |
||||
cp -r $unpacked/lib/include $out/lib/vmware/ |
||||
|
||||
cp -r $unpacked/extra/checkvm $out/bin/ |
||||
cp -r $unpacked/extra/modules.xml $out/lib/vmware/modules/ |
||||
|
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/vmware-vmblock-fuse |
||||
ln -s $out/lib/vmware/icu $out/etc/vmware/icu |
||||
|
||||
# Replace vmware-modconfig with simple error dialog |
||||
cp ${./vmware-modconfig} $out/bin/vmware-modconfig |
||||
sed -i -e "s,ETCDIR=/etc/vmware,ETCDIR=$out/etc/vmware," $out/bin/vmware-modconfig |
||||
|
||||
# Patch dynamic libs in |
||||
for binary in "mksSandbox" "mksSandbox-debug" "mksSandbox-stats" "vmware-vmx" "vmware-vmx-debug" "vmware-vmx-stats" |
||||
do |
||||
patchelf \ |
||||
--add-needed ${libaio}/lib/libaio.so.1 \ |
||||
--add-needed ${vulkan-loader}/lib/libvulkan.so.1 \ |
||||
--add-needed ${alsa-lib}/lib/libasound.so \ |
||||
--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 ${libGL}/lib/libGL.so.1 \ |
||||
$out/lib/vmware/bin/$binary |
||||
done |
||||
|
||||
## VMware USB Arbitrator |
||||
echo "Installing VMware USB Arbitrator" |
||||
unpacked="unpacked/vmware-usbarbitrator" |
||||
cp -r $unpacked/etc/init.d/* $out/etc/init.d/ |
||||
cp -r $unpacked/bin/* $out/bin/ |
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/vmware-usbarbitrator |
||||
|
||||
## VMware Player Setup |
||||
echo "Installing VMware Player Setup" |
||||
unpacked="unpacked/vmware-player-setup" |
||||
mkdir -p $out/lib/vmware/setup |
||||
cp $unpacked/vmware-config $out/lib/vmware/setup/ |
||||
|
||||
## VMware Network Editor |
||||
echo "Installing VMware Network Editor" |
||||
unpacked="unpacked/vmware-network-editor" |
||||
cp -r $unpacked/lib $out/lib/vmware/ |
||||
|
||||
## VMware Tools + Virtual Printer |
||||
echo "Installing VMware Tools + Virtual Printer" |
||||
mkdir -p $out/lib/vmware/isoimages/ |
||||
cp unpacked/vmware-tools-linuxPreGlibc25/linuxPreGlibc25.iso \ |
||||
unpacked/vmware-tools-windows/windows.iso \ |
||||
unpacked/vmware-tools-winPreVista/winPreVista.iso \ |
||||
unpacked/vmware-virtual-printer/VirtualPrinter-Linux.iso \ |
||||
unpacked/vmware-virtual-printer/VirtualPrinter-Windows.iso \ |
||||
unpacked/vmware-tools-winPre2k/winPre2k.iso \ |
||||
unpacked/vmware-tools-linux/linux.iso \ |
||||
unpacked/vmware-tools-netware/netware.iso \ |
||||
unpacked/vmware-tools-solaris/solaris.iso \ |
||||
$out/lib/vmware/isoimages/ |
||||
|
||||
## VMware Player Application |
||||
echo "Installing VMware Player Application" |
||||
unpacked="unpacked/vmware-player-app" |
||||
cp -r $unpacked/lib/* $out/lib/vmware/ |
||||
cp -r $unpacked/etc/* $out/etc/ |
||||
cp -r $unpacked/share/* $out/share/ |
||||
cp -r $unpacked/bin/* $out/bin/ |
||||
cp -r $unpacked/doc/* $out/share/doc/ # Licences |
||||
|
||||
mkdir -p $out/etc/thnuclnt |
||||
cp -r $unpacked/extras/.thnumod $out/etc/thnuclnt/ |
||||
|
||||
mkdir -p $out/lib/cups/filter |
||||
cp -r $unpacked/extras/thnucups $out/lib/cups/filter/ |
||||
|
||||
for target in "vmplayer" "vmware-enter-serial" "vmware-setup-helper" "licenseTool" "vmware-mount" "vmware-fuseUI" "vmware-app-control" "vmware-zenity" |
||||
do |
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/$target |
||||
done |
||||
|
||||
ln -s $out/lib/vmware/bin/vmware-mount $out/bin/vmware-mount |
||||
ln -s $out/lib/vmware/bin/vmware-fuseUI $out/bin/vmware-fuseUI |
||||
ln -s $out/lib/vmware/bin/vmrest $out/bin/vmrest |
||||
|
||||
# Patch vmplayer |
||||
sed -i -e "s,ETCDIR=/etc/vmware,ETCDIR=$out/etc/vmware," $out/bin/vmplayer |
||||
sed -i -e "s,/sbin/modprobe,${kmod}/bin/modprobe," $out/bin/vmplayer |
||||
sed -i -e "s,@@BINARY@@,$out/bin/vmplayer," $out/share/applications/vmware-player.desktop |
||||
|
||||
## VMware OVF Tool compoment |
||||
echo "Installing VMware OVF Tool for Linux" |
||||
unpacked="unpacked/vmware-ovftool" |
||||
mkdir -p $out/lib/vmware-ovftool/ |
||||
|
||||
cp -r $unpacked/* $out/lib/vmware-ovftool/ |
||||
chmod 755 $out/lib/vmware-ovftool/ovftool* |
||||
makeWrapper "$out/lib/vmware-ovftool/ovftool.bin" "$out/bin/ovftool" |
||||
|
||||
## VMware Network Editor User Interface |
||||
echo "Installing VMware Network Editor User Interface" |
||||
unpacked="unpacked/vmware-network-editor-ui" |
||||
cp -r $unpacked/share/* $out/share/ |
||||
|
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/vmware-netcfg |
||||
ln -s $out/lib/vmware/bin/vmware-netcfg $out/bin/vmware-netcfg |
||||
|
||||
# Patch network editor ui |
||||
|
||||
sed -i -e "s,@@BINARY@@,$out/bin/vmware-netcfg," $out/share/applications/vmware-netcfg.desktop |
||||
|
||||
## VMware VIX Core Library |
||||
echo "Installing VMware VIX Core Library" |
||||
unpacked="unpacked/vmware-vix-core" |
||||
mkdir -p $out/lib/vmware-vix |
||||
cp -r $unpacked/lib/* $out/lib/vmware-vix/ |
||||
cp -r $unpacked/bin/* $out/bin/ |
||||
cp $unpacked/*.txt $out/lib/vmware-vix/ |
||||
|
||||
mkdir -p $out/share/doc/vmware-vix/ |
||||
cp -r $unpacked/doc/* $out/share/doc/vmware-vix/ |
||||
|
||||
mkdir -p $out/include/ |
||||
cp -r $unpacked/include/* $out/include/ |
||||
|
||||
## VMware VIX Workstation-16.0.0 Library |
||||
echo "Installing VMware VIX Workstation-16.0.0 Library" |
||||
unpacked="unpacked/vmware-vix-lib-Workstation1600" |
||||
cp -r $unpacked/lib/* $out/lib/vmware-vix/ |
||||
|
||||
## VMware VProbes component for Linux |
||||
echo "Installing VMware VProbes component for Linux" |
||||
unpacked="unpacked/vmware-vprobe" |
||||
cp -r $unpacked/bin/* $out/bin/ |
||||
cp -r $unpacked/lib/* $out/lib/vmware/ |
||||
|
||||
## VMware Workstation |
||||
echo "Installing VMware Workstation" |
||||
unpacked="unpacked/vmware-workstation" |
||||
cp -r $unpacked/bin/* $out/bin/ |
||||
cp -r $unpacked/lib/* $out/lib/vmware/ |
||||
cp -r $unpacked/share/* $out/share/ |
||||
cp -r $unpacked/man $out/share/ |
||||
cp -r $unpacked/doc $out/share/ |
||||
|
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/vmware |
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/vmware-tray |
||||
ln -s $out/lib/vmware/bin/appLoader $out/lib/vmware/bin/vmware-vprobe |
||||
|
||||
# Patch vmware |
||||
sed -i -e "s,ETCDIR=/etc/vmware,ETCDIR=$out/etc/vmware,g" $out/bin/vmware |
||||
sed -i -e "s,/sbin/modprobe,${kmod}/bin/modprobe,g" $out/bin/vmware |
||||
sed -i -e "s,@@BINARY@@,$out/bin/vmware," $out/share/applications/vmware-workstation.desktop |
||||
|
||||
chmod +x $out/bin/* $out/lib/vmware/bin/* $out/lib/vmware/setup/* |
||||
|
||||
# Harcoded pkexec hack |
||||
for lib in "lib/vmware/lib/libvmware-mount.so/libvmware-mount.so" "lib/vmware/lib/libvmwareui.so/libvmwareui.so" "lib/vmware/lib/libvmware-fuseUI.so/libvmware-fuseUI.so" |
||||
do |
||||
sed -i -e "s,/usr/local/sbin,/run/vmware/bin," "$out/$lib" |
||||
done |
||||
|
||||
# SUID hack |
||||
wrapProgram $out/lib/vmware/bin/vmware-vmx |
||||
rm $out/lib/vmware/bin/vmware-vmx |
||||
ln -s /run/wrappers/bin/vmware-vmx $out/lib/vmware/bin/vmware-vmx |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Industry standard desktop hypervisor for x86-64 architecture"; |
||||
homepage = "https://www.vmware.com/products/workstation-pro.html"; |
||||
license = licenses.unfree; |
||||
platforms = [ "x86_64-linux" ]; |
||||
maintainers = with maintainers; [ deinferno ]; |
||||
}; |
||||
} |
@ -0,0 +1,11 @@ |
||||
PREFIX="@@PREFIXDIR@@" |
||||
BINDIR="@@PREFIXDIR@@/bin" |
||||
SBINDIR="@@PREFIXDIR@@/sbin" |
||||
LIBDIR="@@PREFIXDIR@@/lib" |
||||
DATADIR="@@PREFIXDIR@@/share" |
||||
SYSCONFDIR="@@PREFIXDIR@@/etc" |
||||
DOCDIR="@@PREFIXDIR@@/share/doc" |
||||
MANDIR="@@PREFIXDIR@@/share/man" |
||||
INCLUDEDIR="@@PREFIXDIR@@/include" |
||||
INITDIR="@@PREFIXDIR@@/etc" |
||||
INITSCRIPTDIR="@@PREFIXDIR@@/etc/init.d" |
@ -0,0 +1,21 @@ |
||||
.encoding = "UTF-8" |
||||
product.name = "VMware Workstation" |
||||
product.version = "@@VERSION@@" |
||||
product.buildNumber = "@@BUILD@@" |
||||
workstation.product.version = "@@VERSION@@" |
||||
player.product.version = "@@VERSION@@" |
||||
vix.config.version = "1" |
||||
bindir = "@@PREFIXDIR@@/bin" |
||||
libdir = "@@PREFIXDIR@@/lib/vmware" |
||||
vix.libdir = "@@PREFIXDIR@@/lib/vmware-vix" |
||||
initscriptdir = "@@PREFIXDIR@@/lib/systemd/scripts" |
||||
vmware.fullpath = "@@PREFIXDIR@@/bin/vmware" |
||||
authd.fullpath = "@@PREFIXDIR@@/bin/vmware-authd" |
||||
gksu.rootMethod = "su" |
||||
NETWORKING = "yes" |
||||
installerDefaults.autoSoftwareUpdateEnabled = "no" |
||||
installerDefaults.dataCollectionEnabled = "no" |
||||
installerDefaults.componentDownloadEnabled = "no" |
||||
installerDefaults.transferVersion = "1" |
||||
acceptOVFEULA = "yes" |
||||
acceptEULA = "yes" |
@ -0,0 +1,5 @@ |
||||
VMWARE_INSTALLER="@@INSTALLERDIR@@" |
||||
VERSION="@@IVERSION@@" # For backwards compability |
||||
VMISVERSION="@@IVERSION@@" |
||||
VMISBUILDNUM="@@BUILD@@" |
||||
VMISPYVERSION="39" |
@ -0,0 +1,8 @@ |
||||
#!/bin/bash |
||||
|
||||
set -e |
||||
|
||||
ETCDIR=/etc/vmware |
||||
. $ETCDIR/bootstrap |
||||
|
||||
exec "$LIBDIR"/vmware/bin/vmware-zenity --error --text "Reboot is required to load VMware kernel modules (make sure that 'virtualisation.vmware.host.enable' is enabled)" |
@ -0,0 +1,22 @@ |
||||
{ lib, stdenv, buildPecl, php, valgrind, pcre2 }: |
||||
let |
||||
pname = "openswoole"; |
||||
version = "4.11.1"; |
||||
in |
||||
buildPecl { |
||||
inherit pname version; |
||||
|
||||
sha256 = "sha256-Rhoa4ny86dwB3e86/1W30AlDGRUDYjK8RusquKF5Izg="; |
||||
|
||||
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin) [ valgrind ]; |
||||
internalDeps = lib.optionals (lib.versionOlder php.version "7.4") [ php.extensions.hash ]; |
||||
|
||||
meta = with lib; { |
||||
changelog = "https://pecl.php.net/package/openswoole/${version}"; |
||||
description = "Coroutine-based concurrency library and high performance programmatic server for PHP"; |
||||
homepage = "https://www.openswoole.com/"; |
||||
license = licenses.asl20; |
||||
longDescription = "Open Swoole allows you to build high-performance, async multi-tasking webservices and applications using an easy to use Coroutine API.\nOpen Swoole is a complete async solution that has built-in support for async programming via coroutines.\nIt offers a range of multi-threaded I/O modules (HTTP Server, WebSockets, TaskWorkers, Process Pools) out of the box and support for popular PHP clients like PDO for MySQL, and CURL.\nYou can use the sync or async, Coroutine API to write whole applications or create thousands of light weight Coroutines within one Linux process."; |
||||
maintainers = teams.php.members; |
||||
}; |
||||
} |
@ -0,0 +1,41 @@ |
||||
{ stdenv, fetchurl, makeWrapper, lib, php }: |
||||
|
||||
let |
||||
pname = "pdepend"; |
||||
version = "2.10.3"; |
||||
in |
||||
stdenv.mkDerivation { |
||||
inherit pname version; |
||||
|
||||
src = fetchurl { |
||||
url = "https://github.com/pdepend/pdepend/releases/download/${version}/pdepend.phar"; |
||||
sha256 = "I5+n8+a3rHRgW4OM6FbVcf3T1wu9zBrTSb5sGq7ArH4="; |
||||
}; |
||||
|
||||
dontUnpack = true; |
||||
|
||||
nativeBuildInputs = [ makeWrapper ]; |
||||
|
||||
installPhase = '' |
||||
runHook preInstall |
||||
mkdir -p $out/bin |
||||
install -D $src $out/libexec/pdepend/pdepend.phar |
||||
makeWrapper ${php}/bin/php $out/bin/pdepend \ |
||||
--add-flags "$out/libexec/pdepend/pdepend.phar" |
||||
runHook postInstall |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "An adaptation of JDepend for PHP"; |
||||
homepage = "https://github.com/pdepend/pdepend"; |
||||
license = licenses.bsd3; |
||||
longDescription = " |
||||
PHP Depend is an adaptation of the established Java |
||||
development tool JDepend. This tool shows you the quality |
||||
of your design in terms of extensibility, reusability and |
||||
maintainability. |
||||
"; |
||||
maintainers = teams.php.members; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,42 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
, glyphslib |
||||
, setuptools-scm |
||||
, ufo2ft |
||||
, fonttools |
||||
, fontmath |
||||
, lxml |
||||
, setuptools |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "fontmake"; |
||||
version = "3.3.0"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "sha256-lD7MvZdr9CeWdoZtD3+8stVJTeQN5/AQ4miA/I2TFoE="; |
||||
extension = "zip"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ setuptools-scm ]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
glyphslib |
||||
ufo2ft |
||||
fonttools |
||||
fontmath |
||||
lxml |
||||
setuptools |
||||
]; |
||||
|
||||
pythonImportsCheck = [ "fontmake" ]; |
||||
|
||||
meta = { |
||||
description = "Compiles fonts from various sources (.glyphs, .ufo, designspace) into binaries formats (.otf, .ttf)"; |
||||
homepage = "https://github.com/googlefonts/fontmake"; |
||||
license = lib.licenses.asl20; |
||||
maintainers = [ lib.maintainers.BarinovMaxim ]; |
||||
}; |
||||
} |
@ -0,0 +1,43 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, pygobject3 |
||||
, pytestCheckHook |
||||
, gtk3 |
||||
, gobject-introspection |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "gbulb"; |
||||
version = "0.6.3"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "beeware"; |
||||
repo = "gbulb"; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-QNpZf1zfe6r6MtmYMWSrXPsXm5iX36oMx4GnXiTYPaQ="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
pygobject3 |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytestCheckHook |
||||
gtk3 |
||||
gobject-introspection |
||||
]; |
||||
|
||||
disabledTests = [ |
||||
"test_glib_events.TestBaseGLibEventLoop" # Somtimes fail due to imprecise timing |
||||
]; |
||||
|
||||
pythonImportsCheck = [ "gbulb" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "GLib implementation of PEP 3156"; |
||||
homepage = "https://github.com/beeware/gbulb"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ marius851000 ]; |
||||
}; |
||||
} |
@ -0,0 +1,59 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
, fonttools |
||||
, openstep-plist |
||||
, ufoLib2 |
||||
, pytestCheckHook |
||||
, unicodedata2 |
||||
, setuptools-scm |
||||
, ufonormalizer |
||||
, xmldiff |
||||
, defcon |
||||
, ufo2ft |
||||
, skia-pathops |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "glyphslib"; |
||||
version = "6.0.4"; |
||||
|
||||
format = "pyproject"; |
||||
|
||||
src = fetchPypi { |
||||
pname = "glyphsLib"; |
||||
inherit version; |
||||
sha256 = "sha256-PT66n1WEO5FNcwov8GaXT1YNrAi22X4HN7iVNkuehKI="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ setuptools-scm ]; |
||||
|
||||
checkInputs = [ pytestCheckHook ]; |
||||
|
||||
pythonImportsCheck = [ "glyphsLib" ]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
fonttools |
||||
openstep-plist |
||||
ufoLib2 |
||||
unicodedata2 |
||||
ufonormalizer |
||||
xmldiff |
||||
defcon |
||||
ufo2ft |
||||
skia-pathops |
||||
]; |
||||
|
||||
disabledTestPaths = [ |
||||
"tests/builder/designspace_gen_test.py" # this test tries to use non-existent font "CoolFoundry Examplary Serif" |
||||
"tests/builder/interpolation_test.py" # this test tries to use a font that previous test should made |
||||
]; |
||||
|
||||
meta = { |
||||
description = "Bridge from Glyphs source files (.glyphs) to UFOs and Designspace files via defcon and designspaceLib"; |
||||
homepage = "https://github.com/googlefonts/glyphsLib"; |
||||
license = lib.licenses.asl20; |
||||
maintainers = [ lib.maintainers.BarinovMaxim ]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,31 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
, setuptools-scm |
||||
, pytestCheckHook |
||||
, cython |
||||
, pythonImportsCheckHook |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "openstep-plist"; |
||||
version = "0.3.0"; |
||||
|
||||
src = fetchPypi { |
||||
pname = "openstep_plist"; |
||||
inherit version; |
||||
sha256 = "sha256-KO4sGKjod5BwUFQ1MU2S1dG0DyiJ06mdroMbRDsugBk="; |
||||
extension = "zip"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ setuptools-scm cython ]; |
||||
checkInputs = [ pytestCheckHook ]; |
||||
pythonImportsCheck = [ "openstep_plist" ]; |
||||
|
||||
meta = { |
||||
description = "Parser for the 'old style' OpenStep property list format also known as ASCII plist"; |
||||
homepage = "https://github.com/fonttools/openstep-plist"; |
||||
license = lib.licenses.mit; |
||||
maintainers = [ lib.maintainers.BarinovMaxim ]; |
||||
}; |
||||
} |
@ -0,0 +1,43 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, cython |
||||
, ninja |
||||
, setuptools-scm |
||||
, setuptools |
||||
, fetchPypi |
||||
, gn |
||||
, pytestCheckHook |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "skia-pathops"; |
||||
version = "0.7.2"; |
||||
|
||||
src = fetchPypi { |
||||
pname = "skia-pathops"; |
||||
inherit version; |
||||
extension = "zip"; |
||||
sha256 = "sha256-Gdhcmv77oVr5KxPIiJlk935jgvWPQsYEC0AZ6yjLppA="; |
||||
}; |
||||
|
||||
postPatch = '' |
||||
substituteInPlace setup.py \ |
||||
--replace "build_cmd = [sys.executable, build_skia_py, build_dir]" \ |
||||
'build_cmd = [sys.executable, build_skia_py, "--no-fetch-gn", "--no-virtualenv", "--gn-path", "${gn}/bin/gn", build_dir]' |
||||
''; |
||||
|
||||
nativeBuildInputs = [ cython ninja setuptools-scm ]; |
||||
|
||||
propagatedBuildInputs = [ setuptools ]; |
||||
|
||||
checkInputs = [ pytestCheckHook ]; |
||||
|
||||
pythonImportsCheck = [ "pathops" ]; |
||||
|
||||
meta = { |
||||
description = "Python access to operations on paths using the Skia library"; |
||||
homepage = "https://skia.org/dev/present/pathops"; |
||||
license = lib.licenses.bsd3; |
||||
maintainers = [ lib.maintainers.BarinovMaxim ]; |
||||
}; |
||||
} |
@ -0,0 +1,47 @@ |
||||
{ lib, stdenv, fetchFromGitHub, kernel, kmod, gnugrep, vmware-workstation }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "vmware-modules"; |
||||
version = "${vmware-workstation.version}-${kernel.version}"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "mkubecek"; |
||||
repo = "vmware-host-modules"; |
||||
rev = "w${vmware-workstation.version}-k5.17"; |
||||
sha256 = "sha256-EM6YU2nOwNlAXpQ7cGrLS1N+gAS1KxleVjJTzo22De0="; |
||||
}; |
||||
|
||||
hardeningDisable = [ "pic" ]; |
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies; |
||||
|
||||
enableParallelBuilding = true; |
||||
|
||||
postPatch = '' |
||||
substituteInPlace Makefile \ |
||||
--replace '/lib/modules/$(VM_UNAME)/misc' "$out/lib/modules/${kernel.modDirVersion}/misc" \ |
||||
--replace '$(shell uname -r)' "${kernel.modDirVersion}" \ |
||||
--replace /sbin/modinfo "${kmod}/bin/modinfo" \ |
||||
--replace 'test -z "$(DESTDIR)"' "0" |
||||
|
||||
for module in "vmmon-only" "vmnet-only"; do |
||||
substituteInPlace "./$module/Makefile" \ |
||||
--replace '/lib/modules/' "${kernel.dev}/lib/modules/" \ |
||||
--replace '$(shell uname -r)' "${kernel.modDirVersion}" \ |
||||
--replace /bin/grep "${gnugrep}/bin/grep" |
||||
done |
||||
''; |
||||
|
||||
preInstall = '' |
||||
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/misc" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Kernel modules needed for VMware hypervisor"; |
||||
homepage = "https://github.com/mkubecek/vmware-host-modules"; |
||||
license = licenses.gpl2Only; |
||||
platforms = [ "x86_64-linux" ]; |
||||
broken = kernel.kernelOlder "5.5" && kernel.isHardened; |
||||
maintainers = with maintainers; [ deinferno ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue