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