templates/rust/cargo-nightly/crane+fenix/shell.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
378 B
Nix

{ pkgs ? import <nixpkgs> {},
crane ? builtins.getFlake "github:ipetkov/crane",
fenix ? builtins.getFlake "github:nix-community/fenix",
}:
let
toolchain = import ./toolchain.nix fenix.packages.${pkgs.stdenv.hostPlatform.system} "dev";
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
in craneLib.devShell {
packages = [
toolchain
pkgs.lldb_21
];
}