Skip to content

Don't add pkgs.rustc to PATH in nix dev shell - #163880

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:dont-pollute-path
Oct 7, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
maxdexh:dont-pollute-path

Conversation

@maxdexh

@maxdexh maxdexh commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

This has annoyed me since I switched to the shell provided by this repo.

The shell.nix dumps all dependencies of x into the shell path, which includes pkgs.rustc. The problem is that pkgs.rustc from nixpkgs is not managed by rustup, which means it doesn't support specifying the +toolchain to compile with. This also breaks the src/tools/miri/miri script, since it links a toolchain called miri and uses rustc +miri in multiple places.

This PR makes it so that rustc is not added to the env.

r? bootstrap

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 6, 2026
@maxdexh maxdexh changed the title Don't add rustc to env in nix dev shell Don't add rustc to PATH in nix dev shell Oct 6, 2026
@maxdexh
maxdexh marked this pull request as ready for review October 6, 2026 12:31
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 6, 2026
@maxdexh maxdexh changed the title Don't add rustc to PATH in nix dev shell Don't add pkgs.rustc to PATH in nix dev shell Oct 6, 2026

@clubby789 clubby789 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, r=me rollup when green (though I'm not sure if this is even exercised in CI?)

View changes since this review

@maxdexh

maxdexh commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

I don't have r+ perms ^^
But we have tentative approvals now, bors should should just wait for green CI when you r+

@clubby789

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7c69454 has been approved by clubby789

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 6, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 6, 2026
…y789

Don't add pkgs.rustc to PATH in nix dev shell

This has annoyed me since I switched to the shell provided by this repo.

The `shell.nix` dumps all dependencies of `x` into the shell path, which includes `pkgs.rustc`. The problem is that `pkgs.rustc` from nixpkgs is not managed by rustup, which means it doesn't support specifying the `+toolchain` to compile with. This also breaks the `src/tools/miri/miri` script, since it links a toolchain called `miri` and uses `rustc +miri` in multiple places.

This PR makes it so that `rustc` is not added to the env.

r? bootstrap
rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI)
 - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`)
 - #163863 (use the type name instead of `Self` in constructor paths again)
 - #163864 (Remove CLAUDE.md)
 - #163877 (Add regression test for duplicated rustdoc search results between std and core)
 - #162000 (peel_transparent_wrappers only works on non-1ZST)
 - #163257 (abby DSL: sanity checks on forall where clauses)
 - #163348 (perf:cache FFI safety results in improper_ctypes lint)
 - #163768 (Move more `rustdoc-html` tests in the right location)
 - #163778 (check is_indirect_first_projection when replacing in RefProp)
 - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places)
 - #163807 (Add `has_reliable_f16b` for Arm)
 - #163826 (Update books)
 - #163849 (ci: update to PowerShell 7.6.6)
 - #163870 (Add if-installed:auto:spellcheck to pre-push script)
 - #163874 (explicitly check for fresh vars in canonicalize)
 - #163880 (Don't add pkgs.rustc to PATH in nix dev shell)
rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI)
 - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`)
 - #163863 (use the type name instead of `Self` in constructor paths again)
 - #163864 (Remove CLAUDE.md)
 - #163877 (Add regression test for duplicated rustdoc search results between std and core)
 - #162000 (peel_transparent_wrappers only works on non-1ZST)
 - #163257 (abby DSL: sanity checks on forall where clauses)
 - #163348 (perf:cache FFI safety results in improper_ctypes lint)
 - #163768 (Move more `rustdoc-html` tests in the right location)
 - #163778 (check is_indirect_first_projection when replacing in RefProp)
 - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places)
 - #163807 (Add `has_reliable_f16b` for Arm)
 - #163826 (Update books)
 - #163849 (ci: update to PowerShell 7.6.6)
 - #163870 (Add if-installed:auto:spellcheck to pre-push script)
 - #163874 (explicitly check for fresh vars in canonicalize)
 - #163880 (Don't add pkgs.rustc to PATH in nix dev shell)
rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI)
 - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`)
 - #163863 (use the type name instead of `Self` in constructor paths again)
 - #163864 (Remove CLAUDE.md)
 - #163877 (Add regression test for duplicated rustdoc search results between std and core)
 - #162000 (peel_transparent_wrappers only works on non-1ZST)
 - #163257 (abby DSL: sanity checks on forall where clauses)
 - #163348 (perf:cache FFI safety results in improper_ctypes lint)
 - #163768 (Move more `rustdoc-html` tests in the right location)
 - #163778 (check is_indirect_first_projection when replacing in RefProp)
 - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places)
 - #163807 (Add `has_reliable_f16b` for Arm)
 - #163826 (Update books)
 - #163849 (ci: update to PowerShell 7.6.6)
 - #163870 (Add if-installed:auto:spellcheck to pre-push script)
 - #163874 (explicitly check for fresh vars in canonicalize)
 - #163880 (Don't add pkgs.rustc to PATH in nix dev shell)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…y789

Don't add pkgs.rustc to PATH in nix dev shell

This has annoyed me since I switched to the shell provided by this repo.

The `shell.nix` dumps all dependencies of `x` into the shell path, which includes `pkgs.rustc`. The problem is that `pkgs.rustc` from nixpkgs is not managed by rustup, which means it doesn't support specifying the `+toolchain` to compile with. This also breaks the `src/tools/miri/miri` script, since it links a toolchain called `miri` and uses `rustc +miri` in multiple places.

This PR makes it so that `rustc` is not added to the env.

r? bootstrap
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 7, 2026
…y789

Don't add pkgs.rustc to PATH in nix dev shell

This has annoyed me since I switched to the shell provided by this repo.

The `shell.nix` dumps all dependencies of `x` into the shell path, which includes `pkgs.rustc`. The problem is that `pkgs.rustc` from nixpkgs is not managed by rustup, which means it doesn't support specifying the `+toolchain` to compile with. This also breaks the `src/tools/miri/miri` script, since it links a toolchain called `miri` and uses `rustc +miri` in multiple places.

This PR makes it so that `rustc` is not added to the env.

r? bootstrap
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #163887 (Remove `NonOwner` variant from `AstOwner`)
 - #163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - #162156 (add IBM f128 type)
 - #163925 (Submodule update of rustc-perf)
 - #163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - #163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - #163874 (explicitly check for fresh vars in canonicalize)
 - #163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - #163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - #163894 (revisions for TAIT in env bug)
 - #163902 (Clean up Reference annotations that drifted)
 - #163905 (Remove redundant closure in bootstrap)
 - #163921 (abby DSL: implement ambiguity)
 - #163927 (abby DSL: change `where` syntax to `predicates`)
 - #163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - #163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
@rust-bors
rust-bors Bot merged commit f74c291 into rust-lang:main Oct 7, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 7, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 7, 2026
Rollup merge of #163880 - maxdexh:dont-pollute-path, r=clubby789

Don't add pkgs.rustc to PATH in nix dev shell

This has annoyed me since I switched to the shell provided by this repo.

The `shell.nix` dumps all dependencies of `x` into the shell path, which includes `pkgs.rustc`. The problem is that `pkgs.rustc` from nixpkgs is not managed by rustup, which means it doesn't support specifying the `+toolchain` to compile with. This also breaks the `src/tools/miri/miri` script, since it links a toolchain called `miri` and uses `rustc +miri` in multiple places.

This PR makes it so that `rustc` is not added to the env.

r? bootstrap
@maxdexh
maxdexh deleted the dont-pollute-path branch October 7, 2026 20:46
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Oct 8, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Oct 8, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
makai410 pushed a commit to makai410/rustc_public that referenced this pull request Oct 9, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - rust-lang/rust#163887 (Remove `NonOwner` variant from `AstOwner`)
 - rust-lang/rust#163892 (add revisions for `pass -> [err|ICE]` ui tests `-Znext-solver` )
 - rust-lang/rust#162156 (add IBM f128 type)
 - rust-lang/rust#163925 (Submodule update of rustc-perf)
 - rust-lang/rust#163658 ([PAC] Stop hard coding key and discriminator, consult schema instead)
 - rust-lang/rust#163854 (Include offset in the alignment check when creating ConstValue::Indirect in GVN)
 - rust-lang/rust#163874 (explicitly check for fresh vars in canonicalize)
 - rust-lang/rust#163880 (Don't add pkgs.rustc to PATH in nix dev shell)
 - rust-lang/rust#163893 (Panic on `StableHash` of a `Path` with `GenericArgs`)
 - rust-lang/rust#163894 (revisions for TAIT in env bug)
 - rust-lang/rust#163902 (Clean up Reference annotations that drifted)
 - rust-lang/rust#163905 (Remove redundant closure in bootstrap)
 - rust-lang/rust#163921 (abby DSL: implement ambiguity)
 - rust-lang/rust#163927 (abby DSL: change `where` syntax to `predicates`)
 - rust-lang/rust#163933 (Add `synchronization` import lib to windows-gnullvm dist)
 - rust-lang/rust#163937 (Abby test DSL: dont ICE on foralls with unused bound vars)

> [!WARNING]
> This rollup conflicts with pending auto build #163934 and may need to be recreated if the pending build succeeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants