templates/rust/cargo-nightly/crane+fenix/shell.nix

16 lines
439 B
Nix

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