Skip to content

Commit 8e339e8

Browse files
committed
Add cargo to runtime deps of rustfmt
1 parent f51e6de commit 8e339e8

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

extras/pre-commit-hooks-extra.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
nativeBuildInputs = [ pkgs.makeWrapper ];
1919
postBuild = ''
2020
wrapProgram $out/bin/cargo-fmt \
21-
--prefix PATH : ${lib.makeBinPath [ rust-bin.rustfmt ]}
21+
--prefix PATH : ${lib.makeBinPath [ rust-bin.cargo rust-bin.rustfmt ]}
2222
'';
2323
};
2424
in

runtimes/rust/lbr-prelude/build.nix

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,27 @@
1010
};
1111
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
1212

13+
rust-bin = pkgs.rust-bin.stable.latest;
14+
1315
in
1416
{
1517
devShells."dev-${crateName}-rust" = craneLib.devShell {
1618
checks = self'.checks;
17-
buildInputs = [ pkgs.rust-analyzer ];
19+
buildInputs = [ rust-bin.rust-analyzer ];
1820
};
1921

20-
packages."${crateName}-rust" = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; doTest = false; });
22+
packages."${crateName}-rust" = craneLib.buildPackage (commonArgs // {
23+
inherit cargoArtifacts;
24+
doTest = false;
25+
});
2126

22-
checks."${crateName}-rust-test" = craneLib.cargoNextest (commonArgs // { inherit cargoArtifacts; });
27+
checks."${crateName}-rust-test" = craneLib.cargoNextest (commonArgs // {
28+
inherit cargoArtifacts;
29+
});
2330

24-
checks."${crateName}-rust-clippy" = craneLib.cargoClippy (commonArgs // { inherit cargoArtifacts; });
31+
checks."${crateName}-rust-clippy" = craneLib.cargoClippy (commonArgs // {
32+
inherit cargoArtifacts;
33+
});
2534
};
2635

2736
}

0 commit comments

Comments
 (0)