2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2021-03-23 19:22:30 +00:00
|
|
|
, colorama, regex
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-runner, pytestCheckHook, pytest-mypy
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-03-23 19:22:30 +00:00
|
|
|
pname = "tatsu";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "5.8.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
# upstream only supports 3.10+
|
|
|
|
disabled = pythonOlder "3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "neogeny";
|
2021-03-23 19:22:30 +00:00
|
|
|
repo = "TatSu";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-spTIHiyspjrIV8DKR7YNpNTNO9SlcLOROuABhmu3ckA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
nativeBuildInputs = [ pytest-runner ];
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [ colorama regex ];
|
|
|
|
checkInputs = [ pytestCheckHook pytest-mypy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
pythonImportsCheck = [ "tatsu" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generates Python parsers from grammars in a variation of EBNF";
|
|
|
|
longDescription = ''
|
|
|
|
TatSu (the successor to Grako) is a tool that takes grammars in a
|
|
|
|
variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers in
|
|
|
|
Python.
|
|
|
|
'';
|
|
|
|
homepage = "https://tatsu.readthedocs.io/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|