Rust-src not found, and other misadventures of developing rust on NixOS

Many Rust analysis tools will inspect RUST_SRC_PATH, so you should be able to do something like (untested):

pkgs.mkShell {
   # ...

   RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
}
5 Likes