vimPlugins.*: ensure passthru.vimPlugin = true

This commit is contained in:
HexoKnight 2026-06-06 17:31:12 +01:00
commit 3cf8ae56a2
No known key found for this signature in database
4 changed files with 116 additions and 50 deletions

View file

@ -1 +1,17 @@
{ notmuch }: notmuch.vim
{
vimUtils,
notmuch,
}:
vimUtils.buildVimPlugin {
inherit (notmuch) pname version;
src = notmuch.vim;
meta = {
inherit (notmuch.meta)
changelog
description
homepage
license
platforms
;
};
}

View file

@ -1 +1,8 @@
{ parinfer-rust }: parinfer-rust
{
vimUtils,
parinfer-rust,
}:
vimUtils.buildVimPlugin {
inherit (parinfer-rust) pname version meta;
src = parinfer-rust;
}

View file

@ -478,21 +478,23 @@ assertNoAdditions {
nvimSkipModules = [ "ccc.kit.Thread.Server._bootstrap" ];
};
chadtree = super.chadtree.overrideAttrs {
chadtree = super.chadtree.overrideAttrs (old: {
# > E5108: Error executing lua ...implugin-chadtree-0-unstable-2026-01-18/lua/chadtree.lua:162: Vim:Failed to start server: address already in use
doCheck = stdenv.hostPlatform.isLinux;
buildInputs = [
python3
];
passthru.python3Dependencies =
ps: with ps; [
pynvim-pp
pyyaml
std2
];
passthru = old.passthru // {
python3Dependencies =
ps: with ps; [
pynvim-pp
pyyaml
std2
];
};
# We need some patches so it stops complaining about not being in a venv
patches = [ ./patches/chadtree/emulate-venv.patch ];
};
});
ChatGPT-nvim = super.ChatGPT-nvim.overrideAttrs {
dependencies = with self; [
@ -1053,13 +1055,15 @@ assertNoAdditions {
};
});
coq_nvim = super.coq_nvim.overrideAttrs {
passthru.python3Dependencies =
ps: with ps; [
pynvim-pp
pyyaml
std2
];
coq_nvim = super.coq_nvim.overrideAttrs (old: {
passthru = old.passthru // {
python3Dependencies =
ps: with ps; [
pynvim-pp
pyyaml
std2
];
};
# We need some patches so it stops complaining about not being in a venv
patches = [ ./patches/coq_nvim/emulate-venv.patch ];
@ -1068,7 +1072,7 @@ assertNoAdditions {
# Other modules require global variables
"coq"
];
};
});
cornelis = super.cornelis.overrideAttrs {
dependencies = [ self.vim-textobj-user ];
@ -1265,7 +1269,9 @@ assertNoAdditions {
deoplete-khard = super.deoplete-khard.overrideAttrs (old: {
dependencies = [ self.deoplete-nvim ];
passthru.python3Dependencies = ps: [ (ps.toPythonModule khard) ];
passthru = old.passthru // {
python3Dependencies = ps: [ (ps.toPythonModule khard) ];
};
meta = old.meta // {
description = "Address-completion for khard via deoplete";
homepage = "https://github.com/nicoe/deoplete-khard";
@ -1446,7 +1452,9 @@ assertNoAdditions {
};
fcitx-vim = super.fcitx-vim.overrideAttrs (old: {
passthru.python3Dependencies = ps: with ps; [ dbus-python ];
passthru = old.passthru // {
python3Dependencies = ps: with ps; [ dbus-python ];
};
meta = old.meta // {
description = "Keep and restore fcitx state when leaving/re-entering insert mode or search mode";
license = lib.licenses.mit;
@ -1969,9 +1977,11 @@ assertNoAdditions {
};
});
jupytext-nvim = super.jupytext-nvim.overrideAttrs {
passthru.python3Dependencies = ps: [ ps.jupytext ];
};
jupytext-nvim = super.jupytext-nvim.overrideAttrs (old: {
passthru = old.passthru // {
python3Dependencies = ps: [ ps.jupytext ];
};
});
just-nvim = super.just-nvim.overrideAttrs {
checkInputs = with self; [
@ -2366,20 +2376,22 @@ assertNoAdditions {
runtimeDeps = [ luau-lsp ];
};
magma-nvim = super.magma-nvim.overrideAttrs {
passthru.python3Dependencies =
ps: with ps; [
pynvim
jupyter-client
ueberzug
pillow
cairosvg
plotly
ipykernel
pyperclip
pnglatex
];
};
magma-nvim = super.magma-nvim.overrideAttrs (old: {
passthru = old.passthru // {
python3Dependencies =
ps: with ps; [
pynvim
jupyter-client
ueberzug
pillow
cairosvg
plotly
ipykernel
pyperclip
pnglatex
];
};
});
maple-nvim = super.maple-nvim.overrideAttrs {
dependencies = [ self.plenary-nvim ];
@ -2597,13 +2609,15 @@ assertNoAdditions {
};
});
ncm2-jedi = super.ncm2-jedi.overrideAttrs {
ncm2-jedi = super.ncm2-jedi.overrideAttrs (old: {
dependencies = with self; [
nvim-yarp
ncm2
];
passthru.python3Dependencies = ps: with ps; [ jedi ];
};
passthru = old.passthru // {
python3Dependencies = ps: with ps; [ jedi ];
};
});
ncm2-neoinclude = super.ncm2-neoinclude.overrideAttrs {
dependencies = [ self.neoinclude-vim ];
@ -4817,7 +4831,9 @@ assertNoAdditions {
});
vim-beancount = super.vim-beancount.overrideAttrs (old: {
passthru.python3Dependencies = ps: with ps; [ beancount ];
passthru = old.passthru // {
python3Dependencies = ps: with ps; [ beancount ];
};
meta = old.meta // {
license = lib.licenses.vim;
};
@ -5300,9 +5316,11 @@ assertNoAdditions {
};
});
vim-mediawiki-editor = super.vim-mediawiki-editor.overrideAttrs {
passthru.python3Dependencies = [ python3.pkgs.mwclient ];
};
vim-mediawiki-editor = super.vim-mediawiki-editor.overrideAttrs (old: {
passthru = old.passthru // {
python3Dependencies = [ python3.pkgs.mwclient ];
};
});
vim-merginal = super.vim-merginal.overrideAttrs (old: {
meta = old.meta // {

View file

@ -3,13 +3,9 @@
vimUtils,
vim-full,
vimPlugins,
pkgs,
}:
let
inherit (vimUtils) buildVimPlugin;
packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
in
lib.recurseIntoAttrs {
vim_empty_config = vimUtils.vimrcFile {
beforePlugins = "";
@ -28,4 +24,33 @@ lib.recurseIntoAttrs {
name = "vim-with-vim-addon-nix";
vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
};
# test that all vimPlugins have `passthru.vimPlugin = true`
test-all-plugins-have-vimPlugin-true =
let
# we remove aliases as they are irrelevant here and cause warning when evaling this test
pkgsNoAliases = (
pkgs.extend (
self: prev: {
config = prev.config // {
allowAliases = false;
};
}
)
);
vimPluginsNoAliases = pkgsNoAliases.vimPlugins;
in
assert
lib.attrNames (
lib.filterAttrs (
name: elem:
# exclude non-plugins
lib.isDerivation elem
&& name != "corePlugins"
# only plugins that don't have `vimPlugin = true`
&& elem.passthru.vimPlugin or false != true
) vimPluginsNoAliases
) == [ ];
# testing is done during evaluation above so this derivation is irrelevant
vim-full;
}