templates/rust/cargo-nightly/crane+fenix/toolchain.nix
Kiana Sheibani 306981fd2a
fix(rust): use proper withComponents toolchain
Using this function properly links the `rustup` components together,
allowing e.g. `rust-analyzer` to find the location of `rust-src`.
2026-02-22 05:28:22 -05:00

13 lines
238 B
Nix

fenixPkgs: proc:
fenixPkgs.complete.withComponents ([
"rustc"
"rust-std"
"cargo"
] ++ (if proc != "build" then [
"clippy"
] else []) ++ (if proc == "dev" then [
"rust-docs"
"rustfmt"
"rust-src"
"rust-analyzer"
] else []))