Example for Flake without `flake-parts`
JonBoyleCoding opened this issue · 1 comments
JonBoyleCoding commented
Would it be possible for you to provide an example of using these pre-commit hooks without flake-parts
for a flake?
All attempts I've tried end up with the error 'builtins.storePath' is not allowed in pure evaluation mode
.
Thanks in advance.
Here's a rough example of something I've tried:
inputs = {
...
nix-precommit-hooks.url = "github:/cachix/pre-commit-hooks.nix";
};
outputs = {nix-precommit-hooks, ...}:
let
nix-precommit-hooks-lib = import nix-precommit-hooks;
pre-commit-check = nix-precommit-hooks-lib.run {
src = ./.;
hooks = {
....
};
};
in {
devShells.${system}.default = pkgs.mkShell {
....
shellHook = ''
${pre-commit-check.shellHook}
''
};
};
JonBoyleCoding commented
I'm an idiot - I see you have this in the README at the bottom.