1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 tree-sitter, 7}: 8 9buildPythonPackage rec { 10 pname = "tree-sitter-python"; 11 version = "0.23.6"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "tree-sitter"; 16 repo = "tree-sitter-python"; 17 tag = "v${version}"; 18 hash = "sha256-71Od4sUsxGEvTwmXX8hBvzqD55hnXkVJublrhp1GICg="; 19 }; 20 21 build-system = [ 22 setuptools 23 ]; 24 25 optional-dependencies = { 26 core = [ 27 tree-sitter 28 ]; 29 }; 30 31 # There are no tests 32 doCheck = false; 33 pythonImportsCheck = [ "tree_sitter_python" ]; 34 35 meta = with lib; { 36 description = "Python grammar for tree-sitter"; 37 homepage = "https://github.com/tree-sitter/tree-sitter-python"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ doronbehar ]; 40 }; 41}