forked from mirrors/nixpkgs
Merge pull request #7829 from joamaki/vmware_guest
VMWare guest support and open-vm-tools package
This commit is contained in:
commit
0b3e2becca
|
@ -463,5 +463,6 @@
|
|||
./virtualisation/openvswitch.nix
|
||||
./virtualisation/parallels-guest.nix
|
||||
./virtualisation/virtualbox-guest.nix
|
||||
./virtualisation/vmware-guest.nix
|
||||
./virtualisation/xen-dom0.nix
|
||||
]
|
||||
|
|
47
nixos/modules/virtualisation/vmware-guest.nix
Normal file
47
nixos/modules/virtualisation/vmware-guest.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.vmwareGuest;
|
||||
open-vm-tools = pkgs.open-vm-tools;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.vmwareGuest.enable = mkEnableOption "Enable VMWare Guest Support";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [ {
|
||||
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
|
||||
message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}";
|
||||
} ];
|
||||
|
||||
environment.systemPackages = [ open-vm-tools ];
|
||||
|
||||
systemd.services.vmware =
|
||||
{ description = "VMWare Guest Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = "${open-vm-tools}/bin/vmtoolsd";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
videoDrivers = mkOverride 50 [ "vmware" ];
|
||||
|
||||
config = ''
|
||||
Section "InputDevice"
|
||||
Identifier "VMMouse"
|
||||
Driver "vmmouse"
|
||||
EndSection
|
||||
'';
|
||||
|
||||
serverLayoutSection = ''
|
||||
InputDevice "VMMouse"
|
||||
'';
|
||||
|
||||
displayManager.sessionCommands = ''
|
||||
${open-vm-tools}/bin/vmware-user-suid-wrapper
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
43
pkgs/applications/virtualization/open-vm-tools/default.nix
Normal file
43
pkgs/applications/virtualization/open-vm-tools/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ stdenv, lib, fetchurl, makeWrapper, autoconf, automake,
|
||||
libmspack, openssl, pam, xercesc, icu, libdnet, procps,
|
||||
x11, libXinerama, libXi, libXrender, libXrandr, libXtst,
|
||||
pkgconfig, glib, gtk, gtkmm }:
|
||||
|
||||
let
|
||||
majorVersion = "9.10";
|
||||
minorVersion = "0";
|
||||
patchSet = "2476743";
|
||||
version = "${majorVersion}.${minorVersion}-${patchSet}";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "open-vm-tools-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/open-vm-tools/open-vm-tools/stable-${majorVersion}.x/open-vm-tools-${version}.tar.gz";
|
||||
sha256 = "15lwayrz9bpx4z12fj616hsn25m997y72licwwz7kms4sx9ssip1";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ autoconf automake makeWrapper libmspack openssl pam xercesc icu libdnet procps
|
||||
pkgconfig glib gtk gtkmm x11 libXinerama libXi libXrender libXrandr libXtst ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i s,-Werror,,g configure.ac
|
||||
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
||||
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' services/vmtoolsd/Makefile.am
|
||||
'';
|
||||
|
||||
preConfigure = "autoreconf";
|
||||
configureFlags = "--without-kernel-modules --without-xmlsecurity";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/vmware/open-vm-tools";
|
||||
description = "Set of tools for VMWare guests to improve host-guest interaction";
|
||||
longDescription = ''
|
||||
A set of services and modules that enable several features in VMware products for
|
||||
better management of, and seamless user interactions with, guests.
|
||||
'';
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ joamaki ];
|
||||
};
|
||||
}
|
|
@ -9653,6 +9653,11 @@ let
|
|||
|
||||
numactl = callPackage ../os-specific/linux/numactl { };
|
||||
|
||||
open-vm-tools = callPackage ../applications/virtualization/open-vm-tools {
|
||||
inherit (xlibs) libXinerama libXi libXrender libXrandr libXtst;
|
||||
inherit (gnome) gtk gtkmm;
|
||||
};
|
||||
|
||||
gocode = callPackage ../development/tools/gocode { };
|
||||
|
||||
gotags = callPackage ../development/tools/gotags { };
|
||||
|
|
Loading…
Reference in a new issue