Repository navigation
fix(nix): update flake lock so Nix build meets Rust 1.93 MSRV - #2185
Conversation
|
@worktrunk-bot how can we keep these more in sync in the future? |
|
Three knobs, ordered by how much drift each one removes:
I'd combine 1 + 2 — single source of truth removes most of the drift, and refreshing the lock during the same PR catches the rare new-toolchain case. Happy to open the PR if you want. |
|
great, open a PR for those two |
Makes rust-toolchain.toml the single source of truth for the Rust version used by both rustup (CI, local dev) and Nix, eliminating the drift that caused #2185. Also documents the `nix flake update` step in the weekly MSRV bump so the locked rust-overlay stays current with new toolchains. Extensions (rust-src, rust-analyzer) stay in flake.nix since they are only useful in the Nix dev shell — adding them to rust-toolchain.toml would force rustup users and CI to download them too. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Opened #2188 — covers proposals 1 and 2 (flake.nix reads the channel from One note: I could not run |
## Summary Implements the first two proposals from [#2185 (comment)](#2185 (comment)): - **`flake.nix` reads the Rust channel from `rust-toolchain.toml`** — one source of truth for rustup and Nix. The weekly MSRV bump now propagates to the Nix toolchain automatically, turning silent drift into a loud "channel not in locked rust-overlay" error if the lock also falls behind. - **Weekly maintenance playbook now runs `nix flake update`** — covers the residual case where a newly pinned channel is newer than the locked `rust-overlay` revision. The `flake.nix` row in the files table is gone since there is nothing to edit there anymore. Extensions (`rust-src`, `rust-analyzer`) stay in `flake.nix` rather than moving into `rust-toolchain.toml` — putting them in the toolchain file would force rustup users and CI to download them too, and they are only useful inside the Nix dev shell. Skipped proposal #3 (adding a `nix build` CI job) — that's a bigger change and worth a separate discussion. ## Test plan - [ ] `nix build .#worktrunk` succeeds (could not verify in CI runner — no `nix` installed) - [ ] `nix develop -c cargo build` succeeds - [ ] `nix flake check` passes Co-authored-by: worktrunk-bot <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
Problem
After the recent minimal supported Rust version bump to Rust 1.93, the Nix dev/build path is still pulling in Rust 1.92 from the locked
rust-overlay, sonix develop -c cargo buildfails with:worktrunk requires rustc 1.93Cause
Cargo.tomlnow requires Rust 1.93, butflake.lockstill points to an olderrust-overlayrevision, andflake.nixusespkgs.rust-bin.stable.latest.default.Fix
Refresh the locked
rust-overlayinput so the flake provides a Rust toolchain that satisfies the current MSRV.Validation
Run:
nix build .#worktrunk