-
Notifications
You must be signed in to change notification settings - Fork 173
Add nix flakes support #67
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
Conversation
It is generally recommended to not have a leading dollar in shell snippets as it makes copy-and-paste more annoying.
Exposes the project as a nix flake and replaces niv with nix flake inputs. BREAKING CHANGES: The project.nix module is now exposed as an output `projectModules.pre-commit-hooks` on the flake instead of a separate file. Fixes cachix#57
I'll soon create a corresponding PR on hercules-ci/project.nix as this PR breaks compatibility with it. |
This needs a rebase on top of master that landed 20.09 and other things :) |
Is this planned to be merged any time soon? (Otherwise, I can open another PR) |
We should only offer a cleaned-up interface in the flake. Otherwise people will have to migrate twice - once for flakes and then again for the revised interface. This means implementing some of the ideas in #55 and #61. |
I don't think I have enough experience with Nix to do it. |
Did this result in anything? I see nothing linked here, so I guess not, but just checking as this would be a nice feature to have. |
Even just a simple fix for the
|
I'm happy to fix this - what's the easiest way to reproduce it? |
@domenkozar Thanks for the offer! This public project has a Beware that it uses BTW, I thought this was going to be a very easy fix as it looks like you just need to set |
Sounds like the best way is to add flake support into the project itself. I'm going to close this and track progress at #57 |
Thanks @Myhlamaeus, for your hard work. I've incorporated some of your changes and flake support is live now: https://github.com/cachix/pre-commit-hooks.nix#nix-flakes-support |
This adds a
flake.nix
which exposes the project's outputs (mainlypackages.{system}.run
) and defines the dependencies.niv
was removed as nix flakes obviate it.BREAKING CHANGES: The project.nix module is now exposed as an output
projectModules.pre-commit-hooks
on the flake instead of a separate file.Fixes #57