Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 lib, 5 flit-core, 6 jinja2, 7 pytestCheckHook, 8 railroad-diagrams, 9 pyparsing, 10}: 11 12buildPythonPackage rec { 13 pname = "pyparsing"; 14 version = "3.1.2"; 15 format = "pyproject"; 16 17 src = fetchFromGitHub { 18 owner = "pyparsing"; 19 repo = pname; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-0B8DjO4kLgvt4sYsk8CZI+5icdKy73XE2tWeqVLqO5A="; 22 }; 23 24 nativeBuildInputs = [ flit-core ]; 25 26 # circular dependencies with pytest if enabled by default 27 doCheck = false; 28 nativeCheckInputs = [ 29 jinja2 30 pytestCheckHook 31 railroad-diagrams 32 ]; 33 34 pythonImportsCheck = [ "pyparsing" ]; 35 36 passthru.tests = { 37 check = pyparsing.overridePythonAttrs (_: { 38 doCheck = true; 39 }); 40 }; 41 42 meta = with lib; { 43 homepage = "https://github.com/pyparsing/pyparsing"; 44 description = "Python library for creating PEG parsers"; 45 longDescription = '' 46 The pyparsing module is an alternative approach to creating and executing 47 simple grammars, vs. the traditional lex/yacc approach, or the use of 48 regular expressions. The pyparsing module provides a library of classes 49 that client code uses to construct the grammar directly in Python code. 50 ''; 51 license = licenses.mit; 52 maintainers = with maintainers; [ kamadorueda ]; 53 }; 54}