From 329b59d07d7f527a9dcb25481b3504804b8cd70b Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 19 Jan 2026 19:38:26 -0500 Subject: [PATCH] dbus: fix install name on installed binaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some binaries have incorrect install names. They should be the absolute path, but they have `@rpath` instead. This something that Meson should handle automatically, but it’s not happening for these binaries. --- pkgs/by-name/db/dbus/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/db/dbus/package.nix b/pkgs/by-name/db/dbus/package.nix index b754f292c7c3..7084c73c5085 100644 --- a/pkgs/by-name/db/dbus/package.nix +++ b/pkgs/by-name/db/dbus/package.nix @@ -156,6 +156,14 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"' ''; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' + # For some reason, only these binaries reference the dylib by rpath instead of by an absolute install name. + for exe in bin/dbus-daemon bin/dbus-run-session libexec/dbus-daemon-launch-helper; do + install_name_tool "$out/$exe" \ + -change "@rpath/libdbus-1.3.dylib" "$lib/lib/libdbus-1.3.dylib" + done + ''; + postFixup = '' # It's executed from $lib by absolute path moveToOutput bin/dbus-launch "$lib"