mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 10:18:36 +02:00
modules/performance: add ability to byte-compile plugin lua dependencies
This commit adds byte compiling of plugin lua dependencies (specifically propagatedBuildInputs). It's enabled by `performance.byteCompileLua.luaLib` option.
This commit is contained in:
parent
404e56066f
commit
2c6182351f
4 changed files with 108 additions and 1 deletions
|
@ -34,6 +34,9 @@ in
|
|||
shouldCompilePlugins = byteCompileCfg.enable && byteCompileCfg.plugins;
|
||||
byteCompilePlugins = import ./byte-compile-plugins.nix { inherit lib pkgs; };
|
||||
|
||||
shouldCompileLuaLib = byteCompileCfg.enable && byteCompileCfg.luaLib;
|
||||
byteCompileLuaLib = import ./byte-compile-lua-lib.nix { inherit lib pkgs; };
|
||||
|
||||
shouldCombinePlugins = config.performance.combinePlugins.enable;
|
||||
combinePlugins = import ./combine-plugins.nix {
|
||||
inherit lib pkgs;
|
||||
|
@ -47,6 +50,7 @@ in
|
|||
lib.pipe config.extraPlugins (
|
||||
[ normalizePlugins ]
|
||||
++ lib.optionals shouldCompilePlugins [ byteCompilePlugins ]
|
||||
++ lib.optionals shouldCompileLuaLib [ byteCompileLuaLib ]
|
||||
++ lib.optionals shouldCombinePlugins [ combinePlugins ]
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue