-
-
Notifications
You must be signed in to change notification settings - Fork 176
nix: update rust-toolchain in shell #1007
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
let | ||
sources = import ./sources.nix { }; | ||
rust-overlay = import sources.rust-overlay; | ||
in | ||
import sources.nixpkgs { overlays = [ rust-overlay ]; } | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Returns the Rust toolchain for Nix compliant to the rust-toolchain.toml file | ||
# but without rustup. | ||
|
||
{ | ||
# Comes from rust-overlay | ||
rust-bin | ||
}: | ||
|
||
# Includes rustc, cargo, rustfmt, etc | ||
rust-bin.fromRustupToolchainFile ../rust-toolchain.toml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
{ | ||
"nixpkgs": { | ||
"branch": "nixos-23.05", | ||
"description": "Nix Packages collection", | ||
"homepage": null, | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "6b0edc9c690c1d8a729f055e0d73439045cfda55", | ||
"sha256": "1fdsnmkcz1h5wffjci29af4jrd68pzdvrhbs083niwqfd6ssm633", | ||
"type": "tarball", | ||
"url": "https://github.com/NixOS/nixpkgs/archive/6b0edc9c690c1d8a729f055e0d73439045cfda55.tar.gz", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
} | ||
"nixpkgs": { | ||
"branch": "nixos-23.05", | ||
"description": "Nix Packages collection", | ||
"homepage": null, | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "da4024d0ead5d7820f6bd15147d3fe2a0c0cec73", | ||
"sha256": "1y12a4hgxx2lixrcbyhycwxvrrfik1lxjnwkprar0r6173rwy9ax", | ||
"type": "tarball", | ||
"url": "https://github.com/NixOS/nixpkgs/archive/da4024d0ead5d7820f6bd15147d3fe2a0c0cec73.tar.gz", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
}, | ||
"rust-overlay": { | ||
"branch": "master", | ||
"description": "Pure and reproducible nix overlay of binary distributed rust toolchains", | ||
"homepage": "", | ||
"owner": "oxalica", | ||
"repo": "rust-overlay", | ||
"rev": "e485313fc485700a9f1f9b8b272ddc0621d08357", | ||
"sha256": "1v1gq022rnni6mm42pxmw6c5yy9il4jb2l92irh154ax616x2rzd", | ||
"type": "tarball", | ||
"url": "https://github.com/oxalica/rust-overlay/archive/e485313fc485700a9f1f9b8b272ddc0621d08357.tar.gz", | ||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
[toolchain] | ||
channel = "stable" | ||
# cargo, clippy, rustc, rust-docs, rustfmt, rust-std | ||
profile = "default" | ||
targets = ["aarch64-unknown-uefi", "i686-unknown-uefi", "x86_64-unknown-uefi"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think this is fine: any concerns @nicholasbishop ?
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.
Seems fine to me, but just for my own edification, why is this part of the change necessary?
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.
So that
rust-bin.fromRustupToolchainFile ../rust-toolchain.toml
can pick the right toolchain for Nix.