atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.45k stars 557 forks source link

Rust 1.78 in nix #2089

Closed ellie closed 4 months ago

ellie commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

It appears there are (were?) some difficulties with rust 1.78 in nixpkgs - a quick read of https://github.com/NixOS/nixpkgs/pull/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 commented 4 months ago

That totally makes sense, thank you!

Fenix sounds cool, a PR would be amazing 🙏

arcuru commented 4 months ago

@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 commented 4 months ago

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.