`importNpmLock.buildNodeModules` returns a derivation with a pre-built `node_modules` directory, as imported by `importNpmLock`.
This is to be used together with `importNpmLock.hooks.linkNodeModulesHook` to facilitate `nix-shell`/`nix develop` based development workflows:
```nix
pkgs.mkShell {
packages = [
importNpmLock.hooks.linkNodeModulesHook
nodejs
];
npmDeps = importNpmLock.buildNodeModules {
npmRoot = ./.;
inherit nodejs;
};
}
```
will create a development shell where a `node_modules` directory is created & packages symlinked to the Nix store when activated.
This code is adapted from https://github.com/adisbladis/buildNodeModules
* vimPlugins: introduce passthru.initLua for some plugins
as described in https://github.com/NixOS/nixpkgs/issues/172538, some vim
plugins need some configuration to be able to work at all.
We choose not to patch those plugins and instead expose the necessary
configuration to make them work in `PLUGIN.passthru.initLua`.
For now the user can check if plugins have a `PLUGIN.passthru.initLua`
and if yes, prepend it to their own init.lua.
Maybe later we can revisit this to either patch them in a way that is
clear that it's a nixpkgs patch or by having the neovim wrapper pick
those snippets and autoadd them to init.lua ?
* Update doc/languages-frameworks/vim.section.md
Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>
---------
Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>
every other format is deprecated, so to imply that people should be setting it is misleading
(`pyproject = true` should also go away eventually, but is the way until
then)
so that meta.description examples shown in the documentation
align with recommendations given in the "Meta attributes" section
in pkgs/README.md.
The changes were made with the following commands:
nix run nixpkgs#silver-searcher -- -l0 'description\s*=\s*"([Aa]n?|[Tt]he)\s' doc \
| xargs -0 nix run nixpkgs#gnused -- -i '' -Ee '/description/s/"([Aa]n?|[Tt]he)\s(.)/"\U\2/'
nix run nixpkgs#silver-searcher -- -l0 'description\s*=\s*".*\."' doc \
| xargs -0 nix run nixpkgs#gnused -- -i '' -Ee '/description/s/\."/"/'
Running the `update.py` script directly doesn't work anymore, so instead
replace all usages of it in the documentation with `nix-shell -p
vimPluginsUpdater --run 'vim-plugins-updater'`.
`mkComposerRepository` required `pname` and `version` since the beginning
(b36ad2f517), with the boolean attribute
becoming required later (3eb168da92).