2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools-scm,
|
|
|
|
pythonOlder,
|
2021-10-11 16:52:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygmars";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.8.0";
|
|
|
|
format = "setuptools";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nexB";
|
|
|
|
repo = pname;
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-PiH1lV1Vt9VTSOB+jep8FHIdk8qnauxj4nP3CIi/m7o=";
|
2021-10-11 16:52:03 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/nexB/pygmars/pull/9
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace ">=3.6.*" ">=3.6"
|
|
|
|
'';
|
|
|
|
|
2021-10-11 16:52:03 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pygmars" ];
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python lexing and parsing library";
|
|
|
|
homepage = "https://github.com/nexB/pygmars";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/nexB/pygmars/releases/tag/v${version}";
|
2021-10-11 16:52:03 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|