python3Packages.tree-sitter-c-sharp: init at 0.23.2

This commit is contained in:
Zexin Yuan
2025-04-01 09:33:44 +08:00
parent 84a380590b
commit 4e8e483a4f
2 changed files with 61 additions and 0 deletions
@@ -0,0 +1,59 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
pythonOlder,
cargo,
rustPlatform,
rustc,
setuptools,
wheel,
tree-sitter,
}:
let
version = "0.23.1";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-c-sharp";
rev = "v${version}";
hash = "sha256-weH0nyLpvVK/OpgvOjTuJdH2Hm4a1wVshHmhUdFq3XA=";
};
in
buildPythonPackage {
pname = "tree-sitter-c-sharp";
inherit version src;
pyproject = true;
disabled = pythonOlder "3.9";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-IogdMRj1eHRLtdNFdGNInpEQAAbRpM248GqkY+Mgu10=";
};
build-system = [
cargo
rustPlatform.cargoSetupHook
rustc
setuptools
wheel
];
optional-dependencies = {
core = [
tree-sitter
];
};
pythonImportsCheck = [
"tree_sitter_c_sharp"
];
meta = {
description = "C# Grammar for tree-sitter";
homepage = "https://github.com/tree-sitter/tree-sitter-c-sharp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ yzx9 ];
};
}
+2
View File
@@ -17380,6 +17380,8 @@ self: super: with self; {
tree-sitter = callPackage ../development/python-modules/tree-sitter { };
tree-sitter-c-sharp = callPackage ../development/python-modules/tree-sitter-c-sharp { };
tree-sitter-html = callPackage ../development/python-modules/tree-sitter-html { };
tree-sitter-javascript = callPackage ../development/python-modules/tree-sitter-javascript { };