Gaetan Lepage
2024-10-14 14:41:39 +02:00
parent b9f01e6de3
commit 04442b204a
@@ -27,13 +27,13 @@ let
# 2) nix-build -A tree-sitter.updater.update-all-grammars
# 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.23.0";
hash = "sha256-QNi2u6/jtiMo1dLYoA8Ev1OvZfa8mXCMibSD70J4vVI=";
version = "0.24.3";
hash = "sha256-2Pg4D1Pf1Ex6ykXouAJvD1NVfg5CH4rCQcSTAJmYwd4=";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter";
rev = "v${version}";
rev = "refs/tags/v${version}";
inherit hash;
fetchSubmodules = true;
};
@@ -111,7 +111,7 @@ rustPlatform.buildRustPackage {
pname = "tree-sitter";
inherit src version;
cargoHash = "sha256-H4baEmGsQx+W9EXblt8R1CTYfkgR+dQDAsIwPVsqR68=";
cargoHash = "sha256-0ZoXf0eV3kmHaRoHcWrVEgoWnYNBsY9GiFfy84H+0mc=";
buildInputs =
lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ];
@@ -133,6 +133,8 @@ rustPlatform.buildRustPackage {
sed -e 's/playground,//' \
-e 's/playground::serve(&grammar_path.*$/println!("ERROR: web-ui is not available in this nixpkgs build; enable the webUISupport"); std::process::exit(1);/' \
-i cli/src/main.rs
sed -e 's/playground::serve(.*$/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
@@ -169,7 +171,7 @@ rustPlatform.buildRustPackage {
};
};
meta = with lib; {
meta = {
homepage = "https://github.com/tree-sitter/tree-sitter";
description = "Parser generator tool and an incremental parsing library";
mainProgram = "tree-sitter";
@@ -185,7 +187,7 @@ rustPlatform.buildRustPackage {
* Robust enough to provide useful results even in the presence of syntax errors
* Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application
'';
license = licenses.mit;
maintainers = with maintainers; [ Profpatsch ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Profpatsch ];
};
}