tree-sitter: split arguments in library.nix & document

This commit is contained in:
Profpatsch 2020-12-13 06:54:25 +01:00
parent 5907bcadfa
commit cf81745404
2 changed files with 13 additions and 3 deletions

View File

@ -41,8 +41,10 @@ let
builtGrammars = let builtGrammars = let
change = name: grammar: change = name: grammar:
callPackage ./library.nix { callPackage ./library.nix {} {
language = name; inherit version; source = fetchGrammar grammar; language = name;
inherit version;
source = fetchGrammar grammar;
}; };
in in
# typescript doesn't have parser.c in the same place as others # typescript doesn't have parser.c in the same place as others

View File

@ -1,7 +1,15 @@
{ stdenv { stdenv
, language
, tree-sitter , tree-sitter
}:
# Build a parser grammar and put the resulting shared object in `$out/parser`
{
# language name
language
# version of tree-sitter
, version , version
# source for the language grammar
, source , source
}: }: