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