about summary refs log tree commit diff
path: root/nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh')
-rw-r--r--nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh b/nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh
index 63b72972d717..4bb84f6409cb 100644
--- a/nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh
+++ b/nixpkgs/pkgs/stdenv/darwin/unpack-bootstrap-tools-aarch64.sh
@@ -19,6 +19,11 @@ updateInstallName() {
 
   cp "$path" "$path.new"
   install_name_tool -id "$path" "$path.new"
+  # workaround for https://github.com/NixOS/nixpkgs/issues/294518
+  # libc++.1.0.dylib contains wrong LC_RPATH
+  if [[ ${path} == *libc++.1.0.dylib ]]; then
+    install_name_tool -add_rpath @loader_path/.. "${path}.new"
+  fi
   codesign -f -i "$(basename "$path")" -s - "$path.new"
   mv -f "$path.new" "$path"
 }