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 }