Using this function properly links the `rustup` components together, allowing e.g. `rust-analyzer` to find the location of `rust-src`.
13 lines
378 B
Nix
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
|
|
];
|
|
}
|