Skip to content

Commit ca5b894

Browse files
committed
refactor: set pre-commit as an option default, rather than in run
1 parent c31fee9 commit ca5b894

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

modules/pre-commit.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ in
168168
''
169169
The `pre-commit` package to use.
170170
'';
171+
default = pkgs.pre-commit;
171172
defaultText = lib.literalExpression "pkgs.pre-commit";
172173
example = lib.literalExpression "pkgs.prek";
173174
};

nix/run.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
builtinStuff@{ pkgs, tools, isFlakes, pre-commit, git, runCommand, writeText, writeScript, lib, gitignore-nix-src }:
1+
builtinStuff@{ lib, pkgs, tools, gitignore-nix-src, isFlakes }:
22

3-
options@{ src
3+
options@
4+
{ src
45
, imports ? [ ]
56
, tools ? { }
67
, ...
@@ -18,7 +19,6 @@ let
1819
moduleOptions
1920
{
2021
_module.args = { inherit pkgs gitignore-nix-src; };
21-
package = lib.mkDefault pre-commit;
2222
tools = lib.mkDefault (builtinStuff.tools // tools);
2323
rootSrc =
2424
if isFlakes

0 commit comments

Comments
 (0)