mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 19:40:06 +02:00
lib/options: introduce new mkPackageOption for dependencies
This commit is contained in:
parent
26367692da
commit
7c4fe30f81
15 changed files with 51 additions and 85 deletions
|
@ -155,6 +155,26 @@ rec {
|
|||
mkNullable nixvimTypes.highlight default (if desc == "" then "Highlight settings." else desc);
|
||||
};
|
||||
|
||||
mkPackageOption =
|
||||
{
|
||||
name ? null, # Can be null if a custom description is given.
|
||||
default,
|
||||
description ? null,
|
||||
example ? null,
|
||||
}:
|
||||
mkOption {
|
||||
type = with types; nullOr package;
|
||||
inherit default example;
|
||||
description =
|
||||
if description == null then
|
||||
''
|
||||
Which package to use for `${name}`.
|
||||
Set to `null` to disable its automatic installation.
|
||||
''
|
||||
else
|
||||
description;
|
||||
};
|
||||
|
||||
mkPluginPackageOption =
|
||||
name: default:
|
||||
mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue