-
Notifications
You must be signed in to change notification settings - Fork 173
Make usable without package distribution #61
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
Comments
If — as a collateral — the code base could be made a little bit easier to grasp, that would be great. I was in sheer despair more than once when working on #52 . — not directly related, though. |
Couldn't we just expose |
In the past we've needed a solution for packages that are packaged with So either we forgo packaging hooks or the ability to override those, or we allow |
Overriding tools sounds good to me (I forgot we didn't just apply an overlay to pkgs). |
I like the way how devshell presents itself as an overlay, this makes it easier to chain things together. Maybe not 100% on topic, but I figured to best comment here nevertheless: https://github.com/numtide/devshell/blob/master/default.nix What I had in mind: {
nixpkgs = import ./nixpkgs-src.nix;
overlays = [
(import ./overlays/overlay.nix)
(import ./overlays/pre-commit.nix)
];
pkgs = (import ./devshell-src.nix) { inherit nixpkgs overlays; };
} (strictly pinning to a single nixpkgs version maybe also helps reduce the closure of the devshell?) |
I think people, in general, want to pin the version of tools they use in the pre-commit hooks. That means they need to provide the |
That sounds good to me. |
Note that this is done. What we need are docs to override pkgs and also to override a specific tool. |
Can you please explain how this can be done? 🙏 |
That one isn't possible to override right now - see #196 |
pre-commit-hooks.nix in its current form is a package distribution by default; using pinned packages.
Some users (me, #55?) prefer to provide their own packages only, in order to have consistent versions everywhere in a project.
I'd be happy to provide a function to do that, which will work at the module level.
TODO
run
so its behavior remains unchanged)default.nix
In order to improve performance I'd like to move
tools
into its own attrset, so we can evaluate the spine ofdefault.nix
without having to load the pinned nixpkgs. It's even possible to unbreak the move and provide deprecation warnings.The text was updated successfully, but these errors were encountered: