Skip to content

Commit

Permalink
stdenv/darwin: fix portable libsystem hook
Browse files Browse the repository at this point in the history
Some packages don’t have /bin directories. We should only run
install_name_tool if that directory exists.

(cherry picked from commit 0b85745)
  • Loading branch information
matthewbauer authored and Ericson2314 committed Dec 13, 2018
1 parent 3c36dcc commit af2cebe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/stdenv/darwin/portable-libsystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit af2cebe

Please sign in to comment.