darwin.stdenv: fix portable libsystem hook with sandboxing
When sandboxing is enabled, the hook tries to run `install_name_tool` and fails because the system one is inaccessible. Having it use `targetPrefix` allows it to find and use the cross-install_name_tool.
This commit is contained in:
parent
94c52940c4
commit
feb89eed00
2 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
];
|
||||
|
|
|
@ -7,6 +7,6 @@ fixupOutputHooks+=('fixLibsystemRefs $prefix')
|
|||
fixLibsystemRefs() {
|
||||
if [ -d "$1/bin" ]; then
|
||||
find "$1/bin" -exec \
|
||||
install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
|
||||
@targetPrefix@install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue