Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 hypothesis, 6 lark, 7 libcst, 8 parso, 9 pytestCheckHook, 10 pytest-xdist, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "hypothesmith"; 16 version = "0.3.3"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-lsFIAtbI6F2JdSZBdoeNtUso0u2SH9v+3C5rjOPIFxY="; 24 }; 25 26 patches = [ ./remove-black.patch ]; 27 28 postPatch = '' 29 substituteInPlace setup.py \ 30 --replace "lark-parser" "lark" 31 32 substituteInPlace tox.ini \ 33 --replace "--cov=hypothesmith" "" \ 34 --replace "--cov-branch" "" \ 35 --replace "--cov-report=term-missing:skip-covered" "" \ 36 --replace "--cov-fail-under=100" "" 37 ''; 38 39 propagatedBuildInputs = [ 40 hypothesis 41 lark 42 libcst 43 ]; 44 45 nativeCheckInputs = [ 46 parso 47 pytestCheckHook 48 pytest-xdist 49 ]; 50 51 pytestFlagsArray = [ "-v" ]; 52 53 disabledTests = [ 54 # https://github.com/Zac-HD/hypothesmith/issues/21 55 "test_source_code_from_libcst_node_type" 56 ]; 57 58 disabledTestPaths = [ 59 # missing blib2to3 60 "tests/test_syntactic.py" 61 ]; 62 63 pythonImportsCheck = [ "hypothesmith" ]; 64 65 meta = with lib; { 66 description = "Hypothesis strategies for generating Python programs, something like CSmith"; 67 homepage = "https://github.com/Zac-HD/hypothesmith"; 68 changelog = "https://github.com/Zac-HD/hypothesmith/blob/master/CHANGELOG.md"; 69 license = licenses.mpl20; 70 maintainers = [ ]; 71 }; 72}