1{ lib 2, buildPythonPackage 3, fetchPypi 4, regex 5, pytestCheckHook 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "parsimonious"; 11 version = "0.10.0"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-goFgDaGA7IrjVCekq097gr/sHj0eUvgMtg6oK5USUBw="; 19 }; 20 21 propagatedBuildInputs = [ 22 regex 23 ]; 24 25 nativeCheckInputs = [ 26 pytestCheckHook 27 ]; 28 29 disabledTests = [ 30 # test_benchmarks.py tests are actually benchmarks and may fail due to 31 # something being unexpectedly slow on a heavily loaded build machine 32 "test_lists_vs_dicts" 33 "test_call_vs_inline" 34 "test_startswith_vs_regex" 35 ]; 36 37 postPatch = '' 38 substituteInPlace setup.py \ 39 --replace "regex>=2022.3.15" "regex" 40 ''; 41 42 pythonImportsCheck = [ 43 "parsimonious" 44 "parsimonious.grammar" 45 "parsimonious.nodes" 46 ]; 47 48 meta = with lib; { 49 description = "Arbitrary-lookahead parser"; 50 homepage = "https://github.com/erikrose/parsimonious"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ ]; 53 }; 54}