mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
7a7c313312
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
101 lines
1.5 KiB
Plaintext
101 lines
1.5 KiB
Plaintext
# This file should only ignore things that are generated during a `x.py` build,
|
|
# generated by common IDEs, and optional files controlled by the user that
|
|
# affect the build (such as config.toml).
|
|
# In particular, things like `mir_dump` should not be listed here; they are only
|
|
# created during manual debugging and many people like to clean up instead of
|
|
# having git ignore such leftovers. You can use `.git/info/exclude` to
|
|
# configure your local ignore list.
|
|
|
|
## File system
|
|
.DS_Store
|
|
desktop.ini
|
|
|
|
## Editor
|
|
*.swp
|
|
*.swo
|
|
Session.vim
|
|
.cproject
|
|
.idea
|
|
*.iml
|
|
.vscode
|
|
.project
|
|
.vim/
|
|
.helix/
|
|
.zed/
|
|
.favorites.json
|
|
.settings/
|
|
.vs/
|
|
.dir-locals.el
|
|
|
|
## Tool
|
|
.valgrindrc
|
|
.cargo
|
|
# Included because it is part of the test case
|
|
!/tests/run-make/thumb-none-qemu/example/.cargo
|
|
|
|
## Configuration
|
|
/config.toml
|
|
/Makefile
|
|
config.mk
|
|
config.stamp
|
|
no_llvm_build
|
|
|
|
## Build
|
|
/dl/
|
|
/doc/
|
|
/inst/
|
|
/llvm/
|
|
/mingw-build/
|
|
build/
|
|
!/compiler/rustc_mir_build/src/build/
|
|
/build-rust-analyzer/
|
|
/dist/
|
|
/unicode-downloads
|
|
/target
|
|
/library/target
|
|
/src/bootstrap/target
|
|
/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
|
|
|
|
## Temporary files
|
|
*~
|
|
\#*
|
|
\#*\#
|
|
.#*
|
|
|
|
## Tags
|
|
tags
|
|
tags.*
|
|
TAGS
|
|
TAGS.*
|
|
|
|
## Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*$py.class
|
|
|
|
## Node
|
|
node_modules
|
|
package-lock.json
|
|
package.json
|
|
|
|
## Rustdoc GUI tests
|
|
tests/rustdoc-gui/src/**.lock
|
|
|
|
## direnv
|
|
.envrc
|
|
.direnv/
|
|
|
|
## nix
|
|
flake.nix
|
|
flake.lock
|
|
default.nix
|
|
|
|
# Before adding new lines, see the comment at the top.
|