Skip to content

Commit

Permalink
Merge pull request cachix#426 from cachix/fix-default-package
Browse files Browse the repository at this point in the history
Set the default hook package to null
  • Loading branch information
domenkozar authored Apr 8, 2024
2 parents e35aed5 + 6c2316d commit 70f5040
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/hook.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ in

package = mkOption {
type = types.nullOr types.package;
default = null;
description = lib.mdDoc
''
An optional package that provides the hook.
Expand Down
2 changes: 1 addition & 1 deletion modules/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ in
Useful for including into the developer environment.
'';

default = builtins.map (hook: hook.package) (lib.filter (hook: hook.enable) (builtins.attrValues config.hooks));
default = builtins.map (hook: hook.package) (lib.filter (hook: hook.enable && hook.package != null) (builtins.attrValues config.hooks));
};

hooks =
Expand Down

0 comments on commit 70f5040

Please sign in to comment.