Merge pull request #198286 from SuperSandro2000/open-vm-tools
This commit is contained in:
commit
921b410e30
|
@ -1,8 +1,41 @@
|
|||
{ stdenv, lib, fetchFromGitHub, makeWrapper, autoreconfHook
|
||||
, bash, fuse3, libmspack, openssl, pam, xercesc, icu, libdnet, procps, libtirpc, rpcsvc-proto
|
||||
, libX11, libXext, libXinerama, libXi, libXrender, libXrandr, libXtst, libxcrypt
|
||||
, pkg-config, glib, gdk-pixbuf-xlib, gtk3, gtkmm3, iproute2, dbus, systemd, which
|
||||
, libdrm, udev, util-linux
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, autoreconfHook
|
||||
, bash
|
||||
, fuse3
|
||||
, libmspack
|
||||
, openssl
|
||||
, pam
|
||||
, xercesc
|
||||
, icu
|
||||
, libdnet
|
||||
, procps
|
||||
, libtirpc
|
||||
, rpcsvc-proto
|
||||
, libX11
|
||||
, libXext
|
||||
, libXinerama
|
||||
, libXi
|
||||
, libXrender
|
||||
, libXrandr
|
||||
, libXtst
|
||||
, libxcrypt
|
||||
, libxml2
|
||||
, pkg-config
|
||||
, glib
|
||||
, gdk-pixbuf-xlib
|
||||
, gtk3
|
||||
, gtkmm3
|
||||
, iproute2
|
||||
, dbus
|
||||
, systemd
|
||||
, which
|
||||
, libdrm
|
||||
, udev
|
||||
, util-linux
|
||||
, xmlsec
|
||||
, withX ? true
|
||||
}:
|
||||
|
||||
|
@ -11,9 +44,9 @@ stdenv.mkDerivation rec {
|
|||
version = "12.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmware";
|
||||
repo = "open-vm-tools";
|
||||
rev = "stable-${version}";
|
||||
owner = "vmware";
|
||||
repo = "open-vm-tools";
|
||||
rev = "stable-${version}";
|
||||
hash = "sha256-PgrLu0Bm9Vom5WNl43312QFWKojdXDAGn3Nvj4hzPrQ=";
|
||||
};
|
||||
|
||||
|
@ -21,46 +54,77 @@ stdenv.mkDerivation rec {
|
|||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
||||
buildInputs = [ fuse3 glib icu libdnet libdrm libmspack libtirpc libxcrypt openssl pam procps rpcsvc-proto udev xercesc ]
|
||||
++ lib.optionals withX [ gdk-pixbuf-xlib gtk3 gtkmm3 libX11 libXext libXinerama libXi libXrender libXrandr libXtst ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
makeWrapper
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fuse3
|
||||
glib
|
||||
icu
|
||||
libdnet
|
||||
libdrm
|
||||
libmspack
|
||||
libtirpc
|
||||
libxcrypt
|
||||
libxml2
|
||||
openssl
|
||||
pam
|
||||
procps
|
||||
rpcsvc-proto
|
||||
udev
|
||||
xercesc
|
||||
xmlsec
|
||||
] ++ lib.optionals withX [
|
||||
gdk-pixbuf-xlib
|
||||
gtk3
|
||||
gtkmm3
|
||||
libX11
|
||||
libXext
|
||||
libXinerama
|
||||
libXi
|
||||
libXrender
|
||||
libXrandr
|
||||
libXtst
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' 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,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 Makefile.am \
|
||||
-e 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,'
|
||||
sed -i scripts/Makefile.am \
|
||||
-e 's,^confdir = ,confdir = ''${prefix},' \
|
||||
-e 's,usr/bin,''${prefix}/usr/bin,'
|
||||
sed -i services/vmtoolsd/Makefile.am \
|
||||
-e 's,etc/vmware-tools,''${prefix}/etc/vmware-tools,' \
|
||||
-e 's,$(PAM_PREFIX),''${prefix}/$(PAM_PREFIX),'
|
||||
sed -i vgauth/service/Makefile.am \
|
||||
-e 's,/etc/vmware-tools/vgauth/schemas,''${prefix}/etc/vmware-tools/vgauth/schemas,' \
|
||||
-e 's,$(DESTDIR)/etc/vmware-tools/vgauth.conf,''${prefix}/etc/vmware-tools/vgauth.conf,'
|
||||
|
||||
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
|
||||
sed 1i'#include <sys/sysmacros.h>' -i lib/wiper/wiperPosix.c
|
||||
# don't abort on any warning
|
||||
sed -i 's,CFLAGS="$CFLAGS -Werror",,' configure.ac
|
||||
|
||||
# Make reboot work, shutdown is not in /sbin on NixOS
|
||||
sed -i 's,/sbin/shutdown,shutdown,' lib/system/systemLinux.c
|
||||
# Make reboot work, shutdown is not in /sbin on NixOS
|
||||
sed -i 's,/sbin/shutdown,shutdown,' lib/system/systemLinux.c
|
||||
|
||||
# Fix paths to fuse3 (we do not use fuse2 so that is not modified)
|
||||
sed -i 's,/bin/fusermount3,${fuse3}/bin/fusermount3,' vmhgfs-fuse/config.c
|
||||
# Fix paths to fuse3 (we do not use fuse2 so that is not modified)
|
||||
sed -i 's,/bin/fusermount3,${fuse3}/bin/fusermount3,' vmhgfs-fuse/config.c
|
||||
|
||||
substituteInPlace services/plugins/vix/foundryToolsDaemon.c \
|
||||
--replace "/usr/bin/vmhgfs-fuse" "${placeholder "out"}/bin/vmhgfs-fuse" \
|
||||
--replace "/bin/mount" "${util-linux}/bin/mount"
|
||||
substituteInPlace services/plugins/vix/foundryToolsDaemon.c \
|
||||
--replace "/usr/bin/vmhgfs-fuse" "${placeholder "out"}/bin/vmhgfs-fuse" \
|
||||
--replace "/bin/mount" "${util-linux}/bin/mount"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--without-kernel-modules"
|
||||
"--without-xmlsecurity"
|
||||
"--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
|
||||
"--with-fuse=fuse3"
|
||||
] ++ lib.optional (!withX) "--without-x";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = builtins.toString [
|
||||
# fix build with gcc9
|
||||
"-Wno-error=address-of-packed-member"
|
||||
"-Wno-error=format-overflow"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -p ${placeholder "out"}/lib/udev/rules.d
|
||||
'';
|
||||
|
@ -79,7 +143,7 @@ stdenv.mkDerivation rec {
|
|||
better management of, and seamless user interactions with, guests.
|
||||
'';
|
||||
license = licenses.gpl2;
|
||||
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ joamaki ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,15 +22,20 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ libxml2 gnutls libxslt libgcrypt libtool openssl nss ];
|
||||
buildInputs = [ libxml2 gnutls libgcrypt libtool openssl nss ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# required by xmlsec/transforms.h
|
||||
libxslt
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doCheck = true;
|
||||
checkInputs = [ nss.tools ];
|
||||
preCheck = ''
|
||||
substituteInPlace tests/testrun.sh \
|
||||
--replace 'timestamp=`date +%Y%m%d_%H%M%S`' 'timestamp=19700101_000000' \
|
||||
--replace 'TMPFOLDER=/tmp' '$(mktemp -d)'
|
||||
substituteInPlace tests/testrun.sh \
|
||||
--replace 'timestamp=`date +%Y%m%d_%H%M%S`' 'timestamp=19700101_000000' \
|
||||
--replace 'TMPFOLDER=/tmp' '$(mktemp -d)'
|
||||
'';
|
||||
|
||||
# enable deprecated soap headers required by lasso
|
||||
|
@ -67,13 +72,14 @@ stdenv.mkDerivation rec {
|
|||
touch $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with lib; {
|
||||
description = "XML Security Library in C based on libxml2";
|
||||
homepage = "http://www.aleksey.com/xmlsec";
|
||||
homepage = "https://www.aleksey.com/xmlsec/";
|
||||
downloadPage = "https://www.aleksey.com/xmlsec/download.html";
|
||||
license = lib.licenses.mit;
|
||||
license = licenses.mit;
|
||||
mainProgram = "xmlsec1";
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user