neovimUtils.grammarToPlugin: add pname and version and derive name from them (#479780)

This commit is contained in:
Wolfgang Walther
2026-01-15 10:35:02 +00:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
+4 -3
View File
@@ -314,8 +314,9 @@ let
in
(toVimPlugin (
stdenv.mkDerivation {
name = "nvim-treesitter-grammar-${name}";
stdenv.mkDerivation (finalAttrs: {
pname = "nvim-treesitter-grammar-${name}";
inherit (grammar) version;
origGrammar = grammar;
grammarName = name;
@@ -349,7 +350,7 @@ let
platforms = lib.platforms.all;
}
// grammar.meta;
}
})
));
/*
@@ -494,8 +494,11 @@ rec {
toVimPlugin =
drv:
let
drv-name = drv.name or "${drv.pname}-${drv.version}";
in
drv.overrideAttrs (oldAttrs: {
name = "vimplugin-${oldAttrs.name}";
name = "vimplugin-${drv-name}";
# dont move the "doc" folder since vim expects it
forceShare = [
"man"