Compare commits

..

No commits in common. "fbe0d142e4fc17c32b34b4cfa1fd4fd0145e808b" and "4bcc8745dd2cc93e80e83eed7b1ee51e3d2bd677" have entirely different histories.

View file

@ -9,35 +9,30 @@
inherit (pkgs) vimPlugins; inherit (pkgs) vimPlugins;
inherit (lib.strings) isString; inherit (lib.strings) isString;
inherit (lib.lists) filter map; inherit (lib.lists) filter map;
inherit (builtins) path;
# alias to the internal configuration # alias to the internal configuration
vimOptions = config.vim; vimOptions = config.vim;
noBuildPlug = pname: let noBuildPlug = {pname, ...} @ attrs: let
input = inputs."plugin-${pname}"; src = inputs."plugin-${attrs.pname}";
version = input.shortRev or input.shortDirtyRev or "dirty"; in
in { {
# vim.lazy.plugins relies on pname, so we only set that here version = src.shortRev or src.shortDirtyRev or "dirty";
# version isn't needed for anything, but inherit it anyway for correctness outPath = src;
inherit pname version; passthru.vimPlugin = false;
outPath = path { }
name = "${pname}-0-unstable-${version}"; // attrs;
path = input.outPath;
};
passthru.vimPlugin = false;
};
# 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 = attrs: let buildPlug = attrs: let
input = inputs."plugin-${attrs.pname}"; src = inputs."plugin-${attrs.pname}";
in in
pkgs.vimUtils.buildVimPlugin ( pkgs.vimUtils.buildVimPlugin (
{ {
version = input.shortRev or input.shortDirtyRev or "dirty"; version = src.shortRev or src.shortDirtyRev or "dirty";
src = input.outPath; inherit src;
} }
// attrs // attrs
); );
@ -56,7 +51,7 @@
map ( map (
plug: plug:
if (isString plug) if (isString plug)
then pluginBuilders.${plug} or (noBuildPlug plug) then pluginBuilders.${plug} or (noBuildPlug {pname = plug;})
else plug else plug
) (filter (f: f != null) plugins); ) (filter (f: f != null) plugins);