Merge pull request #130178 from NixOS/backport-129978-to-release-21.05
This commit is contained in:
commit
739b046784
|
@ -56,5 +56,7 @@ in
|
||||||
${open-vm-tools}/bin/vmware-user-suid-wrapper
|
${open-vm-tools}/bin/vmware-user-suid-wrapper
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.udev.packages = [ open-vm-tools ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook, fetchpatch,
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook
|
||||||
fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto,
|
, bash, fuse, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
|
||||||
libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst,
|
, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst
|
||||||
pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which,
|
, pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which
|
||||||
withX ? true }:
|
, libdrm, udev
|
||||||
|
, withX ? true
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "open-vm-tools";
|
pname = "open-vm-tools";
|
||||||
version = "11.2.5";
|
version = "11.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "vmware";
|
owner = "vmware";
|
||||||
repo = "open-vm-tools";
|
repo = "open-vm-tools";
|
||||||
rev = "stable-${version}";
|
rev = "stable-${version}";
|
||||||
sha256 = "sha256-Jv+NSKw/+l+b4lfVGgCZFlcTScO/WAO/d7DtI0FAEV4=";
|
sha256 = "1yfffxc7drr1hyg28jcvly7jn1bm4ca76lmma5ykbmba2qqszx49";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = "${src.name}/open-vm-tools";
|
sourceRoot = "${src.name}/open-vm-tools";
|
||||||
|
@ -20,32 +22,15 @@ stdenv.mkDerivation rec {
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
||||||
buildInputs = [ fuse glib icu libdnet libmspack libtirpc openssl pam procps rpcsvc-proto xercesc ]
|
buildInputs = [ fuse glib icu libdnet libdrm libmspack libtirpc openssl pam procps rpcsvc-proto udev xercesc ]
|
||||||
++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fix building with glib 2.68. Remove after next release.
|
|
||||||
# We drop AUTHORS due to conflicts when applying.
|
|
||||||
# https://github.com/vmware/open-vm-tools/pull/505
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/vmware/open-vm-tools/commit/82931a1bcb39d5132910c7fb2ddc086c51d06662.patch";
|
|
||||||
stripLen = 1;
|
|
||||||
excludes = [ "AUTHORS" ];
|
|
||||||
sha256 = "0yz5hnngr5vd4416hvmh8734a9vxa18d2xd37kl7if0p9vik6zlg";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# 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
|
|
||||||
|
|
||||||
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am
|
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' Makefile.am
|
||||||
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
sed -i 's,^confdir = ,confdir = ''${prefix},' scripts/Makefile.am
|
||||||
sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am
|
sed -i 's,usr/bin,''${prefix}/usr/bin,' scripts/Makefile.am
|
||||||
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' services/vmtoolsd/Makefile.am
|
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' services/vmtoolsd/Makefile.am
|
||||||
sed -i 's,$(PAM_PREFIX),''${prefix}/$(PAM_PREFIX),' services/vmtoolsd/Makefile.am
|
sed -i 's,$(PAM_PREFIX),''${prefix}/$(PAM_PREFIX),' services/vmtoolsd/Makefile.am
|
||||||
sed -i 's,$(UDEVRULESDIR),''${prefix}/$(UDEVRULESDIR),' udev/Makefile.am
|
|
||||||
|
|
||||||
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
|
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
|
||||||
sed 1i'#include <sys/sysmacros.h>' -i lib/wiper/wiperPosix.c
|
sed 1i'#include <sys/sysmacros.h>' -i lib/wiper/wiperPosix.c
|
||||||
|
@ -54,24 +39,28 @@ stdenv.mkDerivation rec {
|
||||||
sed -i 's,/sbin/shutdown,shutdown,' lib/system/systemLinux.c
|
sed -i 's,/sbin/shutdown,shutdown,' lib/system/systemLinux.c
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [ "--without-kernel-modules" "--without-xmlsecurity" ]
|
configureFlags = [
|
||||||
++ lib.optional (!withX) "--without-x";
|
"--without-kernel-modules"
|
||||||
|
"--without-xmlsecurity"
|
||||||
|
"--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
|
||||||
|
] ++ lib.optional (!withX) "--without-x";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = builtins.toString [
|
NIX_CFLAGS_COMPILE = builtins.toString [
|
||||||
# igrone glib-2.62 deprecations
|
|
||||||
# Drop in next stable release.
|
|
||||||
"-DGLIB_DISABLE_DEPRECATION_WARNINGS"
|
|
||||||
|
|
||||||
# fix build with gcc9
|
# fix build with gcc9
|
||||||
"-Wno-error=address-of-packed-member"
|
"-Wno-error=address-of-packed-member"
|
||||||
"-Wno-error=format-overflow"
|
"-Wno-error=format-overflow"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
mkdir -p ${placeholder "out"}/lib/udev/rules.d
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/etc/vmware-tools/scripts/vmware/network" \
|
wrapProgram "$out/etc/vmware-tools/scripts/vmware/network" \
|
||||||
--prefix PATH ':' "${lib.makeBinPath [ iproute2 dbus systemd which ]}"
|
--prefix PATH ':' "${lib.makeBinPath [ iproute2 dbus systemd which ]}"
|
||||||
|
substituteInPlace "$out/lib/udev/rules.d/99-vmware-scsi-udev.rules" --replace "/bin/sh" "${bash}/bin/sh"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in New Issue