Skip to content

Is there a way to get the packages used by hooks as nix devshell inputs? #356

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

Closed
Janik-Haag opened this issue Sep 20, 2023 · 6 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@Janik-Haag
Copy link
Contributor

Basically what I want to do is define the pre-commit-hooks with this project and then want to add them to my devshells buildInputs.
Is there a way to do that, that isn't writing them double?

@domenkozar
Copy link
Member

This seems like a good candidate for #196

@domenkozar domenkozar added the enhancement New feature or request label Oct 8, 2023
@tljuniper
Copy link
Contributor

With #196 implemented, is this now possible or is there something else that needs to be done to get access to the packages used in pre-commit-hooks?

@domenkozar domenkozar self-assigned this Mar 20, 2024
@tljuniper
Copy link
Contributor

Wow, that was fast! Thanks for taking a look!

The new flake.nix example in the README currently fails with error: attribute 'enabledPackages' missing when I paste it into an empty directory and run nix develop.

The default.nix + shell.nix examples fail with error: undefined variable 'pkgs'.

@domenkozar
Copy link
Member

Can you try again with the flakes?

@tljuniper
Copy link
Contributor

Works now. Thank you so much!

@danielgafni
Copy link

ohh was wondering why was enabledPackages missing too.. I just had to update the flake :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants