{ lib, buildPythonPackage, fetchFromGitHub, rustPlatform, cargo, rustc, setuptools, tree-sitter, pytestCheckHook, }: buildPythonPackage rec { pname = "tree-sitter-yaml"; version = "0.7.1"; pyproject = true; src = fetchFromGitHub { owner = "tree-sitter-grammars"; repo = "tree-sitter-yaml"; tag = "v${version}"; hash = "sha256-Z2L/aQWIyZ8cSqbfjm/i10fJP++yZ2tZgho0U3asA0g="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit src; hash = "sha256-QvqvyjnCgSuSiiY4SB5nB9S7LnGP1F+tySxue359SWY="; }; build-system = [ cargo rustPlatform.cargoSetupHook rustc setuptools ]; optional-dependencies = { core = [ tree-sitter ]; }; pythonImportsCheck = [ "tree_sitter_yaml" ]; nativeCheckInputs = [ pytestCheckHook tree-sitter ]; 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 ]; }; }