Skip to content

Commit

Permalink
Merge pull request #330 from K900/patch-1
Browse files Browse the repository at this point in the history
Make the generated configuration depend on the pre-commit package
  • Loading branch information
domenkozar authored Jul 27, 2023
2 parents 2ddd4db + 73954b2 commit fa01fda
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ let
configFile =
runCommand "pre-commit-config.json"
{
buildInputs = [ pkgs.jq ];
buildInputs = [
pkgs.jq
# needs to be an input so we regenerate the config and reinstall the hooks
# when the package changes
cfg.package
];
passAsFile = [ "rawJSON" ];
rawJSON = builtins.toJSON cfg.rawConfig;
} ''
Expand Down

0 comments on commit fa01fda

Please sign in to comment.