about summary refs log tree commit diff
path: root/pkgs/stdenv/darwin/portable-libsystem.sh
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-07-08 18:57:24 -0600
committerRandy Eckenrode <randy@largeandhighquality.com>2023-07-08 20:49:49 -0600
commitfeb89eed00eb848da8c9eb56f5dad9fa1e79d536 (patch)
tree9f6d3083814f592886beb8dfea4defc4909a3cb3 /pkgs/stdenv/darwin/portable-libsystem.sh
parent94c52940c4275d62d2609ae2cb16b165549d2882 (diff)
downloadnixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.tar
nixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.tar.gz
nixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.tar.bz2
nixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.tar.lz
nixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.tar.xz
nixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.tar.zst
nixlib-feb89eed00eb848da8c9eb56f5dad9fa1e79d536.zip
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.
Diffstat (limited to 'pkgs/stdenv/darwin/portable-libsystem.sh')
-rw-r--r--pkgs/stdenv/darwin/portable-libsystem.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/stdenv/darwin/portable-libsystem.sh b/pkgs/stdenv/darwin/portable-libsystem.sh
index f50ccc8d32ee..1fb80c0e5ce9 100644
--- a/pkgs/stdenv/darwin/portable-libsystem.sh
+++ b/pkgs/stdenv/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
 }