Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / hypothesmith / default.nix
blobd6ce47e3805066d6d2325f976c3f7864377e9226
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , hypothesis
5 , lark
6 , libcst
7 , parso
8 , pytestCheckHook
9 , pytest-xdist
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "hypothesmith";
15   version = "0.3.0";
16   format = "setuptools";
18   disabled = pythonOlder "3.8";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-Uj2gTAY7hzko1sKO8WUGz2S/MXdwOYN+F+a73G4szNs=";
23   };
25   patches = [
26     ./remove-black.patch
27   ];
29   postPatch = ''
30     substituteInPlace setup.py \
31       --replace "lark-parser" "lark"
33     substituteInPlace tox.ini \
34       --replace "--cov=hypothesmith" "" \
35       --replace "--cov-branch" "" \
36       --replace "--cov-report=term-missing:skip-covered" "" \
37       --replace "--cov-fail-under=100" ""
38   '';
40   propagatedBuildInputs = [ hypothesis lark libcst ];
42   nativeCheckInputs = [ parso pytestCheckHook pytest-xdist ];
44   pytestFlagsArray = [
45     "-v"
46   ];
48   disabledTests = [
49     # https://github.com/Zac-HD/hypothesmith/issues/21
50     "test_source_code_from_libcst_node_type"
51   ];
53   disabledTestPaths = [
54     # missing blib2to3
55     "tests/test_syntactic.py"
56   ];
58   pythonImportsCheck = [ "hypothesmith" ];
60   meta = with lib; {
61     description = "Hypothesis strategies for generating Python programs, something like CSmith";
62     homepage = "https://github.com/Zac-HD/hypothesmith";
63     changelog = "https://github.com/Zac-HD/hypothesmith/blob/master/CHANGELOG.md";
64     license = licenses.mpl20;
65     maintainers = with maintainers; [ ];
66   };