mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
lib/options: remove deprecated package option helpers
`mkPackageOption` and `mkPluginPackageOption` have both been replaced with nixpkg's `lib.mkPackageOption`.
This commit is contained in:
parent
7409e80bd2
commit
fd923a3dd3
2 changed files with 8 additions and 29 deletions
|
@ -2,6 +2,12 @@
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
|
|
||||||
|
removed = lib.mapAttrs (name: msg: throw "${name} is removed. ${msg}") {
|
||||||
|
# Removed 2024-09-05
|
||||||
|
mkPackageOption = "Use `lib.mkPackageOption` instead.";
|
||||||
|
mkPluginPackageOption = "Use `lib.mkPackageOption` instead.";
|
||||||
|
};
|
||||||
|
|
||||||
# Render a plugin default string
|
# Render a plugin default string
|
||||||
pluginDefaultText =
|
pluginDefaultText =
|
||||||
{
|
{
|
||||||
|
@ -313,34 +319,6 @@ rec {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Deprecated 2024-09-02; remove once all internal uses are gone
|
|
||||||
mkPackageOption =
|
|
||||||
args:
|
|
||||||
# A default package is required
|
|
||||||
assert args ? default;
|
|
||||||
# `name` must be present if `description` is missing
|
|
||||||
assert (!args ? description) -> args ? name;
|
|
||||||
mkNullOrOption' (
|
|
||||||
(lib.filterAttrs (n: _: n != "name") args)
|
|
||||||
// {
|
|
||||||
type = types.package;
|
|
||||||
description =
|
|
||||||
args.description or ''
|
|
||||||
Which package to use for `${args.name}`.
|
|
||||||
Set to `null` to disable its automatic installation.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
# TODO: Deprecated 2024-09-02; remove once all internal uses are gone
|
|
||||||
mkPluginPackageOption =
|
|
||||||
name: default:
|
|
||||||
lib.mkOption {
|
|
||||||
type = types.package;
|
|
||||||
inherit default;
|
|
||||||
description = "Which package to use for the ${name} plugin.";
|
|
||||||
};
|
|
||||||
|
|
||||||
mkSettingsOption =
|
mkSettingsOption =
|
||||||
{
|
{
|
||||||
options ? { },
|
options ? { },
|
||||||
|
@ -371,3 +349,4 @@ rec {
|
||||||
example;
|
example;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
// removed
|
||||||
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
message = "lib.nixvim should be defined";
|
message = "lib.nixvim should be defined";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = lib.nixvim == helpers;
|
assertion = builtins.attrNames lib.nixvim == builtins.attrNames helpers;
|
||||||
message = "lib.nixvim and helpers should be aliases";
|
message = "lib.nixvim and helpers should be aliases";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue