Skip to content
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

chore: bump nix rust to match rust-toolchain.toml #867

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

ashutoshvarma
Copy link
Member

Pull Request Summary
Bumping Rust channel in Nix env.

When using Nix to build runtime with command nix-shell -I nixpkgs=channel:nixos-21.05 third-party/nix/shell.nix --run "cargo build --release" was failing due to old rustc version (although it should pick the correct one from rust-toolchain file). Builds fine after bumping rust in nix env.

Check list

  • added or updated unit tests
  • updated Astar official documentation
  • added OnRuntimeUpgrade hook for precompile revert code registration
  • updated spec version
  • updated semver

@@ -3,7 +3,7 @@

let
pkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
channel = pkgs.rustChannelOf { date = "2022-08-05"; channel = "nightly"; };
channel = pkgs.rustChannelOf { date = "2023-01-10"; channel = "nightly"; };
Copy link
Member

Choose a reason for hiding this comment

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

I believe if you just put it like this:

pkgs.rustChannelOf { };
it will pick up the one defined in the toolchain file.

Not sure if there's a nicer way to define this - perhaps removing channel and rust-nightly altogether?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe this will help?
https://github.com/mozilla/nixpkgs-mozilla#using-in-nix-expressions

(nixpkgs.rustChannelOf { rustToolchain = ./rust-toolchain.toml; }).rust

Copy link
Member

Choose a reason for hiding this comment

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

If it works, sure.

Let's just avoid having to maintain this file.
(we don't use nix in CI anymore)

Copy link
Member

Choose a reason for hiding this comment

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

@ashutoshvarma can you apply your suggested change? 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, that didn't work unfortunately, mozilla/nixpkgs-mozilla#287
I've switched moz-overlay with rust-overlay and it works!

@Dinonard
Copy link
Member

@ashutoshvarma please sign all the commits & force push the new branch.

I'd suggest having auto sign for all commits you do.

@ashutoshvarma ashutoshvarma force-pushed the ashutoshvarma/chore/bump-nix-rust branch from 52ed5c9 to 851c46c Compare February 27, 2023 04:53
@ashutoshvarma
Copy link
Member Author

@Dinonard commits signed!

@Dinonard
Copy link
Member

@Dinonard commits signed!

Great, feel free to merge! 🙂

@ashutoshvarma ashutoshvarma merged commit 7d8d687 into master Feb 27, 2023
@ashutoshvarma ashutoshvarma deleted the ashutoshvarma/chore/bump-nix-rust branch February 27, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants