mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
modules/performance: ensure dependencies of lua packages also compiled
Previously only extraLuaPackages themselves were byte-compiled, not theirs dependencies. This commit fixes that by compiling lua packages recursively. It uses byte-compile-lua-lib.nix shared file. Also this commit uses the shared stub lua libraries for extraLuaPackages byte-compiling test.
This commit is contained in:
parent
9474ce916a
commit
75f2c1b1f1
4 changed files with 23 additions and 20 deletions
|
@ -308,20 +308,17 @@ in
|
|||
luaLib = true;
|
||||
};
|
||||
|
||||
extraLuaPackages =
|
||||
ps: with ps; [
|
||||
say
|
||||
argparse
|
||||
];
|
||||
extraLuaPackages = _: pluginStubs.libPack;
|
||||
|
||||
extraConfigLuaPost = ''
|
||||
${pluginStubs.libChecks}
|
||||
|
||||
${isByteCompiledFun}
|
||||
|
||||
-- Lua modules are importable and byte compiled
|
||||
local say = require("say")
|
||||
test_lualib_file(say.set, true)
|
||||
local argparse = require("argparse")
|
||||
test_lualib_file(argparse("test").parse, true)
|
||||
-- Lua modules are byte-compiled
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
name: "test_lualib_file(require('${name}').name, true)"
|
||||
) pluginStubs.libNames}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue