python3Packages.tree-sitter-yaml: init at 0.7.0

This commit is contained in:
Zexin Yuan
2025-04-01 09:33:44 +08:00
parent a9ccf91ea2
commit de290fd512
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.7.0";
src = fetchFromGitHub {
owner = "tree-sitter-grammars";
repo = "tree-sitter-yaml";
rev = "v${version}";
hash = "sha256-23/zcjnQUQt32N2EdQMzWM9srkXfQxlBvOo7FWH6rnw=";
};
in
buildPythonPackage {
pname = "tree-sitter-yaml";
inherit version src;
pyproject = true;
disabled = pythonOlder "3.9";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-Rxjimtp5Lg0x8wgWvyyCepMJipPdc0TplxznrF9COtM=";
};
build-system = [
cargo
rustPlatform.cargoSetupHook
rustc
setuptools
wheel
];
optional-dependencies = {
core = [
tree-sitter
];
};
pythonImportsCheck = [
"tree_sitter_yaml"
];
meta = {
description = "YAML grammar for tree-sitter";
homepage = "https://github.com/tree-sitter-grammars/tree-sitter-yaml";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ yzx9 ];
};
}
+2
View File
@@ -17400,6 +17400,8 @@ self: super: with self; {
tree-sitter-rust = callPackage ../development/python-modules/tree-sitter-rust { };
tree-sitter-yaml = callPackage ../development/python-modules/tree-sitter-yaml { };
tree-sitter_0_21 = callPackage ../development/python-modules/tree-sitter/0_21.nix { };
treelib = callPackage ../development/python-modules/treelib { };