1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 imaplib2,
7 mock,
8 poetry-core,
9 pyopenssl,
10 pytest-asyncio,
11 pytestCheckHook,
12 pytz,
13}:
14
15buildPythonPackage rec {
16 pname = "aioimaplib";
17 version = "2.0.1";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "iroco-co";
22 repo = "aioimaplib";
23 tag = version;
24 hash = "sha256-njzSpKPis033eLoRKXL538ljyMOB43chslio1wodrKU=";
25 };
26
27 build-system = [ poetry-core ];
28
29 nativeCheckInputs = [
30 imaplib2
31 mock
32 pyopenssl
33 pytest-asyncio
34 pytestCheckHook
35 pytz
36 ];
37
38 disabledTests =
39 [
40 # TimeoutError
41 "test_idle_start__exits_queue_get_without_timeout_error"
42 ]
43 ++ lib.optionals stdenv.hostPlatform.isDarwin [
44 # Comparison to magic strings
45 "test_idle_loop"
46 ];
47
48 __darwinAllowLocalNetworking = true;
49
50 pythonImportsCheck = [ "aioimaplib" ];
51
52 meta = {
53 description = "Python asyncio IMAP4rev1 client library";
54 homepage = "https://github.com/iroco-co/aioimaplib";
55 changelog = "https://github.com/iroco-co/aioimaplib/blob/${src.tag}/CHANGES.rst";
56 license = lib.licenses.gpl3Plus;
57 maintainers = [ lib.maintainers.dotlambda ];
58 };
59}