xwax: init at version 1.9 (#377421)
[NixPkgs.git] / pkgs / development / python2-modules / pyparsing / default.nix
blob52566d07ce5e97d0c3c5a9ffe016b332e64b8389
2   buildPythonPackage,
3   fetchFromGitHub,
4   lib,
6   # since this is a dependency of pytest, we need to avoid
7   # circular dependencies
8   jinja2,
9   railroad-diagrams,
12 let
13   pyparsing = buildPythonPackage rec {
14     pname = "pyparsing";
15     version = "2.4.7";
17     src = fetchFromGitHub {
18       owner = "pyparsing";
19       repo = pname;
20       rev = "pyparsing_${version}";
21       sha256 = "14pfy80q2flgzjcx8jkracvnxxnr59kjzp3kdm5nh232gk1v6g6h";
22     };
24     # circular dependencies if enabled by default
25     doCheck = false;
26     nativeCheckInputs = [
27       jinja2
28       railroad-diagrams
29     ];
31     checkPhase = ''
32       python -m unittest
33     '';
35     passthru.tests = {
36       check = pyparsing.overridePythonAttrs (_: {
37         doCheck = true;
38       });
39     };
41     meta = with lib; {
42       homepage = "https://github.com/pyparsing/pyparsing";
43       description = "Alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions";
44       license = licenses.mit;
45     };
46   };
48 pyparsing