2016-04-23 03:06:25 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook,
|
2016-12-01 15:59:53 +01:00
|
|
|
fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps,
|
|
|
|
libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst,
|
|
|
|
pkgconfig, glib, gtk, gtkmm, iproute, dbus, systemd, which,
|
|
|
|
withX ? true }:
|
2015-05-13 10:31:32 +02:00
|
|
|
|
2016-12-01 15:59:53 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-05-13 10:31:32 +02:00
|
|
|
name = "open-vm-tools-${version}";
|
2017-08-15 11:24:41 +02:00
|
|
|
version = "10.1.10";
|
2016-12-01 15:59:53 +01:00
|
|
|
|
2016-04-23 03:06:25 +02:00
|
|
|
src = fetchFromGitHub {
|
2017-08-15 11:24:41 +02:00
|
|
|
owner = "vmware";
|
|
|
|
repo = "open-vm-tools";
|
|
|
|
rev = "stable-${version}";
|
|
|
|
sha256 = "13ifpi53rc2463ka8xw9zx407d1fz119x8sb9k48g5mwxm6c85fm";
|
2015-05-13 10:31:32 +02:00
|
|
|
};
|
|
|
|
|
2016-04-23 03:06:25 +02:00
|
|
|
sourceRoot = "${src.name}/open-vm-tools";
|
|
|
|
|
2016-12-01 15:59:53 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig ];
|
|
|
|
buildInputs = [ fuse glib icu libdnet libmspack openssl pam procps xercesc ]
|
|
|
|
++ lib.optionals withX [ gtk gtkmm libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
2015-05-13 10:31:32 +02:00
|
|
|
|
2016-12-01 15:59:53 +01:00
|
|
|
patches = [ ./recognize_nixos.patch ];
|
2016-04-23 03:06:25 +02:00
|
|
|
postPatch = ''
|
2016-12-01 15:59:53 +01:00
|
|
|
# Build bugfix for 10.1.0, stolen from Arch PKGBUILD
|
|
|
|
mkdir -p common-agent/etc/config
|
|
|
|
sed -i 's|.*common-agent/etc/config/Makefile.*|\\|' configure.ac
|
|
|
|
|
2015-05-13 10:31:32 +02:00
|
|
|
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
|
|
|
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' services/vmtoolsd/Makefile.am
|
2016-12-01 15:59:53 +01:00
|
|
|
sed -i 's,$(PAM_PREFIX),''${prefix}/$(PAM_PREFIX),' services/vmtoolsd/Makefile.am
|
|
|
|
sed -i 's,$(UDEVRULESDIR),''${prefix}/$(UDEVRULESDIR),' udev/Makefile.am
|
2017-02-22 16:54:07 +01:00
|
|
|
|
|
|
|
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
|
|
|
|
sed 1i'#include <sys/sysmacros.h>' -i lib/wiper/wiperPosix.c
|
2015-05-13 10:31:32 +02:00
|
|
|
'';
|
|
|
|
|
2016-12-01 15:59:53 +01:00
|
|
|
configureFlags = [ "--without-kernel-modules" "--without-xmlsecurity" ]
|
|
|
|
++ lib.optional (!withX) "--without-x";
|
2015-08-21 19:29:09 +02:00
|
|
|
|
2016-12-01 15:59:53 +01:00
|
|
|
enableParallelBuilding = true;
|
2015-05-13 10:31:32 +02:00
|
|
|
|
2016-04-23 03:08:06 +02:00
|
|
|
postInstall = ''
|
2016-12-01 15:59:53 +01:00
|
|
|
wrapProgram "$out/etc/vmware-tools/scripts/vmware/network" \
|
|
|
|
--prefix PATH ':' "${lib.makeBinPath [ iproute dbus systemd which ]}"
|
2016-04-23 03:08:06 +02:00
|
|
|
'';
|
|
|
|
|
2015-05-13 10:31:32 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/vmware/open-vm-tools;
|
2015-05-13 10:31:32 +02:00
|
|
|
description = "Set of tools for VMWare guests to improve host-guest interaction";
|
|
|
|
longDescription = ''
|
2017-08-15 11:24:41 +02:00
|
|
|
A set of services and modules that enable several features in VMware products for
|
|
|
|
better management of, and seamless user interactions with, guests.
|
2015-05-13 10:31:32 +02:00
|
|
|
'';
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ joamaki ];
|
|
|
|
};
|
|
|
|
}
|