neovimUtils.makeVimPackageInfo: add lua dependencies (#500415)
This commit is contained in:
@@ -93,6 +93,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
luaDependencies = lib.mkOption {
|
||||
readOnly = true;
|
||||
type = lib.types.listOf (lib.types.nullOr lib.types.package);
|
||||
example = lib.literalExpression "[ (lp: [ lp.mpack ]) ]";
|
||||
description = ''
|
||||
Lua dependencies required by the plugins.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
@@ -122,5 +130,11 @@ in
|
||||
) [ ] pluginsNormalized;
|
||||
|
||||
pluginPython3Packages = map (plugin: plugin.python3Dependencies or (_: [ ])) pluginsNormalized;
|
||||
|
||||
luaDependencies =
|
||||
let
|
||||
op = acc: p: acc ++ (p.plugin.requiredLuaModules or [ ]);
|
||||
in
|
||||
lib.foldl' op [ ] pluginsNormalized;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ let
|
||||
runtimeDeps
|
||||
pluginAdvisedLua
|
||||
pluginPython3Packages
|
||||
luaDependencies
|
||||
;
|
||||
|
||||
# A Vim "package", see ':h packages'
|
||||
|
||||
@@ -109,7 +109,7 @@ let
|
||||
|
||||
luaPathLuaRc =
|
||||
let
|
||||
luaEnv = lua.withPackages extraLuaPackages;
|
||||
luaEnv = lua.withPackages (lp: extraLuaPackages lp ++ vimPackageInfo.luaDependencies);
|
||||
|
||||
# getLuaPath / getLuaCPath are not interpreter dependant at the moment and might thus cause
|
||||
# errors between luajit/Puc lua
|
||||
|
||||
Reference in New Issue
Block a user