plugins/neogit: use gitPackage

This commit is contained in:
Austin Horstman 2024-08-29 11:18:58 -05:00
parent 98dc0aabe2
commit d4bcebc7ca
No known key found for this signature in database
2 changed files with 18 additions and 4 deletions

View file

@ -9,7 +9,6 @@ with lib;
helpers.neovim-plugin.mkNeovimPlugin config { helpers.neovim-plugin.mkNeovimPlugin config {
name = "neogit"; name = "neogit";
defaultPackage = pkgs.vimPlugins.neogit; defaultPackage = pkgs.vimPlugins.neogit;
extraPackages = [ pkgs.git ];
maintainers = [ maintainers.GaetanLepage ]; maintainers = [ maintainers.GaetanLepage ];
@ -102,6 +101,13 @@ helpers.neovim-plugin.mkNeovimPlugin config {
}; };
}; };
extraOptions = {
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
};
};
extraConfig = cfg: { extraConfig = cfg: {
assertions = assertions =
map map
@ -122,8 +128,9 @@ helpers.neovim-plugin.mkNeovimPlugin config {
"fzf-lua" "fzf-lua"
]; ];
extraPackages = optional (hasInfix "which" ( extraPackages = [
cfg.settings.commit_view.verify_commit.__raw or "" cfg.gitPackage
)) pkgs.which; ] ++ optional (hasInfix "which" (cfg.settings.commit_view.verify_commit.__raw or "")) pkgs.which;
}; };
} }

View file

@ -290,4 +290,11 @@
}; };
}; };
}; };
no-packages = {
plugins.neogit = {
enable = true;
gitPackage = null;
};
};
} }