-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a more convinient way of developing rustc on NixOS #129620
Conversation
This comment has been minimized.
This comment has been minimized.
i feel like it makes more sense to just have a |
@Noratrieb I thought about it for a while, and I think I would still prefer this being a flake, simply for the purposes of stability. I've removed the lock file though (and @rustbot ready |
This comment has been minimized.
This comment has been minimized.
well, flakes are literally unstable :P i think making everyone update their flake is annoying and I wouldn't want to use it myself - but the .envrc forces me to (I assume direnv has ways to work around this but it's still annoying). I'd be happy with having both a flake.nix and a shell.nix in the subdirectory, and also moving the .envrc there, so people can pick what they prefer (and the .envrc doesn't pollute the top level files even more) |
Done. I've added a nix-shell shell and two envrc files for flakes and nix-shell respectively, with the instruction on how to "enable" them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, we can always patch it later if it's not good
@bors r+ rollup |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#129620 (Provide a more convinient way of developing rustc on NixOS) - rust-lang#131805 (rustc_llvm: Fix flattened CLI args) - rust-lang#131818 (Enable XRay instrumentation for LoongArch Linux targets) - rust-lang#131825 (SolverDelegate add assoc type for Infcx) - rust-lang#131833 (Add `must_use` to `CommandExt::exec`) - rust-lang#131835 (Do not run test where it cannot run) - rust-lang#131844 (Add mailmap entry for kobzol) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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](https://github.com/Noratrieb/nixos/tree/26ea68e1a0aadaab313c1b5a8c1033a9770bd138/custom-pkgs/x) - rust-lang/rustup#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 PR adds envrc files which, once symlinked as
.envrc
will activates a dev shell fromsrc/tools/nix-dev-shell/flake.nix
orsrc/tools/nix-dev-shell/shell.nix
.This is based on
x
nix packageThis is something that I plan to use personally, but I thought it might be worth upstreaming :)
r? Noratrieb