mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-01 08:35:55 +00:00
modules/default: half size of plugins
This commit is contained in:
parent
8eb29c9061
commit
a582fb0a7a
1 changed files with 29 additions and 12 deletions
|
|
@ -33,13 +33,27 @@ inputs: {
|
||||||
# build a vim plugin with the given name and arguments
|
# build a vim plugin with the given name and arguments
|
||||||
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
|
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
|
||||||
# instead
|
# instead
|
||||||
buildPlug = {pname, ...} @ args:
|
buildPlug = {pname, ...} @ attrs: let
|
||||||
assert assertMsg (pname != "nvim-treesitter") "Use buildTreesitterPlug for building nvim-treesitter.";
|
src = getAttr ("plugin-" + pname) inputs;
|
||||||
buildVimPlugin (args
|
in
|
||||||
// {
|
pkgs.runCommand pname {
|
||||||
version = "master";
|
inherit src;
|
||||||
src = getAttr ("plugin-" + pname) inputs;
|
version = src.shortRev or src.shortDirtyRev or "dirty";
|
||||||
});
|
}
|
||||||
|
// attrs
|
||||||
|
''
|
||||||
|
mkdir -p $out
|
||||||
|
cp -r . $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
@ -53,11 +67,14 @@ inputs: {
|
||||||
then (buildTreesitterPlug vimOptions.treesitter.grammars)
|
then (buildTreesitterPlug vimOptions.treesitter.grammars)
|
||||||
else if (plug == "flutter-tools-patched")
|
else if (plug == "flutter-tools-patched")
|
||||||
then
|
then
|
||||||
(buildPlug {
|
(
|
||||||
pname = "flutter-tools";
|
buildPlug
|
||||||
patches = [../patches/flutter-tools.patch];
|
{
|
||||||
})
|
pname = "flutter-tools";
|
||||||
else (buildPlug {pname = plug;})
|
patches = [../patches/flutter-tools.patch];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
else noBuildPlug {pname = plug;}
|
||||||
)
|
)
|
||||||
else plug
|
else plug
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue