diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2023-09-17 12:06:28 +0100 |
---|---|---|
committer | Andrew Tropin <andrew@trop.in> | 2023-10-18 13:46:47 +0400 |
commit | 0648e20c090badde770d75e30516deb26e72b35d (patch) | |
tree | 1f1d72c37af794521f9fec348d6533f52fcbd917 /gnu | |
parent | 6fff96434d6ff5dd2b2e9ee81b87553abe64e5dd (diff) | |
download | guix-0648e20c090badde770d75e30516deb26e72b35d.tar.gz guix-0648e20c090badde770d75e30516deb26e72b35d.zip |
gnu: Add VMware open-vm-tools.
* gnu/packages/virtualization.scm (vmware-open-vm-tools,
vmware-open-vm-tools-gtk): New variables.
Signed-off-by: Andrew Tropin <andrew@trop.in>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/virtualization.scm | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 779164c53f..af1d272c8f 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -30,6 +30,7 @@ ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2023 Juliana Sims <juli@incana.org> ;;; Copyright © 2023 Ahmad Draidi <a.r.draidi@redscript.org> +;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -65,6 +66,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages containers) #:use-module (gnu packages cross-base) + #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) @@ -1722,6 +1724,156 @@ manages Xen and LXC (Linux containers). It presents a summary view of running domains, their live performance and resource utilization statistics.") (license license:gpl2+))) +(define-public vmware-open-vm-tools + (package + (name "vmware-open-vm-tools") + (version "12.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vmware/open-vm-tools") + (commit (string-append "stable-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1hbimhady0v1kd45azknl1lgzgldhgdjd7bj540rn3y4cai5cnk1")))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(list "--with-fuse=fuse3" + "--without-kernel-modules" + "--without-x" + (string-append + "--with-udev-rules-dir=" #$output "/lib/udev/rules.d")) + ;; TODO: Add iproute2 dbus which commands wrap. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "open-vm-tools"))) + (replace 'bootstrap + (lambda _ + (system* "autoreconf" "-if"))) + (add-after 'bootstrap 'patch-paths + (lambda _ + (substitute* "Makefile.am" + (("/etc/vmware-tools/") + (string-append #$output "/etc/vmware-tools/"))) + (substitute* "scripts/Makefile.am" + (("/etc/vmware-tools") + (string-append #$output "/etc/vmware-tools")) + (("/usr/bin") + (string-append #$output "/bin"))) + (substitute* "services/vmtoolsd/Makefile.am" + (("/etc/vmware-tools") + (string-append #$output "/etc/vmware-tools")) + (("\\$\\(PAM_PREFIX\\)") + (string-append #$output "/$(PAM_PREFIX)"))) + (substitute* "vgauth/service/Makefile.am" + (("/etc/vmware-tools/vgauth/schemas") + (string-append #$output "/etc/vmware-tools/vgauth/schemas")) + (("etc/vmware-tools/vgauth.conf") + (string-append #$output "/etc/vmware-tools/vgauth.conf"))) + (substitute* "vmhgfs-fuse/config.c" + (("/bin/fusermount3") + (string-append + #$(this-package-input "fuse") "/bin/fusermount3"))) + ;; XXX: This part might need more testing with shutdown and halt + ;; commands provided by Shepherd. + (substitute* "lib/system/systemLinux.c" + (("/sbin/shutdown") + (string-append + #$(this-package-input "shepherd") "/sbin/shutdown")) + (("/bin/reboot") + (string-append + #$(this-package-input "shepherd") "/sbin/reboot"))) + (substitute* "services/plugins/vix/foundryToolsDaemon.c" + (("/bin/mount") + (string-append + #$(this-package-input "util-linux") "/bin/mount")) + (("/usr/bin/vmhgfs-fuse") + (string-append #$output "/bin/vmhgfs-fuse")))))))) + (native-inputs + (list `(,glib "bin") ; for glib-genmarshal + autoconf + automake + libltdl + libtool + pkg-config)) + (inputs + (list eudev + fuse + glib + xmlsec + libmspack + ;; libdnet ; Not packed + libtirpc + libxcrypt + libxml2 + linux-pam + openssl + procps + rpcsvc-proto + shepherd ;for 'halt' and 'reboot', invoked from VMWare host. + util-linux + xmlsec)) + (home-page "https://github.com/vmware/open-vm-tools") + (synopsis "Tools for VMWare guest VM to enhance host-guest integration") + (description + "@code{open-vm-tools} is a set of services and modules that enable several +features in VMware products for better management of, and seamless user +interactions with, guests. + +@code{open-vm-tools} enables the following features in VMware products: + +@itemize +@item The ability to perform virtual machine power operations gracefully. +@item Execution of VMware provided or user configured scripts in guests during +various power operations. +@item The ability to run programs, commands and file system operation in guests +to enhance guest automation. +@item Authentication for guest operations. +@item Periodic collection of network, disk, and memory usage information from +the guest. +@item Generation of heartbeat from guests to hosts so VMware's HA solution can +determine guests' availability. +@item Clock synchronization between guests and hosts or client desktops. +@item Quiescing guest file systems to allow hosts to capture +file-system-consistent guest snapshots. +@item Execution of pre-freeze and post-thaw scripts while quiescing guest file +systems. +@item The ability to customize guest operating systems immediately after +powering on virtual machines. +@item Enabling shared folders between host and guest file systems on VMware +Workstation and VMware Fusion. +@item Copying and pasting text, graphics, and files between guests and hosts or +client desktops. +@end itemize") + (license license:gpl2))) + +(define-public vmware-open-vm-tools-gtk + (package/inherit vmware-open-vm-tools + (name "vmware-open-vm-tools-gtk") + (inputs + (modify-inputs (package-inputs vmware-open-vm-tools) + (prepend gdk-pixbuf-xlib + gtk+ + gtkmm-3 + libdrm + libx11 + libxext + libxi + libxinerama + libxrandr + libxrender + libxtst))) + (arguments + (substitute-keyword-arguments (package-arguments vmware-open-vm-tools) + ((#:configure-flags flags) + #~(delete "--without-x" #$flags)))) + (description "This package provides a GTK+ support for @code{open-vm-tools}."))) + (define-public criu (package (name "criu") |