2018-12-05 04:17:22 +01: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 19:51:44 +01:00
|
|
|
if [ -d "$1/bin" ]; then
|
|
|
|
find "$1/bin" -exec \
|
|
|
|
install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
|
|
|
|
fi
|
2018-12-05 04:17:22 +01:00
|
|
|
}
|