neovimUtils.grammarToPlugin: add pname and version and derive name from them

Co-authored-by: Perchun Pak <nixpkgs@perchun.it>
This commit is contained in:
jopejoe1
2026-01-15 01:30:50 +01:00
co-authored by Perchun Pak
parent e06fd9c51e
commit 575f39e237
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"