Add rust devshell

Add sccache

Add clang so rust can actually build
This commit is contained in:
Nathan McCarty 2024-11-30 09:02:46 +00:00
parent 16db8372c8
commit b136c7988e
3 changed files with 80 additions and 17 deletions

29
devshells/rust.nix Normal file
View file

@ -0,0 +1,29 @@
{ withSystem, inputs, ... }:
{
perSystem =
{ config, pkgs, ... }:
{
devshells.rust = {
env = [
{
name = "RUSTC_WRAPPER";
value = "${pkgs.sccache}/bin/sccache";
}
];
commands = [
# {
# help = "print hello";
# name = "hello";
# command = "echo hello";
# }
];
packages = with pkgs; [
# Rust toolchain
clang
rustup
# Faster builds
sccache
];
};
};
}