git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107197 from Profpatsch/tree-sitter-fixes

Tree sitter fixes

commit70c07155d01a347ad60c85dc2955218e32fd896b authorGabriel Ebner <gebner@gebner.org> dateSat 19 Dec 2020, 13:50 (6 years ago) parent453c116cf81745
2 files changed+13−7
pkgs/development/tools/parsing/tree-sitter/default.nix+4−6 pkgs/development/tools/parsing/tree-sitter/library.nix+9−1
pkgs/development/tools/parsing/tree-sitter/default.nix+4−6
@@ -41,8 +41,10 @@ let
4141
4242 builtGrammars = let
4343 change = name: grammar:
44− callPackage ./library.nix {
45− language = name; inherit version; source = fetchGrammar grammar;
44+ callPackage ./library.nix {} {
45+ language = name;
46+ inherit version;
47+ source = fetchGrammar grammar;
4648 };
4749 in
4850 # typescript doesn't have parser.c in the same place as others
@@ -60,10 +62,6 @@ in rustPlatform.buildRustPackage {
6062 # needed for the tests
6163 rm -rf test/fixtures/grammars
6264 ln -s ${grammars} test/fixtures/grammars
63−
64− # These functions do not appear in the source code
65− sed -i /_ts_query_context/d lib/binding_web/exports.json
66− sed -i /___assert_fail/d lib/binding_web/exports.json
6765 '';
6866
6967 # Compile web assembly with emscripten. The --debug flag prevents us from
pkgs/development/tools/parsing/tree-sitter/library.nix+9−1
@@ -1,7 +1,15 @@
11{ stdenv
2−, language
32, tree-sitter
3+}:
4+
5+# Build a parser grammar and put the resulting shared object in `$out/parser`
6+
7+{
8+ # language name
9+ language
10+ # version of tree-sitter
411, version
12+ # source for the language grammar
513, source
614}:
715