Skip to content

Commit 5208950

Browse files
committed
Remove depdency on ordering
Everything is done in-line for the `pre-commit` package. Also added a `pre-commit'` package that is the old pre-commit.
1 parent 5fb9632 commit 5208950

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

flake.nix

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@
3232
default = (inputs.nixpkgs.lib.composeManyExtensions [
3333
(import inputs.rust-overlay)
3434
(f: p: {
35-
rustToolchain' = (
36-
p.rust-bin.stable.latest
37-
);
38-
rustPlatform' = p.makeRustPlatform {
39-
cargo = f.rustToolchain';
40-
rustc = f.rustToolchain';
41-
};
42-
})
43-
(f: p: {
44-
prefligit = p.rustPlatform'.buildRustPackage rec {
35+
pre-commit' = p.pre-commit;
36+
pre-commit = (p.makeRustPlatform (let
37+
rustToolchain = p.rust-bin.stable.latest.minimal;
38+
in
39+
{
40+
cargo = rustToolchain;
41+
rustc = rustToolchain;
42+
})).buildRustPackage rec {
4543
pname = "prefligit";
4644
version = "0.0.12";
4745
src = p.fetchFromGitHub {
@@ -63,8 +61,6 @@
6361
'';
6462
meta.mainProgram = "pre-commit";
6563
};
66-
# And allow calling it as `pkgs.pre-commit` by default.
67-
pre-commit = f.prefligit;
6864
})
6965
]);
7066
};

0 commit comments

Comments
 (0)