Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

nix-shell documentation #115969

Closed
wants to merge 8 commits into from
Closed

nix-shell documentation #115969

wants to merge 8 commits into from

Conversation

pelasgus
Copy link

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=tsimouris
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_c7f5ad70-c936-4970-9b0d-8a0cd5062543
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=93d3d6b55e54962ddc036f91ba2b7ba43c9d26bd
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_c7f5ad70-c936-4970-9b0d-8a0cd5062543
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_c7f5ad70-c936-4970-9b0d-8a0cd5062543
GITHUB_TRIGGERING_ACTOR=tsimouris
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/115969/merge
GITHUB_WORKFLOW_SHA=93d3d6b55e54962ddc036f91ba2b7ba43c9d26bd
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_18_X64=/opt/hostedtoolcache/go/1.18.10/x64
---
No error code explanation was removed!
+ reuse lint
# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no copyright and licensing information:
* ../nix-shell/rust_contributor_shell.nix
* ../nix-shell/rust_user_shell.nix

# SUMMARY

* Bad licenses:
---
* Read errors: 0
* Files with copyright information: 43569 / 43571
* Files with license information: 43569 / 43571

Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-(
  network time: Tue, 26 Sep 2023 22:02:58 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@Noratrieb
Copy link
Member

Noratrieb commented Sep 27, 2023

We already have a nix shell in the dev guide to copy and adjust as liked
https://rustc-dev-guide.rust-lang.org/building/suggested.html#using-nix-shell

I'm not sure whether it's worth it to keep one in the repo (if we do, then it should definitely go into src/etc instead of a top level directory) but I think it's better to just link to the dev guide instead.

@Mark-Simulacrum
Copy link
Member

I don't think we should keep two copies of this, and rustc-dev-guide seems like the better place to me. I'm happy to merge a PR pointing to the dev guide for Nix specifically if we don't have that yet.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 30, 2023
@Dylan-DPC
Copy link
Member

@pelasgus any updates?

@bors
Copy link
Contributor

bors commented Jan 14, 2024

☔ The latest upstream changes (presumably #119945) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

Closing this as it's better to have this in one place and has been inactive for a while

@Dylan-DPC Dylan-DPC closed this Feb 15, 2024
@Dylan-DPC Dylan-DPC removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 15, 2024
@futile
Copy link
Contributor

futile commented Jul 31, 2024

Just spent quite some time (read: hours) creating my own nix-shell (well, a flake.nix) for rustc development, before I found the one in the docs 🙃. There are some non-obvious parts, and it's hard to know that you got it right, even if it works for what you're testing.

I tried searching for *.nix files in the repo before, but didn't see any, and also didn't find the relevant docs page while googling. It seems the magic google incantation needs to contain rustc dev nix-shell, just rustc dev nix or rustc nix-shell is not enough. And even then it's not the first result, but it can be found.

Also, nowadays Nix flakes are used a lot, where the file is then called flake.nix, and googling for rustc dev flake or rustc devShell (devShell is the name used in flake.nix) doesn't turn up any (helpful) links either, especially not the one in the rustc dev guide.

So I think discoverability would really benefit from adding an (example) nix-shell to the source tree, e.g., in src/etc/nix/{flake.nix,shell.nix}. These two (new and old Nix shell formats) can be made compatible, i.e., without having to repeat the configuration.

Some other way of increasing discoverability would also be ok, but I think just adding it as a file, even just shell.nix, ignoring flake.nix for now, would be a massive help.

Posted here since the discussion seemed related/relevant, let me know if I should open a new issue/PR instead! Cheers & thanks! :)

@pelasgus
Copy link
Author

@Dylan-DPC please forgive my tardiness. Please do re-open, I will provide new declarative shells for both nix(shell & flake) and guix, contribute them to the docs and then restructure the readme so they link here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants