diff options
author | Theodore Ni <3806110+tjni@users.noreply.github.com> | 2023-07-14 02:25:25 -0700 |
---|---|---|
committer | Theodore Ni <3806110+tjni@users.noreply.github.com> | 2023-07-14 10:22:55 -0700 |
commit | bb219736e42a0311fcd959a6f639ea53ce1d62ec (patch) | |
tree | 820f322be63556610079c0c8c63d070d87960698 | |
parent | a3b43106c981a3c747ed2c49a343f74f27177b5a (diff) | |
download | nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.tar nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.tar.gz nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.tar.bz2 nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.tar.lz nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.tar.xz nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.tar.zst nixpkgs-bb219736e42a0311fcd959a6f639ea53ce1d62ec.zip |
stdenvBootstrapTools: in darwin, only run install_name_tool on Mach-O files
-rw-r--r-- | pkgs/stdenv/darwin/make-bootstrap-tools.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 9c580447a6f..c20684e01a3 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -151,7 +151,7 @@ in rec { # Strip executables even further for i in $out/bin/*; do - if [[ ! -L $i ]]; then + if [[ ! -L $i ]] && isMachO "$i"; then chmod +w $i ${stdenv.cc.targetPrefix}strip $i || true fi @@ -164,7 +164,7 @@ in rec { done for i in $out/bin/*; do - if [[ ! -L "$i" ]]; then + if [[ ! -L "$i" ]] && isMachO "$i"; then ${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i fi done |