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