@@ -27,6 +27,12 @@ let
} ''
mkdir -p $out/parser
ln -s ${grammar}/parser $out/parser/${name}.so
+
+ ${lib.optionalString (builtins.hasAttr "branch" spec) ''
+ if [ -d ${grammar}/queries ]; then
+ ln -s ${grammar}/queries $out/queries
+ fi
+ ''}
'';
in
builtins.mapAttrs buildTreesitterPlugin grammars