diff --git a/plugins/git/committia.nix b/plugins/git/committia.nix index e73287c8..211d1609 100644 --- a/plugins/git/committia.nix +++ b/plugins/git/committia.nix @@ -9,7 +9,6 @@ helpers.vim-plugin.mkVimPlugin config { originalName = "committia.vim"; defaultPackage = pkgs.vimPlugins.committia-vim; globalPrefix = "committia_"; - extraPackages = [ pkgs.git ]; maintainers = [ helpers.maintainers.alisonjenkins ]; @@ -47,4 +46,15 @@ helpers.vim-plugin.mkVimPlugin config { Minimum height of a status window. ''; }; + + extraOptions = { + gitPackage = helpers.mkPackageOption { + name = "git"; + default = pkgs.git; + }; + }; + + extraConfig = cfg: { + extraPackages = [ cfg.gitPackage ]; + }; } diff --git a/tests/test-sources/plugins/git/committia.nix b/tests/test-sources/plugins/git/committia.nix index aecf8764..59f9eda8 100644 --- a/tests/test-sources/plugins/git/committia.nix +++ b/tests/test-sources/plugins/git/committia.nix @@ -19,4 +19,11 @@ }; }; }; + + no-packages = { + plugins.committia = { + enable = true; + gitPackage = null; + }; + }; }