fix(nix): align cargo-fmt rustfmt with dev shell #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-12-rustfmt-alignment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Verification
Closes #12
This PR aligns the
cargo-fmtcheck'sRUSTFMTenvironment variable with the rustfmt binary from the dev-shell Rust toolchain, ensuring consistency between local and CI environments. The changes appear safe to merge, but ensure that therustToolchainvariable is correctly defined.Walkthrough
cargo-fmtcheck with the dev-shell Rust toolchain's rustfmt binary.cargo-fmtcheck to set theRUSTFMTenvironment variable to the rustfmt binary from the dev-shell Rust toolchain, ensuring consistent formatting across environments.Pre-merge checks
🟡 Warning: Verify that the
rustToolchainvariable is correctly defined and points to the intended Rust toolchain. This ensures that the correctrustfmtbinary is used consistently.Verified.
rustToolchainis the single toolchain value loaded from./rust-toolchain.tomlviapkgs.rust-bin.fromRustupToolchainFile, and it is already used by bothcraneLib = (crane.mkLib pkgs).overrideToolchain rustToolchainanddevShells.default.buildInputs. I also verified thatnix eval --raw .#checks.x86_64-linux.cargo-fmt.RUSTFMTandnix develop --command sh -c 'command -v rustfmt'resolve to the same/nix/store/...-rust-minimal-1.97.0-nightly-2026-05-01/bin/rustfmtpath, so no code change is needed for this thread.