2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2021-03-22 12:51:56 +00:00
|
|
|
, colorama, regex
|
|
|
|
, pytestrunner, pytestCheckHook, pytest-mypy
|
2019-10-27 16:36:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-03-22 12:51:56 +00:00
|
|
|
pname = "tatsu";
|
2021-03-23 12:18:23 +00:00
|
|
|
version = "5.6.1";
|
2019-10-27 16:36:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "neogeny";
|
2021-03-22 12:51:56 +00:00
|
|
|
repo = "TatSu";
|
2019-10-27 16:36:28 +00:00
|
|
|
rev = "v${version}";
|
2021-03-23 12:18:23 +00:00
|
|
|
sha256 = "149ra1lwax5m1svlv4dwjfqw00lc5vwyfj6zw2v0ammmfm1b94x9";
|
2019-10-27 16:36:28 +00:00
|
|
|
};
|
|
|
|
|
2021-03-18 12:44:55 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-01-27 18:02:50 +00:00
|
|
|
|
2019-10-27 16:36:28 +00:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2021-03-22 12:51:56 +00:00
|
|
|
propagatedBuildInputs = [ colorama regex ];
|
|
|
|
checkInputs = [ pytestCheckHook pytest-mypy ];
|
2019-10-27 16:36:28 +00:00
|
|
|
|
2021-03-22 12:51:56 +00:00
|
|
|
pythonImportsCheck = [ "tatsu" ];
|
2019-10-27 16:36:28 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-27 16:36:28 +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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|