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
[WIP] rust: add update script #21922
Conversation
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.
Could you split pkgs/development/compilers/rust/default.nix
into smaller files.
Some first nits while glancing over this, haven't reviewed this thoroughly though.
@@ -7,12 +7,14 @@ rustPlatform.buildRustPackage rec { | |||
name = "cargo-${version}"; | |||
inherit version; | |||
|
|||
src = fetchgit { | |||
url = "https://github.com/rust-lang/cargo"; | |||
src = fetchFromGitHub { |
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.
AFAIK fetchFromGitHub
does not work with submodules
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 don't use github here. The source code comes from rust-lang.org
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.
Huh, you are doing so in this line? 🤔 And cargo is using submodules.
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.
sorry mixed that up with rustc. I restored fetchgit
for cargo even though the rust-installer
submodule is not needed to compile cargo.
prePatch = "cd rust-src/lib/rustlib/src/rust"; | ||
|
||
# We need rust to build rust. | ||
# Enable vendor flag will prevent rust from downloading anything |
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.
Enable -> Enabling
|
- script to automatically checksums for stable, beta, nightly (only dependency closure needs to be updated manually) - unify code for bootstraping + add platforms for all channels - fix rustc sandbox builds (cargo no longer download the registry)
@grahamc I refactored & uploaded a little bit too early and rust takes ages to compile. Now it is in a working stage again. |
For me, as often as it is released! |
@matthiasbeyer Then use https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-overlay.nix overlay. |
Policy question: How frequent do we want to update rustNightly?
Things done
depsSha256
needs to be updated manually)TODO
depsSha256
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)