Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pygmars / default.nix
blobe186cd99d98d72f791eeb258a3c8b63f2fc5c454
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , setuptools-scm
6 , pythonOlder
7 }:
9 buildPythonPackage rec {
10   pname = "pygmars";
11   version = "0.8.0";
12   format = "setuptools";
14   disabled = pythonOlder "3.6";
16   src = fetchFromGitHub {
17     owner = "nexB";
18     repo = pname;
19     rev = "refs/tags/v${version}";
20     hash = "sha256-PiH1lV1Vt9VTSOB+jep8FHIdk8qnauxj4nP3CIi/m7o=";
21   };
23   SETUPTOOLS_SCM_PRETEND_VERSION = version;
25   postPatch = ''
26     # https://github.com/nexB/pygmars/pull/9
27     substituteInPlace setup.cfg \
28       --replace ">=3.6.*" ">=3.6"
29   '';
31   dontConfigure = true;
33   nativeBuildInputs = [
34     setuptools-scm
35   ];
37   nativeCheckInputs = [
38     pytestCheckHook
39   ];
41   pythonImportsCheck = [
42     "pygmars"
43   ];
45   meta = with lib; {
46     description = "Python lexing and parsing library";
47     homepage = "https://github.com/nexB/pygmars";
48     changelog = "https://github.com/nexB/pygmars/releases/tag/v${version}";
49     license = with licenses; [ asl20 ];
50     maintainers = with maintainers; [ fab ];
51   };