2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
flit-core,
|
|
|
|
jinja2,
|
|
|
|
pytestCheckHook,
|
|
|
|
railroad-diagrams,
|
|
|
|
pyparsing,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyparsing";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.1.2";
|
2022-12-28 21:21:41 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyparsing";
|
|
|
|
repo = pname;
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-0B8DjO4kLgvt4sYsk8CZI+5icdKy73XE2tWeqVLqO5A=";
|
2022-12-28 21:21:41 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
# circular dependencies with pytest if enabled by default
|
|
|
|
doCheck = false;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-28 21:21:41 +00:00
|
|
|
jinja2
|
|
|
|
pytestCheckHook
|
|
|
|
railroad-diagrams
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pythonImportsCheck = [ "pyparsing" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.tests = {
|
2024-06-05 15:53:02 +00:00
|
|
|
check = pyparsing.overridePythonAttrs (_: {
|
|
|
|
doCheck = true;
|
|
|
|
});
|
2022-12-28 21:21:41 +00:00
|
|
|
};
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/pyparsing/pyparsing";
|
|
|
|
description = "Python library for creating PEG parsers";
|
|
|
|
longDescription = ''
|
|
|
|
The pyparsing module is an alternative approach to creating and executing
|
|
|
|
simple grammars, vs. the traditional lex/yacc approach, or the use of
|
|
|
|
regular expressions. The pyparsing module provides a library of classes
|
|
|
|
that client code uses to construct the grammar directly in Python code.
|
2024-06-05 15:53:02 +00:00
|
|
|
'';
|
2022-12-28 21:21:41 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kamadorueda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-12-28 21:21:41 +00:00
|
|
|
}
|