From 171926f883a3ea50add3939d569a75417982f72c Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 19 Jan 2026 19:38:26 -0500 Subject: [PATCH] dbus: default to using tmpdir instead of launchd activation This matches the default behavior on Linux. If D-Bus defaults to launchd activation, all packages or tests using `dbus-run-session` will fail due the launch agent not being installed and available. --- pkgs/by-name/db/dbus/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/db/dbus/package.nix b/pkgs/by-name/db/dbus/package.nix index 7084c73c5085..264f6d944497 100644 --- a/pkgs/by-name/db/dbus/package.nix +++ b/pkgs/by-name/db/dbus/package.nix @@ -129,6 +129,9 @@ stdenv.mkDerivation (finalAttrs: { "-Dselinux=disabled" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # D-Bus defaults to launchd-activation on Darwin, but that requires the launch agent be installed. It also breaks + # anything that uses `dbus-run-session` in tests. Changing the default aligns Darwin with other UNIX platforms. + "-Ddbus_session_bus_listen_address=unix:tmpdir=/tmp" # `launchctl` is only needed at runtime. Lie to `find_program` because it will always be present on a Darwin host. "--cross-file=${writeText "darwin.ini" '' [binaries]