-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the module system #19
Conversation
New - Selectively enable tools (#2) - Make choice of tool versions overridable - User-definable hooks - Input validation at the Nix level Fixes - Stop installing files all over the place when doing nix-shell ../some-project to borrow a tool - Lorri support Cleanup - Get rid of installation code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still references to project.nix, which are not used.
Looks good! Wish there were some docs on how to override hooks or add new ones, but we can add that later.
It's used by the |
Why can't we just expose shellHook as it was before this PR and project.nix can pick it up? Maybe there should be { ... }: {
config.activation.hooks = (import ../default.nix { }).shellHook;
} Which is later going to be translated into flakes. Once we need to merge project.nix options we can do that. |
This PR does not change that part of the nix-pre-commit API, so it is exposed as before, but with an implementation that is not directly inside the repo. The project.nix implementation fixes some problems and has improvements over the current shellHook implementation. Of course these can be backported but that seems a bit pointless to me.
This is can be done, but it must be an acceptable hook for the activation module, rather than a standalone autoinstall script. It's not a big difference, just have to expose two things instead of one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, major immediate win is that not all tooling is downloaded, so tooling can now grow.
bors r+ |
19: Use the module system r=roberth a=roberth Closes #2 Closes #17 TODO - [x] ~expose and test "core" module set from project.nix~ - [x] ~niv update -b master project.nix when that's done (hercules-ci/project.nix#10 - [x] changelog entry: (elaborate on) translate `.pre-commit-config.yaml` to hooks argument - [x] update README - [x] add how to add a hook to README New - Selectively enable tools (#2) - Make choice of tool versions overridable - User-definable hooks - Input validation at the Nix level - Use gitignore by default Fixes - Stop installing files all over the place when doing nix-shell ../some-project to borrow a tool - Lorri support Cleanup - Get rid of some installation code Co-authored-by: Robert Hensing <[email protected]>
Build failed |
bors is broken? Anyway 🎉 |
Closes #2
Closes #17
TODO
expose and test "core" module set from project.nixniv update -b master project.nix when that's done (Pre commit hercules-ci/project.nix#10).pre-commit-config.yaml
to hooks argumentNew
Fixes
Cleanup