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" ];
|
example = [ "gitMinimal" ];
|
||||||
};
|
};
|
||||||
ueberzug.default = "ueberzugpp";
|
ueberzug.default = "ueberzugpp";
|
||||||
|
which.default = "which";
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDependencyOption = name: properties: {
|
mkDependencyOption = name: properties: {
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
helpers,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -112,12 +111,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = {
|
|
||||||
whichPackage = lib.mkPackageOption pkgs "which" {
|
|
||||||
nullable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
assertions = lib.nixvim.mkAssertions "plugins.neogit" (
|
assertions = lib.nixvim.mkAssertions "plugins.neogit" (
|
||||||
map
|
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" (
|
which.enable =
|
||||||
cfg.settings.commit_view.verify_commit.__raw or ""
|
let
|
||||||
)) cfg.whichPackage;
|
autoInstallWhich = hasInfix "which" (cfg.settings.commit_view.verify_commit.__raw or "");
|
||||||
|
in
|
||||||
|
lib.mkIf autoInstallWhich (lib.mkDefault true);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,11 +294,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
no-packages = {
|
no-packages = {
|
||||||
plugins.neogit = {
|
plugins.neogit.enable = true;
|
||||||
enable = true;
|
|
||||||
whichPackage = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
dependencies.git.enable = false;
|
dependencies = {
|
||||||
|
git.enable = false;
|
||||||
|
which.enable = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue