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;
|
src = getAttr ("plugin-" + pname) inputs;
|
||||||
in
|
in
|
||||||
pkgs.stdenvNoCC.mkDerivation ({
|
pkgs.stdenvNoCC.mkDerivation ({
|
||||||
inherit src;
|
|
||||||
version = src.shortRev or src.shortDirtyRev or "dirty";
|
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 = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
@ -49,15 +57,6 @@ inputs: {
|
||||||
}
|
}
|
||||||
// attrs);
|
// 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);
|
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
|
||||||
|
|
||||||
buildConfigPlugins = plugins:
|
buildConfigPlugins = plugins:
|
||||||
|
@ -77,7 +76,7 @@ inputs: {
|
||||||
patches = [../patches/flutter-tools.patch];
|
patches = [../patches/flutter-tools.patch];
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else noBuildPlug {pname = plug;}
|
else buildPlug {pname = plug;}
|
||||||
)
|
)
|
||||||
else plug
|
else plug
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue