about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tree-sitter/default.nix
blob: cd572618a2fd819d667d1d8126c33e1e221799f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, setuptools
, wheel
}:

buildPythonPackage rec {
  pname = "tree-sitter";
  version = "0.20.4";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    pname = "tree_sitter";
    inherit version;
    hash = "sha256-atsSPi8+VjmbvyNZkkYzyILMQO6DRIhSALygki9xO+U=";
  };

  nativeBuildInputs = [
    setuptools
    wheel
  ];

  # PyPI tarball doesn't contains tests and source has additional requirements
  doCheck = false;

  pythonImportsCheck = [
    "tree_sitter"
  ];

  meta = with lib; {
    description = "Python bindings to the Tree-sitter parsing library";
    homepage = "https://github.com/tree-sitter/py-tree-sitter";
    changelog = "https://github.com/tree-sitter/py-tree-sitter/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}