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
This commit is contained in:
parent
3aa8ef1d54
commit
c59cbaf5bf
@ -13,7 +13,6 @@ rec {
|
||||
|
||||
buildVimPlugin =
|
||||
{ name ? "${attrs.pname}-${attrs.version}"
|
||||
, namePrefix ? "vimplugin-"
|
||||
, src
|
||||
, unpackPhase ? ""
|
||||
, configurePhase ? ":"
|
||||
@ -27,7 +26,7 @@ rec {
|
||||
}@attrs:
|
||||
let
|
||||
drv = stdenv.mkDerivation (attrs // {
|
||||
name = namePrefix + name;
|
||||
name = lib.warnIf (attrs ? vimprefix) "The 'vimprefix' is now hardcoded in toVimPlugin" name;
|
||||
|
||||
inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
|
||||
|
||||
|
@ -415,6 +415,7 @@ rec {
|
||||
|
||||
toVimPlugin = drv:
|
||||
drv.overrideAttrs(oldAttrs: {
|
||||
name = "vimplugin-${oldAttrs.name}";
|
||||
# dont move the "doc" folder since vim expects it
|
||||
forceShare = [ "man" "info" ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user