forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
100 lines (84 loc) · 1.71 KB
/
default.nix
File metadata and controls
100 lines (84 loc) · 1.71 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{
lib,
buildPythonPackage,
fetchPypi,
# build-system
hatchling,
# dependencies
decorator,
h11,
puremagic,
urllib3,
# optional-dependencies
xxhash,
pook,
# tests
aiohttp,
asgiref,
fastapi,
gevent,
httpx,
psutil,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
redis,
redisTestHook,
requests,
sure,
}:
buildPythonPackage rec {
pname = "mocket";
version = "3.13.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-Gms2WOZowrwf6EQt94QLW3cxhUT1wVeplSd2sX6/8qI=";
};
build-system = [ hatchling ];
dependencies = [
decorator
h11
puremagic
urllib3
];
optional-dependencies = {
pook = [ pook ];
speedups = [ xxhash ];
};
nativeCheckInputs = [
aiohttp
asgiref
fastapi
gevent
httpx
psutil
pytest-asyncio
pytest-cov-stub
pytestCheckHook
redis
redisTestHook
requests
sure
] ++ lib.flatten (lib.attrValues optional-dependencies);
# Skip http tests, they require network access
env.SKIP_TRUE_HTTP = true;
_darwinAllowLocalNetworking = true;
disabledTests = [
# tests that require network access (like DNS lookups)
"test_truesendall_with_dump_from_recording"
"test_aiohttp"
"test_asyncio_record_replay"
"test_gethostbyname"
# httpx read failure
"test_no_dangling_fds"
];
pythonImportsCheck = [ "mocket" ];
meta = with lib; {
changelog = "https://github.com/mindflayer/python-mocket/releases/tag/${version}";
description = "Socket mock framework for all kinds of sockets including web-clients";
homepage = "https://github.com/mindflayer/python-mocket";
license = licenses.bsd3;
maintainers = [ ];
};
}