1{ lib 2, stdenv 3, buildPythonPackage 4, fetchFromGitHub 5, setuptools 6}: 7 8buildPythonPackage rec { 9 pname = "py-tree-sitter"; 10 version = "unstable-2022-02-08"; 11 format = "pyproject"; 12 13 src = fetchFromGitHub { 14 owner = "tree-sitter"; 15 repo = "py-tree-sitter"; 16 rev = "9c8261d36e55d9e4a6543dc9e570bfd7911ed7bf"; 17 sha256 = "sha256-YDe9m85LIPNumo9mrhMMotUspq/8B3t5kt2ScMJI+hY="; 18 fetchSubmodules = true; 19 }; 20 21 nativeBuildInputs = [ 22 setuptools 23 ]; 24 25 pythonImportsCheck = [ "tree_sitter" ]; 26 27 meta = with lib; { 28 homepage = "https://github.com/tree-sitter/py-tree-sitter"; 29 description = "Python bindings for tree-sitter"; 30 license = licenses.mit; 31 maintainers = with maintainers; [ siraben ]; 32 platforms = platforms.unix; 33 }; 34}