Unverified Commit 1623ab8e authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

tree-sitter-grammars.tree-sitter-gemini: init (#407649)

parents 3fe9d2e7 71537ef2
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ let
  # to update:
  # 1) change all these hashes
  # 2) nix-build -A tree-sitter.updater.update-all-grammars
  # 3) Set NIXPKGS_GITHUB_TOKEN env variable to avoid api rate limit (Use a Personal Access Token from https://github.com/settings/tokens It does not need any permissions)
  # 3) Set GITHUB_TOKEN env variable to avoid api rate limit (Use a Personal Access Token from https://github.com/settings/tokens It does not need any permissions)
  # 4) run the ./result script that is output by that (it updates ./grammars)
  version = "0.25.3";
  hash = "sha256-xafeni6Z6QgPiKzvhCT2SyfPn0agLHo47y+6ExQXkzE=";
@@ -43,7 +43,7 @@ let

  update-all-grammars = callPackage ./update.nix { };

  fetchGrammar = (
  fetchGrammar =
    v:
    fetchgit {
      inherit (v)
@@ -52,8 +52,7 @@ let
        sha256
        fetchSubmodules
        ;
    }
  );
    };

  grammars = runCommand "grammars" { } (
    ''
@@ -61,7 +60,7 @@ let
    ''
    + (lib.concatStrings (
      lib.mapAttrsToList (
        name: grammar: "ln -s ${if grammar ? src then grammar.src else fetchGrammar grammar} $out/${name}\n"
        name: grammar: "ln -s ${grammar.src or (fetchGrammar grammar)} $out/${name}\n"
      ) (import ./grammars { inherit lib; })
    ))
  );
@@ -134,7 +133,7 @@ let
          };
        };
    in
    lib.mapAttrs build (grammars);
    lib.mapAttrs build grammars;

  # Usage:
  # pkgs.tree-sitter.withPlugins (p: [ p.tree-sitter-c p.tree-sitter-java ... ])
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
  tree-sitter-fish = lib.importJSON ./tree-sitter-fish.json;
  tree-sitter-fortran = lib.importJSON ./tree-sitter-fortran.json;
  tree-sitter-gdscript = lib.importJSON ./tree-sitter-gdscript.json;
  tree-sitter-gemini = lib.importJSON ./tree-sitter-gemini.json;
  tree-sitter-gleam = lib.importJSON ./tree-sitter-gleam.json;
  tree-sitter-glimmer = lib.importJSON ./tree-sitter-glimmer.json;
  tree-sitter-glsl = lib.importJSON ./tree-sitter-glsl.json;
+12 −0
Original line number Diff line number Diff line
{
  "url": "https://github.com/blessanabraham/tree-sitter-gemini",
  "rev": "3cc5e4bdf572d5df4277fc2e54d6299bd59a54b3",
  "date": "2023-08-26T22:20:36+03:00",
  "path": "/nix/store/ywwyjjaps1swpzy0hndllwka4rg8hbdb-tree-sitter-gemini",
  "sha256": "1r965z6cls7ahipf9bpvcvpv4xda7k1j64lvnwf2bkb83qpakdc2",
  "hash": "sha256-grWpLh5ozSUct5sSI8M8qnWy72b7ruRuhOpoyswvJuU=",
  "fetchLFS": false,
  "fetchSubmodules": false,
  "deepClone": false,
  "leaveDotGit": false
}
+11 −9
Original line number Diff line number Diff line
@@ -336,6 +336,10 @@ let
      orga = "prestonknopp";
      repo = "tree-sitter-gdscript";
    };
    "tree-sitter-gemini" = {
      orga = "blessanabraham";
      repo = "tree-sitter-gemini";
    };
    "tree-sitter-godot-resource" = {
      orga = "prestonknopp";
      repo = "tree-sitter-godot-resource";
@@ -574,15 +578,13 @@ let
     }
     ${updateImpl} print-all-grammars-nix-file "$(< ${
       jsonFile "all-grammars.json" {
         allGrammars = (
           lib.mapAttrsToList (
         allGrammars = lib.mapAttrsToList (
           nixRepoAttrName: attrs:
           attrs
           // {
             inherit nixRepoAttrName;
           }
           ) allGrammars
         );
         ) allGrammars;
         inherit outputDir;
       }
     })"