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

Rust 1.78 in nix #2089

Closed
ellie opened this issue Jun 5, 2024 · 5 comments · Fixed by #2123
Closed

Rust 1.78 in nix #2089

ellie opened this issue Jun 5, 2024 · 5 comments · Fixed by #2123

Comments

@ellie
Copy link
Member

ellie commented Jun 5, 2024

As part of #2085, I've been trying to ensure that we properly stick to a MSRV, as stated in CONTRIBUTING.md

We commit to supporting the latest stable version of Rust - nothing more, nothing less, no nightly.

Currently, this is 1.78. However updating the toolchain file leads to nix complaining that only 1.77 is available.

I'm not familiar enough with nix to update this, and would love to have a way of updating MSRV to the latest stable that doesn't require some nix magic

1.79 is out in a few days, so this will need changing again

@ellie
Copy link
Member Author

ellie commented Jun 12, 2024

Rust 1.79 will become stable tomorrow, and by the looks of things we still can't use 1.78 with Nix

I really really don't want to break our nix build, however I would like to ensure we properly stick to the latest stable version more.

Sorry for the ping @arcuru and @Sciencentistguy, but I'm hoping you might have a better idea of what to do 😊

@Sciencentistguy
Copy link
Contributor

It appears there are (were?) some difficulties with rust 1.78 in nixpkgs - a quick read of NixOS/nixpkgs#309580 it seems that changes to the way rustc uses llvm broke cross-compilation on darwin-aarch64.

I see you've got a nix flake update github action, there isn't really much you can do other than that if you want to keep using the rustc from nixpkgs.

It might be possible to use something like fenix to nixify rustc latest (or any specific version) independently of what nixpkgs is doing? I'll see if I can whip up a PR for that this evening.

@ellie
Copy link
Member Author

ellie commented Jun 12, 2024

That totally makes sense, thank you!

Fenix sounds cool, a PR would be amazing 🙏

@arcuru
Copy link
Contributor

arcuru commented Jun 12, 2024

@Sciencentistguy If you want a reference, my recent projects all use a customization of this flake

It uses crane, fenix and pre-commit, and includes checks for tarpaulin and dependency auditing in addition to the usual clippy/formatting/doc stuff.

@arcuru
Copy link
Contributor

arcuru commented Jun 12, 2024

Or I'd be happy to make the changes myself. I'd just use that template I've been using and do a round of updates/customizations for atuin. I have the time this week.

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 a pull request may close this issue.

3 participants