From 0b8574540b8691924a8dac6dc4d03004d8b25efa Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 5 Dec 2018 12:51:44 -0600 Subject: [PATCH] stdenv/darwin: fix portable libsystem hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some packages don’t have /bin directories. We should only run install_name_tool if that directory exists. --- pkgs/stdenv/darwin/portable-libsystem.sh | 6 ++++-- 1 file 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 }