mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/dependencies: add which
This commit is contained in:
parent
9abe8fd025
commit
9cc70f8c03
3 changed files with 14 additions and 16 deletions
|
@ -14,6 +14,7 @@ let
|
|||
example = [ "gitMinimal" ];
|
||||
};
|
||||
ueberzug.default = "ueberzugpp";
|
||||
which.default = "which";
|
||||
};
|
||||
|
||||
mkDependencyOption = name: properties: {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
@ -112,12 +111,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
whichPackage = lib.mkPackageOption pkgs "which" {
|
||||
nullable = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
assertions = lib.nixvim.mkAssertions "plugins.neogit" (
|
||||
map
|
||||
|
@ -140,10 +133,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
]
|
||||
);
|
||||
|
||||
dependencies.git.enable = lib.mkDefault true;
|
||||
dependencies = {
|
||||
git.enable = lib.mkDefault true;
|
||||
|
||||
extraPackages = optional (hasInfix "which" (
|
||||
cfg.settings.commit_view.verify_commit.__raw or ""
|
||||
)) cfg.whichPackage;
|
||||
which.enable =
|
||||
let
|
||||
autoInstallWhich = hasInfix "which" (cfg.settings.commit_view.verify_commit.__raw or "");
|
||||
in
|
||||
lib.mkIf autoInstallWhich (lib.mkDefault true);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -294,11 +294,11 @@
|
|||
};
|
||||
|
||||
no-packages = {
|
||||
plugins.neogit = {
|
||||
enable = true;
|
||||
whichPackage = null;
|
||||
};
|
||||
plugins.neogit.enable = true;
|
||||
|
||||
dependencies.git.enable = false;
|
||||
dependencies = {
|
||||
git.enable = false;
|
||||
which.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue