Merge pull request #242399 from reckenrode/portable-libsystem-fix

darwin.stdenv: clean up portable libsystem hook
This commit is contained in:
Weijia Wang
2023-07-09 10:57:26 +03:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -105,6 +105,7 @@ rec {
name = "darwin-portable-libSystem-hook";
substitutions = {
libsystem = "${stdenv.cc.libc}/lib/libSystem.B.dylib";
targetPrefix = stdenv.cc.bintools.targetPrefix;
};
} ./darwin/portable-libsystem.sh)
];
+2 -2
View File
@@ -6,7 +6,7 @@ fixupOutputHooks+=('fixLibsystemRefs $prefix')
fixLibsystemRefs() {
if [ -d "$1/bin" ]; then
find "$1/bin" -exec \
install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
find "$1/bin" -type f -exec \
@targetPrefix@install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
fi
}