toVimPlugin: prepends 'vimPlugin' to the name

Neovim plugins built with buildNeovimPlugin are based on derivations
from the lua package set, ie., they are a flat-install (no share/lua/5.1
nesting) with some post-processing.

While debugging, I noticed their name lacked the vimplugin prefix,
making them a bit harder to diagnose if the derivation was the vimplugin
or not.
So I hardcoded 'namePrefix' (why let the user change that ?) and moved
it to toVimPlugin so it applies to lua-based plugins as well.

Before this PR:
➜ nix-build -A vimPlugins.plenary-nvim
/nix/store/zyvdf7c1k4q2ykg6jydpf5c31g9j921s-lua5.1-plenary.nvim-scm-1-unstable-2024-03-25

After this PR
➜ nix-build -A vimPlugins.plenary-nvim
/nix/store/dy4rjzjbhshi109i6969f39vd9xbjgs1-vimplugin-lua5.1-plenary.nvim-scm-1-unstable-2024-03-25

+2 -2
+1 -2
pkgs/applications/editors/vim/plugins/build-vim-plugin.nix
··· 13 14 buildVimPlugin = 15 { name ? "${attrs.pname}-${attrs.version}" 16 - , namePrefix ? "vimplugin-" 17 , src 18 , unpackPhase ? "" 19 , configurePhase ? ":" ··· 27 }@attrs: 28 let 29 drv = stdenv.mkDerivation (attrs // { 30 - name = namePrefix + name; 31 32 inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; 33
··· 13 14 buildVimPlugin = 15 { name ? "${attrs.pname}-${attrs.version}" 16 , src 17 , unpackPhase ? "" 18 , configurePhase ? ":" ··· 26 }@attrs: 27 let 28 drv = stdenv.mkDerivation (attrs // { 29 + name = lib.warnIf (attrs ? vimprefix) "The 'vimprefix' is now hardcoded in toVimPlugin" name; 30 31 inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; 32
+1
pkgs/applications/editors/vim/plugins/vim-utils.nix
··· 415 416 toVimPlugin = drv: 417 drv.overrideAttrs(oldAttrs: { 418 # dont move the "doc" folder since vim expects it 419 forceShare = [ "man" "info" ]; 420
··· 415 416 toVimPlugin = drv: 417 drv.overrideAttrs(oldAttrs: { 418 + name = "vimplugin-${oldAttrs.name}"; 419 # dont move the "doc" folder since vim expects it 420 forceShare = [ "man" "info" ]; 421