oxalica / rust-overlay

Pure and reproducible nix overlay of binary distributed rust toolchains
MIT License
960 stars 57 forks source link

Latest nixpkgs version breaks rust-overlay #195

Closed CertainLach closed 1 week ago

CertainLach commented 2 weeks ago
       >   = note: /nix/store/bmcl5k9c80pb4jdhkgz9fnbrlffzpgql-rust-default-1.81.0-nightly-2024-07-08/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld/ld.lld: line 19: /nix/store/lmhzf8i3rgkqgmy1i91664jnrr8kg5i5-rustc-1.81.0-nightly-2024-07-08-x86_64-unknown-linux-gnu/nix-support/darwin-sdk-setup.bash: No such file or directory

This is caused by this nixpkgs commit https://github.com/NixOS/nixpkgs/commit/9142a070307ca6f18eb6e02aa2bca4855406680e

And this line in ld.lld file https://github.com/NixOS/nixpkgs/blame/master/pkgs/build-support/bintools-wrapper/ld-wrapper.sh#L19

This file is copied to rust-default derivation here: https://github.com/oxalica/rust-overlay/blob/f6c4c2a7b8969c2b172847b3ef474e0d3bd8bdce/lib/mk-component-set.nix#L128

ld.lld calls nix-support/darwin-sdk-setup.bash, which was recently added to nixpkgs.

However, rust-overlay does not copy darwin-sdk-setup.bash to its rustc derivation, thus causing "No such file" error.

Even though file is called darwin-sdk-setup.bash, this error also appears on Linux.