Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.3"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-vc6EXsmE5uP+0h5l0ugrjrxt5cpeuTZJ39dgNMWQakY="; 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 nativeCheckInputs = [ 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 disabledTestPaths = [ 50 # missing blib2to3 51 "tests/test_syntactic.py" 52 ]; 53 54 pythonImportsCheck = [ "hypothesmith" ]; 55 56 meta = with lib; { 57 description = "Hypothesis strategies for generating Python programs, something like CSmith"; 58 homepage = "https://github.com/Zac-HD/hypothesmith"; 59 license = licenses.mpl20; 60 maintainers = with maintainers; [ SuperSandro2000 ]; 61 }; 62}