Skip to content

Commit

Permalink
rustfmt-nightly: add -headerpad_max_install_names x64 darwin (#369349)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Dec 30, 2024
2 parents 0835650 + 2546152 commit 1d8eab1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/compilers/rust/rustfmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ rustPlatform.buildRustPackage rec {
install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/git-rustfmt"
'';

env = lib.optionalAttrs (asNightly && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) {
# give install_name_tool enough space so preFixup doesn't fail
NIX_LDFLAGS = "-headerpad_max_install_names";
};

# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
RUSTC_BOOTSTRAP = 1;

Expand Down

0 comments on commit 1d8eab1

Please sign in to comment.