about summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-12-05 12:51:44 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2018-12-05 12:56:12 -0600
commit0b8574540b8691924a8dac6dc4d03004d8b25efa (patch)
tree70840d43f71221ba6fb704c60c567fbd85701614 /pkgs/stdenv
parent703827f36cc65b137eed4d759b31827d29733072 (diff)
downloadnixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.tar
nixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.tar.gz
nixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.tar.bz2
nixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.tar.lz
nixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.tar.xz
nixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.tar.zst
nixlib-0b8574540b8691924a8dac6dc4d03004d8b25efa.zip
stdenv/darwin: fix portable libsystem hook
Some packages don’t have /bin directories. We should only run
install_name_tool if that directory exists.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/darwin/portable-libsystem.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/stdenv/darwin/portable-libsystem.sh b/pkgs/stdenv/darwin/portable-libsystem.sh
index 27ae790fb5ab..f50ccc8d32ee 100644
--- a/pkgs/stdenv/darwin/portable-libsystem.sh
+++ b/pkgs/stdenv/darwin/portable-libsystem.sh
@@ -5,6 +5,8 @@
 fixupOutputHooks+=('fixLibsystemRefs $prefix')
 
 fixLibsystemRefs() {
-  find "$1/bin" \
-    -exec install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
+  if [ -d "$1/bin" ]; then
+      find "$1/bin" -exec \
+        install_name_tool -change @libsystem@ /usr/lib/libSystem.B.dylib {} \;
+  fi
 }