1{ lib 2, buildPythonPackage 3, fetchPypi 4, hypothesis 5, lark 6, libcst 7, parso 8, pytestCheckHook 9, pytest-xdist 10}: 11 12buildPythonPackage rec { 13 pname = "hypothesmith"; 14 version = "0.2.0"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "0fb7b3fd03d76eddd4474b0561e1c2662457593a74cc300fd27e5409cd4d7922"; 19 }; 20 21 patches = [ 22 ./remove-black.patch 23 ]; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "lark-parser" "lark" 28 29 substituteInPlace tox.ini \ 30 --replace "--cov=hypothesmith" "" \ 31 --replace "--cov-branch" "" \ 32 --replace "--cov-report=term-missing:skip-covered" "" \ 33 --replace "--cov-fail-under=100" "" 34 ''; 35 36 propagatedBuildInputs = [ hypothesis lark libcst ]; 37 38 checkInputs = [ parso pytestCheckHook pytest-xdist ]; 39 40 pytestFlagsArray = [ 41 "-v" 42 ]; 43 44 disabledTests = [ 45 # https://github.com/Zac-HD/hypothesmith/issues/21 46 "test_source_code_from_libcst_node_type" 47 ]; 48 49 pythonImportsCheck = [ "hypothesmith" ]; 50 51 meta = with lib; { 52 description = "Hypothesis strategies for generating Python programs, something like CSmith"; 53 homepage = "https://github.com/Zac-HD/hypothesmith"; 54 license = licenses.mpl20; 55 maintainers = with maintainers; [ SuperSandro2000 ]; 56 }; 57}