diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh')
-rw-r--r-- | nixpkgs/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/nixpkgs/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh index 1b36f5f555da..af2ff0cc9662 100644 --- a/nixpkgs/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh +++ b/nixpkgs/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh @@ -23,7 +23,14 @@ fixDarwinDylibNames() { for fn in "$@"; do if [ -L "$fn" ]; then continue; fi echo "$fn: fixing dylib" - install_name_tool -id "$fn" "${flags[@]}" "$fn" + int_out=$(install_name_tool -id "$fn" "${flags[@]}" "$fn" 2>&1) + result=$? + if [ "$result" -ne 0 ] && + ! grep "shared library stub file and can't be changed" <<< "$out" + then + echo "$int_out" >&2 + exit "$result" + fi done } |