Rollup merge of #129620 - WaffleLapkin:flake, r=Noratrieb
Provide a more convinient way of developing rustc on NixOS
This PR adds envrc files which, once symlinked as `.envrc` will activates a dev shell from `src/tools/nix-dev-shell/flake.nix` or `src/tools/nix-dev-shell/shell.nix`.
This is based on
- [Current rustc dev guide recommendation for NixOS](https://rustc-dev-guide.rust-lang.org/building/suggested.html?highlight=nix#using-nix-shell)
- https://github.com/oxalica/rust-overlay?tab=readme-ov-file#use-in-devshell-for-nix-develop
- [Nora's `x` nix package](26ea68e1a0/custom-pkgs/x
)
- https://github.com/rust-lang/rustup/pull/2891
- [Direnv: use flake/nix according to availability](https://discourse.nixos.org/t/direnv-use-flake-nix-according-to-availability/29825)
This is something that I plan to use personally, but I thought it might be worth upstreaming :)
r? Noratrieb
This commit is contained in:
commit
7a7c313312
7 changed files with 141 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -57,6 +57,8 @@ build/
|
|||
/src/tools/x/target
|
||||
# Created by default with `src/ci/docker/run.sh`
|
||||
/obj/
|
||||
# Created by nix dev shell / .envrc
|
||||
src/tools/nix-dev-shell/flake.lock
|
||||
|
||||
## ICE reports
|
||||
rustc-ice-*.txt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue