nixpkgs/pkgs/build-support/rust
Adam Joseph bbb42450c5 default-crate-overrides: proc-macro-crate assumes env::var("CARGO")
Since version 2.0.0, proc-macro-crate has assumed it can exec()
`env::var("CARGO")` in order to run `cargo locate-project`.

This commit adds a crate override to proc-macro-crate which simply writes the
path to buildPlatform.cargo into the proc-macro-crate sources.

This way we don't need to set `env.CARGO` for every build that depends on
proc-macro-crate -- if we do that, the $CARGO environment variable would be
visible to the entire build.  This could potentially lead to incredibly
hard-to-troubleshoot heisenbugs if there is some other crate that expects
`env::var("CARGO")` to exist -- that other crate would mysteriously work only
in projects that use proc-macro-crate but not anywhere else!
2024-08-23 09:36:47 +03:00
..
build-rust-crate buildRustCrate: don't swallow build.rs output 2024-07-05 21:39:08 +03:00
build-rust-package buildRustPackage: deprecate cargoSha256 in favor of cargoHash 2024-07-03 21:54:26 +08:00
fetch-cargo-tarball Revert "rust: Write config.toml not config" 2024-06-23 12:32:29 -04:00
hooks Revert "rust: Write config.toml not config" 2024-06-23 12:32:29 -04:00
lib rust.envVars: use wrapped LLD for aarch64 musl 2024-01-23 17:25:50 +01:00
rustc-wrapper wrapRustc: wrap rustdoc 2024-03-02 13:09:07 +01:00
sysroot
test/import-cargo-lock rustPlatform.importCargoLock: Adding sparse protocol 2024-04-17 15:42:49 +02:00
default-crate-overrides.nix default-crate-overrides: proc-macro-crate assumes env::var("CARGO") 2024-08-23 09:36:47 +03:00
fetchcargo-default-config.toml
fetchcrate.nix fetchCrate: fix registryDl 2023-05-28 13:20:03 -04:00
import-cargo-lock.nix Revert "rust: Write config.toml not config" 2024-06-23 12:32:29 -04:00
replace-workspace-values.py build-support/rust: rewrite workspace dependency inheritance 2024-05-10 20:55:39 +03:00