1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
2, colorama, regex
3, pytest-runner, pytestCheckHook, pytest-mypy
4}:
5
6buildPythonPackage rec {
7 pname = "tatsu";
8 version = "5.6.1";
9
10 src = fetchFromGitHub {
11 owner = "neogeny";
12 repo = "TatSu";
13 rev = "v${version}";
14 sha256 = "149ra1lwax5m1svlv4dwjfqw00lc5vwyfj6zw2v0ammmfm1b94x9";
15 };
16
17 disabled = pythonOlder "3.8";
18
19 nativeBuildInputs = [ pytest-runner ];
20 propagatedBuildInputs = [ colorama regex ];
21 checkInputs = [ pytestCheckHook pytest-mypy ];
22
23 pythonImportsCheck = [ "tatsu" ];
24
25 meta = with lib; {
26 description = "Generates Python parsers from grammars in a variation of EBNF";
27 longDescription = ''
28 TatSu (the successor to Grako) is a tool that takes grammars in a
29 variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers in
30 Python.
31 '';
32 homepage = "https://tatsu.readthedocs.io/";
33 license = licenses.bsd2;
34 maintainers = with maintainers; [ primeos ];
35 };
36
37}