2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cython,
|
|
|
|
pexpect,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-10-30 15:09:59 +00:00
|
|
|
}:
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cpyparsing";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.4.7.2.3.3";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "evhub";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "cpyparsing";
|
2022-10-30 15:09:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Ob3aSxJXM/J1KQ2dwxew9fH3g2WVU2KI6lynDz31r+Y=";
|
2020-11-12 09:05:59 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
2024-04-21 15:54:59 +00:00
|
|
|
setuptools
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
2020-11-12 09:05:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pexpect ];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} tests/cPyparsing_test.py
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cPyparsing" ];
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cython PyParsing implementation";
|
2022-10-30 15:09:59 +00:00
|
|
|
homepage = "https://github.com/evhub/cpyparsing";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/evhub/cpyparsing/releases/tag/v${version}";
|
2020-11-12 09:05:59 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fabianhjr ];
|
|
|
|
};
|
|
|
|
}
|