about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/parsing
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/tools/parsing
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/parsing')
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/antlr/4.8.nix (renamed from nixpkgs/pkgs/development/tools/parsing/antlr/4.7.nix)6
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/bison/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/bisonc++/default.nix56
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/byacc/default.nix4
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/default.nix72
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammar.nix42
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix42
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-agda.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c-sharp.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-css.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fluent.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-java.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-jsdoc.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-php.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ql.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-razor.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-regex.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scala.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-swift.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json11
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-verilog.json10
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/library.nix30
-rw-r--r--nixpkgs/pkgs/development/tools/parsing/tree-sitter/update.nix174
38 files changed, 583 insertions, 150 deletions
diff --git a/nixpkgs/pkgs/development/tools/parsing/antlr/4.7.nix b/nixpkgs/pkgs/development/tools/parsing/antlr/4.8.nix
index 23267bf24313..1c88c82e16ae 100644
--- a/nixpkgs/pkgs/development/tools/parsing/antlr/4.7.nix
+++ b/nixpkgs/pkgs/development/tools/parsing/antlr/4.8.nix
@@ -2,12 +2,12 @@
 , fetchFromGitHub, cmake, ninja, pkgconfig, libuuid, darwin }:
 
 let
-  version = "4.7.2";
+  version = "4.8";
   source = fetchFromGitHub {
     owner = "antlr";
     repo = "antlr4";
     rev = version;
-    sha256 = "1pl0zs6c6wx9nmq30s7ccpc3dl72az55i8vfp574fw9sywmvxmlj";
+    sha256 = "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m";
   };
 
   runtime = {
@@ -41,7 +41,7 @@ let
 
     src = fetchurl {
       url ="https://www.antlr.org/download/antlr-${version}-complete.jar";
-      sha256 = "1d40nfkq3ws8g4ksx4gj6l6m2l9j4b605q6sf68z5vvmg5nkhlk8";
+      sha256 = "0nms976cnqyr1ndng3haxkmknpdq6xli4cpf4x4al0yr21l9v93k";
     };
 
     dontUnpack = true;
diff --git a/nixpkgs/pkgs/development/tools/parsing/bison/default.nix b/nixpkgs/pkgs/development/tools/parsing/bison/default.nix
index ca422f931da0..aa8d8df2c1d1 100644
--- a/nixpkgs/pkgs/development/tools/parsing/bison/default.nix
+++ b/nixpkgs/pkgs/development/tools/parsing/bison/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "bison";
-  version = "3.7.1";
+  version = "3.7.4";
 
   src = fetchurl {
     url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "04vx6sah3bnr3a5n9knw306sb3y41pjfl7k9ihbsimghkj1m5n8x";
+    sha256 = "1qkp2rfi5njyp5c5avajab00aj74pkmkgzkvshv4p2ydkhswgazv";
   };
 
   nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man;
diff --git a/nixpkgs/pkgs/development/tools/parsing/bisonc++/default.nix b/nixpkgs/pkgs/development/tools/parsing/bisonc++/default.nix
new file mode 100644
index 000000000000..c6a4fc1a068d
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/bisonc++/default.nix
@@ -0,0 +1,56 @@
+{stdenv, fetchurl, fetchFromGitLab
+, yodl, icmake, flexcpp, bobcat
+}:
+stdenv.mkDerivation rec {
+  pname = "bisonc++";
+  version = "6.04.00";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.com";
+    owner = "fbb-git";
+    repo = "bisoncpp";
+    rev = "6.04.00";
+    sha256 = "sha256:0aa9bij4g08ilsk6cgrbgi03vyhqr9fn6j2164sjin93m63212wl";
+  };
+
+  buildInputs = [ bobcat ];
+
+  nativeBuildInputs = [ yodl icmake flexcpp ];
+
+  setSourceRoot = ''
+    sourceRoot="$(echo */bisonc++)"
+  '';
+
+  gpl = fetchurl {
+    url = "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt";
+    sha256 = "sha256:0hq6i0dm4420825fdm0lnnppbil6z67ls67n5kgjcd912dszjxw1";
+  };
+
+  postPatch = ''
+    substituteInPlace INSTALL.im --replace /usr $out
+    patchShebangs .
+    for file in $(find documentation -type f); do
+      substituteInPlace "$file" --replace /usr/share/common-licenses/GPL ${gpl}
+      substituteInPlace "$file" --replace /usr $out
+    done
+  '';
+
+  buildPhase = ''
+    ./build program
+    ./build man
+    ./build manual
+  '';
+
+  installPhase = ''
+    ./build install x
+  '';
+
+  meta = with stdenv.lib; {
+    inherit version;
+    description = "A parser generator like bison, but it generates C++ code";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    homepage = "https://fbb-git.gitlab.io/bisoncpp/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/byacc/default.nix b/nixpkgs/pkgs/development/tools/parsing/byacc/default.nix
index be526085b757..60e6796850c2 100644
--- a/nixpkgs/pkgs/development/tools/parsing/byacc/default.nix
+++ b/nixpkgs/pkgs/development/tools/parsing/byacc/default.nix
@@ -2,14 +2,14 @@
 
 stdenv.mkDerivation rec {
   pname = "byacc";
-  version = "20200330";
+  version = "20200910";
 
   src = fetchurl {
     urls = [
       "ftp://ftp.invisible-island.net/byacc/${pname}-${version}.tgz"
       "https://invisible-mirror.net/archives/byacc/${pname}-${version}.tgz"
     ];
-    sha256 = "1c0zyn6v286i09jlc8gx6jyaa5438qyy985rqsd76kb8ibfy56g0";
+    sha256 = "0c6gbvlgzi6yflri22w7fa2w3k5m3jk0xb5a43f3vwpa783hcn8a";
   };
 
   configureFlags = [
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/default.nix b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/default.nix
index b91acdca688e..78fb3b7f937f 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/default.nix
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/default.nix
@@ -1,8 +1,13 @@
 { lib, stdenv
 , fetchgit, fetchFromGitHub, fetchurl
-, writeShellScript, runCommand, which
+, writeShellScript, runCommand, which, formats
 , rustPlatform, jq, nix-prefetch-git, xe, curl, emscripten
+, Security
 , callPackage
+
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? stdenv.hostPlatform.isStatic
+, webUISupport ? false
 }:
 
 # TODO: move to carnix or https://github.com/kolloch/crate2nix
@@ -11,9 +16,9 @@ let
   # 1) change all these hashes
   # 2) nix-build -A tree-sitter.updater.update-all-grammars
   # 3) run the ./result script that is output by that (it updates ./grammars)
-  version = "0.16.4";
-  sha256 = "1m0zxz7h4w2zny7yhrlxwqvizcf043cizg7ca5dn3h9k16adcxil";
-  cargoSha256 = "0hxm73diwiybljm6yy3vmwfdpg33b4rlg0h7afq4xgccq2vkwafs";
+  version = "0.17.3";
+  sha256 = "sha256-uQs80r9cPX8Q46irJYv2FfvuppwonSS5HVClFujaP+U=";
+  cargoSha256 = "sha256-fonlxLNh9KyEwCj7G5vxa7cM/DlcHNFbQpp0SwVQ3j4=";
 
   src = fetchFromGitHub {
     owner = "tree-sitter";
@@ -24,7 +29,7 @@ let
   };
 
   update-all-grammars = import ./update.nix {
-    inherit writeShellScript nix-prefetch-git curl jq xe src;
+    inherit writeShellScript nix-prefetch-git curl jq xe src formats lib;
   };
 
   fetchGrammar = (v: fetchgit {inherit (v) url rev sha256 fetchSubmodules; });
@@ -38,36 +43,55 @@ let
 
   builtGrammars = let
     change = name: grammar:
-      callPackage ./library.nix {
-        language = name; inherit version; source = fetchGrammar grammar;
+      callPackage ./grammar.nix {} {
+        language = name;
+        inherit version;
+        source = fetchGrammar grammar;
       };
   in
-    # typescript doesn't have parser.c in the same place as others
-    lib.mapAttrs change (removeAttrs (import ./grammars) ["typescript"]);
+    lib.mapAttrs change (removeAttrs (import ./grammars) [
+      # TODO these don't have parser.c in the same place as others.
+      # They might require more elaborate builds?
+      #  /nix/…/src/parser.c: No such file or directory
+      "tree-sitter-typescript"
+      #  /nix/…/src/parser.c: No such file or directory
+      "tree-sitter-ocaml"
+      # /nix/…/src/parser.c:1:10: fatal error: tree_sitter/parser.h: No such file or directory
+      "tree-sitter-razor"
+    ]);
 
 in rustPlatform.buildRustPackage {
   pname = "tree-sitter";
   inherit src version cargoSha256;
 
-  nativeBuildInputs = [ emscripten which ];
-
-  postPatch = ''
-    # needed for the tests
-    rm -rf test/fixtures/grammars
-    ln -s ${grammars} test/fixtures/grammars
-
-    # These functions do not appear in the source code
-    sed -i /_ts_query_context/d lib/binding_web/exports.json
-    sed -i /___assert_fail/d lib/binding_web/exports.json
+  buildInputs =
+    lib.optionals stdenv.isDarwin [ Security ];
+  nativeBuildInputs =
+    [ which ]
+    ++ lib.optionals webUISupport [ emscripten ];
+
+  postPatch = lib.optionalString (!webUISupport) ''
+    # remove web interface
+    sed -e '/pub mod web_ui/d' \
+        -i cli/src/lib.rs
+    sed -e 's/web_ui,//' \
+        -e 's/web_ui::serve(&current_dir.*$/println!("ERROR: web-ui is not available in this nixpkgs build; enable the webUISupport"); std::process::exit(1);/' \
+        -i cli/src/main.rs
   '';
 
   # Compile web assembly with emscripten. The --debug flag prevents us from
   # minifying the JavaScript; passing it allows us to side-step more Node
   # JS dependencies for installation.
-  preBuild = ''
+  preBuild = lib.optionalString webUISupport ''
     bash ./script/build-wasm --debug
   '';
 
+  postInstall = ''
+    PREFIX=$out make install
+    ${lib.optionalString (!enableShared) "rm $out/lib/*.so{,.*}"}
+    ${lib.optionalString (!enableStatic) "rm $out/lib/*.a"}
+  '';
+
   # test result: FAILED. 120 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out
   doCheck = false;
 
@@ -77,6 +101,11 @@ in rustPlatform.buildRustPackage {
     };
     inherit grammars;
     inherit builtGrammars;
+
+    tests = {
+      # make sure all grammars build
+      builtGrammars = lib.recurseIntoAttrs builtGrammars;
+    };
   };
 
   meta = {
@@ -95,9 +124,8 @@ in rustPlatform.buildRustPackage {
     '';
     license = lib.licenses.mit;
     maintainers = with lib.maintainers; [ Profpatsch ];
-    # Darwin needs some more work with default libraries
     # Aarch has test failures with how tree-sitter compiles the generated C files
-    broken = stdenv.isDarwin || stdenv.isAarch64;
+    broken = stdenv.isAarch64;
   };
 
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammar.nix b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammar.nix
new file mode 100644
index 000000000000..f92e0d79426c
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammar.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, tree-sitter
+}:
+
+# Build a parser grammar and put the resulting shared object in `$out/parser`
+
+{
+  # language name
+  language
+  # version of tree-sitter
+, version
+  # source for the language grammar
+, source
+}:
+
+stdenv.mkDerivation {
+
+  pname = "${language}-grammar";
+  inherit version;
+
+  src = source;
+
+  buildInputs = [ tree-sitter ];
+
+  dontUnpack = true;
+  configurePhase= ":";
+  buildPhase = ''
+    runHook preBuild
+    scanner_cc="$src/src/scanner.cc"
+    if [ ! -f "$scanner_cc" ]; then
+      scanner_cc=""
+    fi
+    $CC -I$src/src/ -shared -o parser -Os $src/src/parser.c $scanner_cc -lstdc++
+    runHook postBuild
+  '';
+  installPhase = ''
+    runHook preInstall
+    mkdir $out
+    mv parser $out/
+    runHook postInstall
+  '';
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix
index ef0db9d68a9b..e1648b84be5e 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix
@@ -1,15 +1,31 @@
 {
-  bash = (builtins.fromJSON (builtins.readFile ./tree-sitter-bash.json));
-  c = (builtins.fromJSON (builtins.readFile ./tree-sitter-c.json));
-  cpp = (builtins.fromJSON (builtins.readFile ./tree-sitter-cpp.json));
-  embedded-template = (builtins.fromJSON (builtins.readFile ./tree-sitter-embedded-template.json));
-  go = (builtins.fromJSON (builtins.readFile ./tree-sitter-go.json));
-  html = (builtins.fromJSON (builtins.readFile ./tree-sitter-html.json));
-  javascript = (builtins.fromJSON (builtins.readFile ./tree-sitter-javascript.json));
-  jsdoc = (builtins.fromJSON (builtins.readFile ./tree-sitter-jsdoc.json));
-  json = (builtins.fromJSON (builtins.readFile ./tree-sitter-json.json));
-  python = (builtins.fromJSON (builtins.readFile ./tree-sitter-python.json));
-  ruby = (builtins.fromJSON (builtins.readFile ./tree-sitter-ruby.json));
-  rust = (builtins.fromJSON (builtins.readFile ./tree-sitter-rust.json));
-  typescript = (builtins.fromJSON (builtins.readFile ./tree-sitter-typescript.json));
+  tree-sitter-agda = (builtins.fromJSON (builtins.readFile ./tree-sitter-agda.json));
+  tree-sitter-bash = (builtins.fromJSON (builtins.readFile ./tree-sitter-bash.json));
+  tree-sitter-c = (builtins.fromJSON (builtins.readFile ./tree-sitter-c.json));
+  tree-sitter-c-sharp = (builtins.fromJSON (builtins.readFile ./tree-sitter-c-sharp.json));
+  tree-sitter-cpp = (builtins.fromJSON (builtins.readFile ./tree-sitter-cpp.json));
+  tree-sitter-css = (builtins.fromJSON (builtins.readFile ./tree-sitter-css.json));
+  tree-sitter-embedded-template = (builtins.fromJSON (builtins.readFile ./tree-sitter-embedded-template.json));
+  tree-sitter-fluent = (builtins.fromJSON (builtins.readFile ./tree-sitter-fluent.json));
+  tree-sitter-go = (builtins.fromJSON (builtins.readFile ./tree-sitter-go.json));
+  tree-sitter-haskell = (builtins.fromJSON (builtins.readFile ./tree-sitter-haskell.json));
+  tree-sitter-html = (builtins.fromJSON (builtins.readFile ./tree-sitter-html.json));
+  tree-sitter-java = (builtins.fromJSON (builtins.readFile ./tree-sitter-java.json));
+  tree-sitter-javascript = (builtins.fromJSON (builtins.readFile ./tree-sitter-javascript.json));
+  tree-sitter-jsdoc = (builtins.fromJSON (builtins.readFile ./tree-sitter-jsdoc.json));
+  tree-sitter-json = (builtins.fromJSON (builtins.readFile ./tree-sitter-json.json));
+  tree-sitter-julia = (builtins.fromJSON (builtins.readFile ./tree-sitter-julia.json));
+  tree-sitter-lua = (builtins.fromJSON (builtins.readFile ./tree-sitter-lua.json));
+  tree-sitter-ocaml = (builtins.fromJSON (builtins.readFile ./tree-sitter-ocaml.json));
+  tree-sitter-php = (builtins.fromJSON (builtins.readFile ./tree-sitter-php.json));
+  tree-sitter-python = (builtins.fromJSON (builtins.readFile ./tree-sitter-python.json));
+  tree-sitter-ql = (builtins.fromJSON (builtins.readFile ./tree-sitter-ql.json));
+  tree-sitter-razor = (builtins.fromJSON (builtins.readFile ./tree-sitter-razor.json));
+  tree-sitter-regex = (builtins.fromJSON (builtins.readFile ./tree-sitter-regex.json));
+  tree-sitter-ruby = (builtins.fromJSON (builtins.readFile ./tree-sitter-ruby.json));
+  tree-sitter-rust = (builtins.fromJSON (builtins.readFile ./tree-sitter-rust.json));
+  tree-sitter-scala = (builtins.fromJSON (builtins.readFile ./tree-sitter-scala.json));
+  tree-sitter-swift = (builtins.fromJSON (builtins.readFile ./tree-sitter-swift.json));
+  tree-sitter-typescript = (builtins.fromJSON (builtins.readFile ./tree-sitter-typescript.json));
+  tree-sitter-verilog = (builtins.fromJSON (builtins.readFile ./tree-sitter-verilog.json));
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-agda.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-agda.json
new file mode 100644
index 000000000000..f16877e94655
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-agda.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-agda",
+  "rev": "d710ff14d15ddee3764fd73a0837c6c4c8c913e9",
+  "date": "2019-09-20T18:06:06+08:00",
+  "path": "/nix/store/wqz9v9znaiwhhqi19hgig9bn0yvl4i9s-tree-sitter-agda",
+  "sha256": "1wpfj47l97pxk3i9rzdylqipy849r482fnj3lmx8byhalv7z1vm6",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json
index c367d24d09f6..f1d5efbe7ea0 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-bash",
-  "rev": "7b8adcf484e27b6c1a707ce28123e55dd4b7a844",
-  "date": "2019-07-26T14:05:41-06:00",
-  "sha256": "047p51ab4fqm55xqss6z74iyj1hlndql97dv9fifckczx3d5xn5g",
-  "fetchSubmodules": false
+  "rev": "e213464b5062017dc058cfb7effe2fc7a2eebb04",
+  "date": "2020-03-02T14:55:46+01:00",
+  "path": "/nix/store/napdz7i4k0gz469zsszdlvr5hmj8y7i9-tree-sitter-bash",
+  "sha256": "0wz9rmpd36g88l2hhy1xl3i5d6a6di1jlw11qkvccgg16kb9p4h7",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c-sharp.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c-sharp.json
new file mode 100644
index 000000000000..6498e40497eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c-sharp.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-c-sharp",
+  "rev": "b8bff2a389ecc098dbb7e8abee492816a5eb42db",
+  "date": "2020-11-15T07:54:17+00:00",
+  "path": "/nix/store/h5p71g661hbyzcdcj6xff8y5pcsivpa4-tree-sitter-c-sharp",
+  "sha256": "0x78s2wgd8b6pwjzbmc9fgp0ivdmxv39wikig1m55slai6yq51wh",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json
index c44bd0344b3e..401bea63e0ac 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-c",
-  "rev": "6002fcd5e86bb1e8670157bb008b97dbaf656d95",
-  "date": "2019-12-17T10:25:11-08:00",
-  "sha256": "0bcsgwyv9nskkh26hl4hylb03py98d2m565bgvq7fn3f8gyx5w7v",
-  "fetchSubmodules": false
+  "rev": "99151b1e9293c9e025498fee7e6691e1a52e1d03",
+  "date": "2020-05-14T11:39:30-07:00",
+  "path": "/nix/store/b5xqnw967s9a58wcpyspbkgbph6jxarv-tree-sitter-c",
+  "sha256": "07ax01r3npw13jlv20k15q2hdhqa0rwm2km6f5j50byqvmgfc6fm",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json
index b17af74ac8c9..a4538b1a932a 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-cpp",
-  "rev": "c7b767ac5fce26301321f91fb83fe9392c02d51d",
-  "date": "2019-12-17T13:43:08-08:00",
-  "sha256": "16i9iggr7ff18bif81viy9rvn1z55ad6yaq6dj0znjgaq8q6aclx",
-  "fetchSubmodules": false
+  "rev": "a35a275df92e7583df38f2de2562361f2b69987e",
+  "date": "2020-12-13T11:27:21-08:00",
+  "path": "/nix/store/l0mv4q1xdxz94ym1nl73y52i1yr9zcgi-tree-sitter-cpp",
+  "sha256": "130vizybkm11j3lpzmf183myz0vjxq75mpy6qz48rrkidhnrlryk",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-css.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-css.json
new file mode 100644
index 000000000000..b8609c0bd17d
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-css.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-css",
+  "rev": "23f2cb97d47860c517f67f03e1f4b621d5bd2085",
+  "date": "2020-05-14T14:44:30-07:00",
+  "path": "/nix/store/r5pkz9kly0mhgrmqzdzdsr6d1dpqavld-tree-sitter-css",
+  "sha256": "17svpf36p0p7spppzhm3fi833zpdl2l1scg34r6d4vcbv7dknrjy",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json
index a83a5a429e8b..f0ef7079bf67 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-embedded-template",
-  "rev": "3ca7c50fd3dd02df88cf120d8ab5b7b1f2efb270",
-  "date": "2020-01-16T16:31:20-08:00",
-  "sha256": "0vhmfn7jr5hdzksw808z99scqcyjr0i3qiybiq0yb644ysdmai05",
-  "fetchSubmodules": false
+  "rev": "8269c1360e5b1b9ba3e04e7896d9dd2f060de12f",
+  "date": "2020-07-20T12:50:27-07:00",
+  "path": "/nix/store/9ijnzv72vc1n56k6f1xp3kb7lc9hvlhh-tree-sitter-embedded-template",
+  "sha256": "03symsaxp8m128cn5h14pnm30ihpc49syb4vybpdvgcvraa408qq",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fluent.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fluent.json
new file mode 100644
index 000000000000..f40b8465b7db
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-fluent.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-fluent",
+  "rev": "858fdd6f1e81992e00d3541bfb31bac9365d7a47",
+  "date": "2018-06-18T13:00:38-07:00",
+  "path": "/nix/store/zbj8abdlrqi9swm8qn8rhpqmjwcz145f-tree-sitter-fluent",
+  "sha256": "0528v9w0cs73p9048xrddb1wpdhr92sn1sw8yyqfrq5sq0danr9k",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json
index bf8c4408b54c..612b8eb64d88 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-go",
-  "rev": "689cc8fbdc0613d267434f221af85aff91a31f8c",
-  "date": "2020-01-23T10:27:48-08:00",
-  "sha256": "04gpzi125akwgww5smw5x4dqr6jv5sq1165qn86bz15hwcmnybfj",
-  "fetchSubmodules": false
+  "rev": "dadfd9c9aab2630632e61cfce645c13c35aa092f",
+  "date": "2020-10-27T13:42:16-04:00",
+  "path": "/nix/store/91a8w265vjc955hyp7cqvpm8ks9zcmqv-tree-sitter-go",
+  "sha256": "1pwbzkg7s0l2fhr4p1rpcldjcpxbkaqsm3q81543almc75k38x8w",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json
new file mode 100644
index 000000000000..10d2dd64ac28
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-haskell.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-haskell",
+  "rev": "2a0aa1cb5f1b787a4056a29fa0791e87846e33fb",
+  "date": "2018-11-03T09:56:20-07:00",
+  "path": "/nix/store/9xszs4xi51qr72laxr67zxnh8y2br0gy-tree-sitter-haskell",
+  "sha256": "0z0nfip5m0yrjgm49j5nld7jkgyjdmps101xhbng39pwfnh1av83",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json
index 40d124b86269..7e53e76c0dea 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-html",
-  "rev": "2147dd298a2b2e9593bfcb51a14c289a0dc7eb87",
-  "date": "2020-01-16T12:47:09-08:00",
-  "sha256": "0acg9v940xq4sw7019z2izc9qs10wwqipyiki243dws6z0wmwhdq",
-  "fetchSubmodules": false
+  "rev": "7f442e1c6163d450c69c75c7a621badc3a0ea98f",
+  "date": "2020-07-20T12:46:52-07:00",
+  "path": "/nix/store/qklk97krsas1kjbh8dp6ii1gj9sqz8h9-tree-sitter-html",
+  "sha256": "0z249nnxlal8g6zbrys6kb80vksgcw2j5nd737m6yna2h5bhl126",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-java.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-java.json
new file mode 100644
index 000000000000..260dc4d10c00
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-java.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-java",
+  "rev": "f7b62ac33d63bea56ce202ace107aaa4285e50af",
+  "date": "2020-10-27T13:41:02-04:00",
+  "path": "/nix/store/h51zjbzdrm89gczcdv7nyih54vnd2xps-tree-sitter-java",
+  "sha256": "0jbh79brs1dskfqw05s9ndrp46hibyc37nfvhxlvanmgj3pjwgxb",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json
index 04a6ae1056e8..2c563f3fbfa4 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-javascript",
-  "rev": "6e3692292adf8750fece625fc06fc1503e00d75e",
-  "date": "2020-01-27T13:47:50-08:00",
-  "sha256": "1i8m7v0859109bf2dz0dhf4cnhqmwc4947z49g4rs07k8h8dfk99",
-  "fetchSubmodules": false
+  "rev": "3f8b62f9befd3cb3b4cb0de22f6595a0aadf76ca",
+  "date": "2020-12-02T10:20:20-08:00",
+  "path": "/nix/store/c17bf7sjq95lank5ygbglv8j48i5z9w3-tree-sitter-javascript",
+  "sha256": "0fjq1jzrzd8c8rfxkh2s25gnqlyc19k3a8i3r1129kakisn1288k",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-jsdoc.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-jsdoc.json
index 9795f600c82b..5dca4a5f9615 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-jsdoc.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-jsdoc.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-jsdoc",
-  "rev": "7b2dc910126d553cddd3b2318f39604d205b3a21",
-  "date": "2020-01-27T13:06:46-08:00",
-  "sha256": "04ahmbwfx3238dbsvlpg8xgb1c4bazdd8yw7dk4vph9cp8rq0dj5",
-  "fetchSubmodules": false
+  "rev": "77e7785739ad3e90c3de8ed5a55418a5fd2b8225",
+  "date": "2020-05-14T14:58:51-07:00",
+  "path": "/nix/store/3wp3hff203z15fvbnizcqzic1pjxmpg4-tree-sitter-jsdoc",
+  "sha256": "0i2ac7i0vs46668q56dpmd9c02vcyy3f8rh4i0dbvd3rvihifbgc",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json
index 282e28c9be88..a70809369888 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-json",
-  "rev": "7b6a33f300e3e88c3017e0a9d88c77b50ea6d149",
-  "date": "2019-12-10T10:27:22-08:00",
-  "sha256": "17yc7spn8v64ll684634zmjq3130yxvb5bfgjwg0agcaklpx71dp",
-  "fetchSubmodules": false
+  "rev": "d3976b27df8622ed17bef6dd5e358b398e73c676",
+  "date": "2020-05-14T14:59:27-07:00",
+  "path": "/nix/store/ds2wnlrh289rsnjx828h3jy1706g3x21-tree-sitter-json",
+  "sha256": "1cbhsmzbjni0mynjcai6gshhg16nls82v9lcihxf350dz57f7sax",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json
new file mode 100644
index 000000000000..2cf5f06dc19c
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-julia.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-julia",
+  "rev": "6a0863f1ce3fcf6f99dc0addb7886dcbd27c5a48",
+  "date": "2020-09-08T19:39:52-07:00",
+  "path": "/nix/store/xn5nii9mi2aw7xdabyxlglha2vk12h1w-tree-sitter-julia",
+  "sha256": "07ds4wzgvnkgkq07izdglkk8lgpqrylvrs96afnwxi56bnzs8sbv",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json
new file mode 100644
index 000000000000..804d613357e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-lua.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/nvim-treesitter/tree-sitter-lua",
+  "rev": "97b757ad3546d68dc1131e6ffb9b1d2a750eea29",
+  "date": "2020-11-25T21:23:57+01:00",
+  "path": "/nix/store/irz0dikk9dahkayi41chcznqq1i3wr84-tree-sitter-lua",
+  "sha256": "1nhg139vk3xm6ip4mhr29z0rprfg4q417z2vlvkz3m9wp8gppzls",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json
new file mode 100644
index 000000000000..32488ebb73ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ocaml.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-ocaml",
+  "rev": "4ec9ee414dadc2b6e7325a9f8124d02f6cd8c250",
+  "date": "2020-09-18T02:13:40+02:00",
+  "path": "/nix/store/dszjdnwnbziqxav2khs85026msm6fasz-tree-sitter-ocaml",
+  "sha256": "0wy85940fhmrnz7c1gk6xkipm8ixzalq5q4i7mcc6wnjiiwq60gx",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-php.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-php.json
new file mode 100644
index 000000000000..1fb2a0798481
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-php.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-php",
+  "rev": "b0c0367d4b7058921fdc4ba11e257441a64ab809",
+  "date": "2020-07-29T16:56:25-07:00",
+  "path": "/nix/store/la06yzcv5w1dpp31s4clllkfic8rs98a-tree-sitter-php",
+  "sha256": "0a47rr1d5dg70kfvk257g7mhpcwslv6prxc7012spxcrfiwbx89l",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json
index 4abdc3fe00a2..86551acbee09 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-python",
-  "rev": "899ac8d5d6c883b2f05362c9953e14e78aac474c",
-  "date": "2020-01-16T16:30:41-08:00",
-  "sha256": "1mw23kfr33s6md701p0p2nrd04119204ir78i7j1s5cxiyvpjq33",
-  "fetchSubmodules": false
+  "rev": "65b486b42fe0188e4be344092151042bf1bc6d9a",
+  "date": "2020-12-15T09:33:20-08:00",
+  "path": "/nix/store/k9jziqzyxq2bv55pwl03jcmmca83fjyp-tree-sitter-python",
+  "sha256": "1yxqdlmp0jybm7vvza1ni5a320vrviqkd14pnpcrg9ilzq23mlsh",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ql.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ql.json
new file mode 100644
index 000000000000..27042b6ef957
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ql.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-ql",
+  "rev": "a0d688d62dcb9cbc7c53f0d98343c458b3776b3d",
+  "date": "2020-09-16T12:56:09-07:00",
+  "path": "/nix/store/dfdaf6wg80dfw5fvdiir7n9nj6j30g3g-tree-sitter-ql",
+  "sha256": "0f6rfhrbvpg8czfa7mld45by3rp628bs6fyl47a8mn18w6x0n5g2",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-razor.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-razor.json
new file mode 100644
index 000000000000..6905f4145aaf
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-razor.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-razor",
+  "rev": "60edbd8e798e416f5226a746396efa6a8614fa9b",
+  "date": "2016-07-08T15:17:50-07:00",
+  "path": "/nix/store/2vkxw48wc0xf07awi65r4rg2m1lpqq6c-tree-sitter-razor",
+  "sha256": "1ldsn9nxldxkxdy7irywx88d6a56q05f6907lypzass07piyqp2i",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-regex.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-regex.json
new file mode 100644
index 000000000000..d04c1bdab867
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-regex.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-regex",
+  "rev": "be2e415b5716615530234d179dc27c32b7a1d86b",
+  "date": "2020-05-14T15:05:54-07:00",
+  "path": "/nix/store/acbcq9lgh5pf6hq3329fa253yfvaj6ji-tree-sitter-regex",
+  "sha256": "0qxbafbwfj64bwhj3455jgkidpdzqwrlsqm3rckq2pi75flnkv42",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json
index db58c7eb3eb9..027478e99f88 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-ruby",
-  "rev": "6540da2a79ceb7dc7afe50e9ac01eaad4378702d",
-  "date": "2019-12-09T14:56:14-08:00",
-  "sha256": "1i0ab1rm5hba0nnbmi4m37fbs368hk6wyby09pfmcmjwpi9zs0f9",
-  "fetchSubmodules": false
+  "rev": "bb572f60e9538bd11fbde95a54f97522073f1e06",
+  "date": "2020-12-20T12:25:50-08:00",
+  "path": "/nix/store/hkjgvxh8l4drk1z4zkhmd0wcj876x5y1-tree-sitter-ruby",
+  "sha256": "198sfmrb3mxvpfmlwmwfmb3qs075ih0bjmr0ffrdy4nqm4a00cb8",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json
index e3a906f076ac..38c9e44f2f6a 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-rust",
-  "rev": "1c37782a5528979a22991f8ed50dd3d3e423ac92",
-  "date": "2020-01-20T16:08:51-08:00",
-  "sha256": "04fzzn2rxpfg7pwymmarkdjabbp20yp10yzr4a5a1xcqx8hky9ix",
-  "fetchSubmodules": false
+  "rev": "8746bd4b584b8063ee8e445bf31015e887417d33",
+  "date": "2020-11-23T17:16:42-08:00",
+  "path": "/nix/store/1zzxvza23wsdyazw47lhjvrs0za6wjpn-tree-sitter-rust",
+  "sha256": "0bhxfyq8ycnp90pqvr6cf3gpq1vax8a34kaq85dmbrc6ar8a7ap6",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scala.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scala.json
new file mode 100644
index 000000000000..8d9959cf4cf4
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-scala.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-scala",
+  "rev": "211bb726bb5857f872247b600c7c1808e641a8d4",
+  "date": "2020-07-13T13:31:00-07:00",
+  "path": "/nix/store/6q66gzabxazr2581dgp4pp5wwyk2p6mw-tree-sitter-scala",
+  "sha256": "096ps5za8gxmq61gdd3xdk8cif07vb4v8asls2kdwm6jazm82777",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-swift.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-swift.json
new file mode 100644
index 000000000000..8f73380e3799
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-swift.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-swift",
+  "rev": "a22fa5e19bae50098e2252ea96cba3aba43f4c58",
+  "date": "2019-10-24T19:04:02-06:00",
+  "path": "/nix/store/pk5xk8yp6vanbar75bhfrs104w0k1ph0-tree-sitter-swift",
+  "sha256": "14b40lmwrnyvdz2wiv684kfh4fvqfhbj1dgrx81ppmy7hsz7jcq7",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json
index 9995665c7c68..a875232eab6d 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json
@@ -1,7 +1,10 @@
 {
   "url": "https://github.com/tree-sitter/tree-sitter-typescript",
-  "rev": "aa950f58ea8aa112bc72f3481b98fc2d3c07b3e0",
-  "date": "2020-01-27T13:51:28-08:00",
-  "sha256": "0y64lls7hw7yc70d9i6p4n1kchg11sbgl2m6yafy7w2ymksb5iw5",
-  "fetchSubmodules": false
+  "rev": "a3a4becef889692724bb1c2191f8fc4bce6573f9",
+  "date": "2020-12-15T13:34:55-08:00",
+  "path": "/nix/store/dra5wbhgxkkhphm1mhgv87hsfw0g18nw-tree-sitter-typescript",
+  "sha256": "0ir7lmzwnbf1zwbl4bfsib1jilg8pvfc1nabaq2n2rixvghlvf3d",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
 }
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-verilog.json b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-verilog.json
new file mode 100644
index 000000000000..7ab79c6f2d54
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-verilog.json
@@ -0,0 +1,10 @@
+{
+  "url": "https://github.com/tree-sitter/tree-sitter-verilog",
+  "rev": "ad551aae2649da56582bc0557478a7dc979c0be3",
+  "date": "2020-10-13T17:40:47-07:00",
+  "path": "/nix/store/nfaxfqrqkxpwaq8rnk7kcp28nnj8y6m2-tree-sitter-verilog",
+  "sha256": "0cy29i200rnc34d237s19r6a1n5vv4d3wgwpbywxg6ahcankc34m",
+  "fetchSubmodules": false,
+  "deepClone": false,
+  "leaveDotGit": false
+}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/library.nix b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/library.nix
deleted file mode 100644
index 2d5d3e7d0b4d..000000000000
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/library.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv
-, language
-, tree-sitter
-, version
-, source
-}:
-
-stdenv.mkDerivation {
-
-  pname = "tree-sitter-${language}-library";
-  inherit version;
-
-  src = source;
-
-  buildInputs = [ tree-sitter ];
-
-  dontUnpack = true;
-  configurePhase= ":";
-  buildPhase = ''
-    runHook preBuild
-    $CC -I$src/src/ -shared -o parser -Os $src/src/parser.c
-    runHook postBuild
-  '';
-  installPhase = ''
-    runHook preInstall
-    mkdir $out
-    mv parser $out/
-    runHook postInstall
-  '';
-}
diff --git a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/update.nix b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/update.nix
index 2a3575a44d20..7b0b16b403f4 100644
--- a/nixpkgs/pkgs/development/tools/parsing/tree-sitter/update.nix
+++ b/nixpkgs/pkgs/development/tools/parsing/tree-sitter/update.nix
@@ -1,66 +1,188 @@
-{ writeShellScript, nix-prefetch-git
+{ writeShellScript, nix-prefetch-git, formats, lib
 , curl, jq, xe
 , src }:
 
 let
-  # print all the grammar names mentioned in the fetch-fixtures script
-  getGrammarNames = writeShellScript "get-grammars.sh" ''
+  # Grammars we want to fetch from the tree-sitter github orga
+  knownTreeSitterOrgGrammarRepos = [
+    "tree-sitter-javascript"
+    "tree-sitter-c"
+    "tree-sitter-swift"
+    "tree-sitter-json"
+    "tree-sitter-cpp"
+    "tree-sitter-ruby"
+    "tree-sitter-razor"
+    "tree-sitter-go"
+    "tree-sitter-c-sharp"
+    "tree-sitter-python"
+    "tree-sitter-typescript"
+    "tree-sitter-rust"
+    "tree-sitter-bash"
+    "tree-sitter-php"
+    "tree-sitter-java"
+    "tree-sitter-scala"
+    "tree-sitter-ocaml"
+    "tree-sitter-julia"
+    "tree-sitter-agda"
+    "tree-sitter-fluent"
+    "tree-sitter-html"
+    "tree-sitter-haskell"
+    "tree-sitter-regex"
+    "tree-sitter-css"
+    "tree-sitter-verilog"
+    "tree-sitter-jsdoc"
+    "tree-sitter-ql"
+    "tree-sitter-embedded-template"
+  ];
+  knownTreeSitterOrgGrammarReposJson = jsonFile "known-tree-sitter-org-grammar-repos" knownTreeSitterOrgGrammarRepos;
+
+  # repos of the tree-sitter github orga we want to ignore (not grammars)
+  ignoredTreeSitterOrgRepos = [
+    "tree-sitter"
+    "tree-sitter-cli"
+    # this is the haskell language bindings, tree-sitter-haskell is the grammar
+    "haskell-tree-sitter"
+    # this is the ruby language bindings, tree-sitter-ruby is the grammar
+    "ruby-tree-sitter"
+    # this is the (unmaintained) rust language bindings, tree-sitter-rust is the grammar
+    "rust-tree-sitter"
+    # this is the nodejs language bindings, tree-sitter-javascript is the grammar
+    "node-tree-sitter"
+    # this is the python language bindings, tree-sitter-python is the grammar
+    "py-tree-sitter"
+    # afl fuzzing for tree sitter
+    "afl-tree-sitter"
+    # archived
+    "highlight-schema"
+    # website
+    "tree-sitter.github.io"
+  ];
+  ignoredTreeSitterOrgReposJson = jsonFile "ignored-tree-sitter-org-repos" ignoredTreeSitterOrgRepos;
+
+  # Additional grammars that are not in the official github orga.
+  # If you need a grammar that already exists in the official orga,
+  # make sure to give it a different name.
+  otherGrammars = {
+    "tree-sitter-lua" = {
+      orga = "nvim-treesitter";
+      repo = "tree-sitter-lua";
+    };
+  };
+
+  allGrammars =
+    let
+      treeSitterOrgaGrammars =
+        lib.listToAttrs (map (repo:
+          { name = repo;
+            value = {
+              orga = "tree-sitter";
+              inherit repo;
+            };
+          })
+        knownTreeSitterOrgGrammarRepos);
+
+    in
+      mergeAttrsUnique otherGrammars treeSitterOrgaGrammars;
+
+  # TODO: move to lib
+  mergeAttrsUnique = left: right:
+    let intersect = lib.intersectLists (lib.attrNames left) (lib.attrNames right); in
+    assert
+      lib.assertMsg (intersect == [])
+        (lib.concatStringsSep "\n" [
+          "mergeAttrsUnique: keys in attrset overlapping:"
+          "left: ${lib.generators.toPretty {} (lib.getAttrs intersect left)}"
+          "right: ${lib.generators.toPretty {} (lib.getAttrs intersect right)}"
+        ]);
+    left // right;
+
+
+
+  jsonFile = name: val: (formats.json {}).generate name val;
+
+  # check the tree-sitter orga repos
+  checkTreeSitterRepos = writeShellScript "get-grammars.sh" ''
     set -euo pipefail
-    sed -ne 's/^fetch_grammar \(\S*\).*$/\1/p' \
-      ${src}/script/fetch-fixtures
+    res=$(${jq}/bin/jq \
+      --slurpfile known "${knownTreeSitterOrgGrammarReposJson}" \
+      --slurpfile ignore "${ignoredTreeSitterOrgReposJson}" \
+      '. - ($known[0] + $ignore[0])' \
+      )
+    if [ ! "$res" == "[]" ]; then
+      echo "These repositories are neither known nor ignored:" 1>&2
+      echo "$res" 1>&2
+      exit 1
+    fi
   '';
 
   # TODO
   urlEscape = x: x;
-  # TODO
-  urlEscapeSh = writeShellScript "escape-url" ''printf '%s' "$1"'';
 
   # generic bash script to find the latest github release for a repo
-  latestGithubRelease = { owner }: writeShellScript "latest-github-release" ''
+  latestGithubRelease = { orga, repo }: writeShellScript "latest-github-release" ''
     set -euo pipefail
-    repo="$1"
     res=$(${curl}/bin/curl \
       --silent \
-      "https://api.github.com/repos/${urlEscape owner}/$(${urlEscapeSh} "$repo")/releases/latest")
-    if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message')" =~ "rate limit" ]]; then
+      "https://api.github.com/repos/${urlEscape orga}/${urlEscape repo}/releases/latest")
+    if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then
       echo "rate limited" >&2
     fi
     release=$(printf "%s" "$res" | ${jq}/bin/jq '.tag_name')
     # github sometimes returns an empty list even tough there are releases
     if [ "$release" = "null" ]; then
-      echo "uh-oh, latest for $repo is not there, using HEAD" >&2
+      echo "uh-oh, latest for ${orga + "/" + repo} is not there, using HEAD" >&2
       release="HEAD"
     fi
     echo "$release"
   '';
 
+  # find the latest repos of a github organization
+  latestGithubRepos = { orga }: writeShellScript "latest-github-repos" ''
+    set -euo pipefail
+    res=$(${curl}/bin/curl \
+      --silent \
+      'https://api.github.com/orgs/${urlEscape orga}/repos?per_page=100')
+
+    if [[ "$(printf "%s" "$res" | ${jq}/bin/jq '.message?')" =~ "rate limit" ]]; then
+      echo "rate limited" >&2   #
+    fi
+
+    printf "%s" "$res" | ${jq}/bin/jq 'map(.name)' \
+      || echo "failed $res"
+  '';
+
   # update one tree-sitter grammar repo and print their nix-prefetch-git output
-  updateGrammar = { owner }: writeShellScript "update-grammar.sh" ''
+  updateGrammar = { orga, repo }: writeShellScript "update-grammar.sh" ''
     set -euo pipefail
-    repo="$1"
-    latest="$(${latestGithubRelease { inherit owner; }} "$repo")"
-    echo "Fetching latest release ($latest) of $repo …" >&2
+    latest="$(${latestGithubRelease { inherit orga repo; }})"
+    echo "Fetching latest release ($latest) of ${repo} …" >&2
     ${nix-prefetch-git}/bin/nix-prefetch-git \
       --quiet \
       --no-deepClone \
-      --url "https://github.com/${urlEscape owner}/$(${urlEscapeSh} "$repo")" \
+      --url "https://github.com/${urlEscape orga}/${urlEscape repo}" \
       --rev "$latest"
     '';
 
+  foreachSh = attrs: f:
+    lib.concatMapStringsSep "\n" f
+    (lib.mapAttrsToList (k: v: { name = k; } // v) attrs);
+
   update-all-grammars = writeShellScript "update-all-grammars.sh" ''
     set -euo pipefail
-    grammarNames=$(${getGrammarNames})
+    echo "fetching list of grammars" 1>&2
+    treeSitterRepos=$(${latestGithubRepos { orga = "tree-sitter"; }})
+    echo "checking the tree-sitter repo list against the grammars we know" 1>&2
+    printf '%s' "$treeSitterRepos" | ${checkTreeSitterRepos}
     outputDir="${toString ./.}/grammars"
+    echo "writing files to $outputDir" 1>&2
     mkdir -p "$outputDir"
-    updateCommand=$(printf \
-      '${updateGrammar { owner = "tree-sitter"; }} "$1" > "%s/$1.json"' \
-      "$outputDir")
-    printf '%s' "$grammarNames" \
-      | ${xe}/bin/xe printf "tree-sitter-%s\n" {} \
-      | ${xe}/bin/xe -j2 -s "$updateCommand"
+    ${foreachSh allGrammars
+      ({name, orga, repo}: ''${updateGrammar { inherit orga repo; }} > $outputDir/${name}.json'')}
     ( echo "{"
-      printf '%s' "$grammarNames" \
-        | ${xe}/bin/xe -s 'printf "  %s = (builtins.fromJSON (builtins.readFile ./tree-sitter-%s.json));\n" "$1" "$1"'
+      ${foreachSh allGrammars
+        ({name, ...}: ''
+           # indentation hack
+             printf "  %s = (builtins.fromJSON (builtins.readFile ./%s.json));\n" "${name}" "${name}"'')}
       echo "}" ) \
       > "$outputDir/default.nix"
   '';