blob: 49638e8258231e3cabc6423906a9944aae2f0f42 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, hypothesis
, poetry-core
, pydantic
, pytest
, pythonOlder
}:
buildPythonPackage rec {
pname = "hypothesis-auto";
version = "1.1.4";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-XiwvsJ3AmEJRLYBjC7eSNZodM9LARzrUfuI9oL6eMrE=";
};
patches = [
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/timothycrosley/hypothesis-auto/commit/8277b4232617c0433f80e9c2844452b9fae67a65.patch";
hash = "sha256-/0z0nphtQnUBiLYhhzLZT59kQgktSugaBg+ePNxy0qI=";
})
];
postPatch = ''
# https://github.com/timothycrosley/hypothesis-auto/pull/20
substituteInPlace pyproject.toml \
--replace 'pydantic = ">=0.32.2<2.0.0"' 'pydantic = ">=0.32.2, <2.0.0"' \
--replace 'hypothesis = ">=4.36<6.0.0"' 'hypothesis = "*"'
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
pydantic
hypothesis
pytest
];
pythonImportsCheck = [
"hypothesis_auto"
];
meta = with lib; {
description = "Enables fully automatic tests for type annotated functions";
homepage = "https://github.com/timothycrosley/hypothesis-auto/";
license = licenses.mit;
maintainers = with maintainers; [ jonringer ];
};
}
|