mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
dbus: fix install name on installed binaries
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.
This commit is contained in:
parent
555679dce0
commit
329b59d07d
1 changed files with 8 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue