Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / tree-sitter / default.nix
blobd098859f5108b4bb4b34473bc9cff04639d6637e
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , pytestCheckHook
5 , pythonOlder
6 , setuptools
7 , wheel
8 }:
10 buildPythonPackage rec {
11   pname = "tree-sitter";
12   version = "0.20.2";
13   format = "pyproject";
15   disabled = pythonOlder "3.7";
17   src = fetchPypi {
18     pname = "tree_sitter";
19     inherit version;
20     hash = "sha256-CmwGq6pV3hdCQaR2tTYXO7ooJB0uqF0ZjTOqi/AJ8Cg=";
21   };
23   nativeBuildInputs = [
24     setuptools
25     wheel
26   ];
28   # PyPI tarball doesn't contains tests and source has additional requirements
29   doCheck = false;
31   pythonImportsCheck = [
32     "tree_sitter"
33   ];
35   meta = with lib; {
36     description = "Python bindings to the Tree-sitter parsing library";
37     homepage = "https://github.com/tree-sitter/py-tree-sitter";
38     license = licenses.mit;
39     maintainers = with maintainers; [ fab ];
40   };