Skip to content

Commit

Permalink
nix: fix the rustfmt version by using nightly
Browse files Browse the repository at this point in the history
Summary: Apparently this was broken. Maybe I broke it. Maybe something upstream
changed and caused a regression. But without it, we get the stable `rustfmt` in
the `nix develop` shell environment, not the nightly version. Fix it.

Signed-off-by: Austin Seipp <[email protected]>
Change-Id: I602ed8e5691c4d48f8db575d62624955
  • Loading branch information
thoughtpolice committed Nov 4, 2023
1 parent 8e4b6df commit 4a6ebd0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# The CI checks against the latest nightly rustfmt, so we should too.
# NOTE (aseipp): include this FIRST before the rust-version override
# below; otherwise, it will be overridden by the rust-version and
# we'll get stable rustfmt instead.
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.rustfmt))

# Using the minimal profile with explicit "clippy" extension to avoid
# two versions of rustfmt
(rust-version.override {
Expand All @@ -108,9 +114,6 @@
];
})

# The CI checks against the latest nightly rustfmt, so we should too.
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.rustfmt))

# Foreign dependencies
openssl zstd libgit2 libssh2
pkg-config
Expand Down

0 comments on commit 4a6ebd0

Please sign in to comment.