Commit Graph

11 Commits

Author SHA1 Message Date
figsoda
2579a9877a vimUtils.buildVimPlugin: format 2022-12-23 12:37:26 -05:00
figsoda
bb350e4a17 vimUtils.buildVimPlugin: set meta.platforms 2022-12-23 12:37:24 -05:00
ilkecan
ef30dee2d6 buildVimPlugin: deprecate rtp attribute 2022-10-09 12:22:03 +02:00
ilkecan
448bb9bbae vimUtils.buildVimPlugin: prevent building twice
Don't set the `rtp` attribute using `overrideAttrs`. `overrideAttrs`
passes the attribute to the builder hence creates a different
derivation. This made vim plugins being built twice.
2022-10-09 12:22:03 +02:00
Matthieu Coudron
ce505a3984
vimPlugins: use lua derivation if it exists (#178180)
Neovim plugins are now more often than not written in lua.
One advantage of the lua ecosystem over vim's is the existence of
luarocks and the rockspec format, which allows to specify a package
dependencies formally.
I would like more neovim plugins to have a formal description,
"rockspec" being the current candidate.
This MR allows to use nix lua packages as neovim plugins, so as to enjoy
every benefit that rockspecs bring:
- dependdency discovery
- ability to run test suite
- luarocks versioning
- rockspec metadata

the vim update.py script will check if an attribute with the vim plugin
pname exists in lua51Packages. If it does, it uses
buildNeovimPluginFrom2Nix on it, which modifies the luarocks config to
do an almost flat install (luarocks will install the package in the lua
folder instead of share/5.1/lua etc).
It also calls toVimPlugin on it to get all the vim plugin niceties.

The list of packages that could benefit from this is available at
https://luarocks.org/labels/neovim
but I hope it grows.
2022-06-19 14:18:16 +02:00
Nick Cao
e7f619c49b vimUtils.buildVimPlugin: only add vimCommandCheckHook to
nativeBuildInputs when native compiling
2022-05-29 23:52:29 +02:00
Matthieu Coudron
da8a322e73 buildLuaPlugin: convert the addRtp call
since it was breaking overrideAttrs.
2022-05-11 12:08:14 +02:00
Matthieu Coudron
0dbca90d41 buildNeovimPluginFrom2Nix: use neovimRequireCheckHook
and removed the addRtp call that was breaking overrideAttrs
2022-05-11 10:42:19 +02:00
Matthieu Coudron
08b6ad0ea5 buildVimPlugin: check that neovim can require the module.
Add:
```
    doInstallCheck = true;
    nvimRequireCheck = "toto";
```
to your vimPluginCall.
2022-05-11 10:42:19 +02:00
Matthieu Coudron
9663a29afa buildVimPlugin: add vimCommandCheckHook
Modeled after pythonImportCheckHook, this checks a command can be run once the plugin is installed
2022-04-30 23:54:25 +02:00
AndersonTorres
3f19fc37a3 Move misc/vim-plugins to applications/editors/vim/plugins 2022-02-24 20:26:07 -03:00