lib/plugins: introduce mkMetaModule

This commit is contained in:
Matt Sturgeon 2025-01-27 18:55:45 +00:00
parent e908e344f4
commit 1a5f1b4393
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
3 changed files with 47 additions and 20 deletions

View file

@ -5,7 +5,7 @@
{
name,
maintainers,
url ? throw "default",
url ? null,
imports ? [ ],
description ? null,
# deprecations
@ -62,15 +62,6 @@ let
luaConfigAtLocation = utils.mkConfigAt configLocation cfg.luaConfig.content;
in
{
meta = {
inherit maintainers;
nixvimInfo = {
inherit description;
url = args.url or opts.package.default.meta.homepage;
path = loc;
};
};
options = lib.setAttrByPath loc (
{
enable = lib.mkEnableOption packPathName;
@ -168,6 +159,14 @@ in
++ [
module
(utils.mkPluginPackageModule { inherit loc packPathName package; })
(utils.mkMetaModule {
inherit
loc
maintainers
description
url
;
})
]
++ lib.optional deprecateExtraOptions (
lib.mkRenamedOptionModule (loc ++ [ "extraOptions" ]) settingsPath