1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 setuptools-scm,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "pygmars";
12 version = "0.8.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "nexB";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 hash = "sha256-PiH1lV1Vt9VTSOB+jep8FHIdk8qnauxj4nP3CIi/m7o=";
22 };
23
24 postPatch = ''
25 # https://github.com/nexB/pygmars/pull/9
26 substituteInPlace setup.cfg \
27 --replace ">=3.6.*" ">=3.6"
28 '';
29
30 dontConfigure = true;
31
32 nativeBuildInputs = [ setuptools-scm ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "pygmars" ];
37
38 meta = with lib; {
39 description = "Python lexing and parsing library";
40 homepage = "https://github.com/nexB/pygmars";
41 changelog = "https://github.com/nexB/pygmars/releases/tag/v${version}";
42 license = with licenses; [ asl20 ];
43 maintainers = with maintainers; [ fab ];
44 };
45}