diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 7510801cd79..a9ec076a543 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -8,9 +8,12 @@ let sha256 = "fc1370ef38abeeb13f55c905ec002e60705fb0bfde3b8d21c8d6eb8056c11bac"; }; - patches = [ ./ignore-missing-includedirs.patch ./implement-getgrouplist.patch ]; + patches = [ + ./ignore-missing-includedirs.patch ./implement-getgrouplist.patch + ./ucred-dirty-hack.patch + ]; - configureFlags = "--enable-embedded-tests --localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp"; + configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp"; in rec { @@ -19,7 +22,7 @@ in rec { nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ expat ]; + buildInputs = [ expat libX11 ]; # FIXME: dbus has optional systemd integration when checking # at_console policies. How to enable this without introducing a diff --git a/pkgs/development/libraries/dbus/ucred-dirty-hack.patch b/pkgs/development/libraries/dbus/ucred-dirty-hack.patch new file mode 100644 index 00000000000..a07abcc15fb --- /dev/null +++ b/pkgs/development/libraries/dbus/ucred-dirty-hack.patch @@ -0,0 +1,18 @@ +diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c +index b4ecc96..267984a 100644 +--- a/dbus/dbus-sysdeps-unix.c ++++ b/dbus/dbus-sysdeps-unix.c +@@ -1635,6 +1635,13 @@ write_credentials_byte (int server_fd, + } + } + ++struct ucred ++{ ++ pid_t pid; /* PID of sending process. */ ++ uid_t uid; /* UID of sending process. */ ++ gid_t gid; /* GID of sending process. */ ++}; ++ + /** + * Reads a single byte which must be nul (an error occurs otherwise), + * and reads unix credentials if available. Clears the credentials