1{ lib
2, buildPythonPackage
3, colorama
4, fetchFromGitHub
5, pytest-mypy
6, pytestCheckHook
7, pythonOlder
8, regex
9}:
10
11buildPythonPackage rec {
12 pname = "tatsu";
13 version = "5.8.3";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.10";
17
18 src = fetchFromGitHub {
19 owner = "neogeny";
20 repo = "TatSu";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-cKEMRbH/xNtYM0lmNVazv3i0Q1tmVrVPrB6F2s02Sro=";
23 };
24
25 propagatedBuildInputs = [
26 colorama
27 regex
28 ];
29
30 nativeCheckInputs = [
31 pytest-mypy
32 pytestCheckHook
33 ];
34
35 pythonImportsCheck = [
36 "tatsu"
37 ];
38
39 meta = with lib; {
40 description = "Generates Python parsers from grammars in a variation of EBNF";
41 longDescription = ''
42 TatSu (the successor to Grako) is a tool that takes grammars in a
43 variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers in
44 Python.
45 '';
46 homepage = "https://tatsu.readthedocs.io/";
47 changelog = "https://github.com/neogeny/TatSu/releases/tag/v${version}";
48 license = licenses.bsd2;
49 maintainers = with maintainers; [ ];
50 };
51}