neovimUtils.grammarToPlugin: add pname and version and derive name from them (#479780)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user