5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
41 lines
806 B
Nix
41 lines
806 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools
|
|
, wheel
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "tree-sitter";
|
|
version = "0.20.2";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "tree_sitter";
|
|
inherit version;
|
|
hash = "sha256-CmwGq6pV3hdCQaR2tTYXO7ooJB0uqF0ZjTOqi/AJ8Cg=";
|
|
};
|
|
|
|
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";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|