mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
feat: byte-compile plugins
This commit is contained in:
parent
13cc59ab99
commit
5c79c458fc
1 changed files with 10 additions and 11 deletions
|
@ -36,8 +36,16 @@ inputs: {
|
|||
src = getAttr ("plugin-" + pname) inputs;
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation ({
|
||||
inherit src;
|
||||
version = src.shortRev or src.shortDirtyRev or "dirty";
|
||||
|
||||
inherit src;
|
||||
|
||||
buildPhase = lib.optionalString vimOptions.byteCompileLua ''
|
||||
runHook preBuild
|
||||
find . -type f -name '*.lua' -exec luajit -bd -- {} {} \;
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
|
@ -49,15 +57,6 @@ inputs: {
|
|||
}
|
||||
// attrs);
|
||||
|
||||
noBuildPlug = {pname, ...} @ attrs: let
|
||||
input = getAttr ("plugin-" + pname) inputs;
|
||||
in
|
||||
{
|
||||
version = input.shortRev or input.shortDirtyRev or "dirty";
|
||||
outPath = getAttr ("plugin-" + pname) inputs;
|
||||
}
|
||||
// attrs;
|
||||
|
||||
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
|
||||
|
||||
buildConfigPlugins = plugins:
|
||||
|
@ -77,7 +76,7 @@ inputs: {
|
|||
patches = [../patches/flutter-tools.patch];
|
||||
}
|
||||
)
|
||||
else noBuildPlug {pname = plug;}
|
||||
else buildPlug {pname = plug;}
|
||||
)
|
||||
else plug
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue