mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
vimPlugins.nvim-treesitter: use lib.concatMapAttrs
This commit is contained in:
parent
f993f8a186
commit
f4828b40fd
@ -14,18 +14,18 @@ let
|
||||
# ocaml-interface
|
||||
# tree-sitter-ocaml-interface
|
||||
# tree-sitter-ocaml_interface
|
||||
builtGrammars = generatedGrammars // lib.listToAttrs
|
||||
(lib.concatLists (lib.mapAttrsToList
|
||||
(k: v:
|
||||
let
|
||||
replaced = lib.replaceStrings [ "_" ] [ "-" ] k;
|
||||
in
|
||||
map (lib.flip lib.nameValuePair v)
|
||||
([ "tree-sitter-${k}" ] ++ lib.optionals (k != replaced) [
|
||||
replaced
|
||||
"tree-sitter-${replaced}"
|
||||
]))
|
||||
generatedDerivations));
|
||||
builtGrammars = generatedGrammars // lib.concatMapAttrs
|
||||
(k: v:
|
||||
let
|
||||
replaced = lib.replaceStrings [ "_" ] [ "-" ] k;
|
||||
in
|
||||
{
|
||||
"tree-sitter-${k}" = v;
|
||||
} // lib.optionalAttrs (k != replaced) {
|
||||
${replaced} = v;
|
||||
"tree-sitter-${replaced}" = v;
|
||||
})
|
||||
generatedDerivations;
|
||||
|
||||
allGrammars = lib.attrValues generatedDerivations;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user