Skip to content
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

[flake-parts] Use git-hooks as non-flake input #527

Open
srid opened this issue Nov 19, 2024 · 0 comments
Open

[flake-parts] Use git-hooks as non-flake input #527

srid opened this issue Nov 19, 2024 · 0 comments

Comments

@srid
Copy link
Contributor

srid commented Nov 19, 2024

The flake-parts template currently suggests using it as a flake input:

git-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
git-hooks-nix.url = "github:cachix/git-hooks.nix";

This brings in a bunch of transitive inputs that the user does not strictly need, forcing setting up of follows like:

    git-hooks.inputs = {
      nixpkgs.follows = "nixpkgs";
      nixpkgs-stable.follows = "nixpkgs";
    };
    gitignore.follows = "git-hooks/gitignore";
    gitignore.inputs.nixpkgs.follows = "nixpkgs";
    gitignore.inputs.flake-compat = { };

Therefore, should we just change the template to reference git-hooks as a non-flake input? viz.:

    git-hooks.url = "github:cachix/git-hooks.nix";
    git-hooks.flake = false;

    ...

    # In imports
    (inputs.git-hooks + /flake-module.nix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant