diff options
Diffstat (limited to 'grammars.nix')
-rw-r--r-- | grammars.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grammars.nix b/grammars.nix index 6dbc05c8..bd2c95cc 100644 --- a/grammars.nix +++ b/grammars.nix @@ -13,10 +13,12 @@ let gitGrammars = builtins.filter isGitGrammar languagesConfig.grammar; buildGrammar = grammar: let - source = builtins.fetchGit { + source = builtins.fetchTree { + type = "git"; url = grammar.source.git; rev = grammar.source.rev; - allRefs = true; + ref = grammar.source.ref or "HEAD"; + shallow = true; }; in stdenv.mkDerivation rec { # see https://github.com/NixOS/nixpkgs/blob/fbdd1a7c0bc29af5325e0d7dd70e804a972eb465/pkgs/development/tools/parsing/tree-sitter/grammar.nix |