usage:
nix flake new -t "github:numtide/devshell" .
- replace
devshell.toml
with version from this gist
NOTE: preferrably rust-src would be available as a package so we could use the normal nix packages for cargo, clippy, rustfmt, etc. but since it isn't, this is the easiest way to get a rust environment setup with devshell.
That said, a more "correct" solution would be to use an overlay: https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570