2018-12-05 03:17:22 +00:00
|
|
|
# Make /nix/store/...-libSystem “portable” for static built binaries.
|
|
|
|
# This just rewrites everything in $1/bin to use the
|
|
|
|
# /usr/lib/libSystem.B.dylib that is provided on every macOS system.
|
|
|
|
|
|
|
|
fixupOutputHooks+=('fixLibsystemRefs $prefix')
|
|
|
|
|
|
|
|
fixLibsystemRefs() {
|
2018-12-05 18:51:44 +00:00
|
|
|
if [ -d "$1/bin" ]; then
|
2023-07-09 01:30:33 +00:00
|
|
|
find "$1/bin" -type f -exec \
|
2023-07-09 00:57:24 +00:00
|
|
|
@targetPrefix@install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
|
2018-12-05 18:51:44 +00:00
|
|
|
fi
|
2018-12-05 03:17:22 +00:00
|
|
|
}
|