summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aioimaplib/default.nix
blob: 5d6205362fa5a860cb629e9d3174d48970af3fab (plain)
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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  imaplib2,
  mock,
  poetry-core,
  pyopenssl,
  pytest-asyncio_0,
  pytestCheckHook,
  pytz,
}:

buildPythonPackage rec {
  pname = "aioimaplib";
  version = "2.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "iroco-co";
    repo = "aioimaplib";
    tag = version;
    hash = "sha256-njzSpKPis033eLoRKXL538ljyMOB43chslio1wodrKU=";
  };

  build-system = [ poetry-core ];

  nativeCheckInputs = [
    imaplib2
    mock
    pyopenssl
    pytest-asyncio_0
    pytestCheckHook
    pytz
  ];

  disabledTests = [
    # TimeoutError
    "test_idle_start__exits_queue_get_without_timeout_error"
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # Comparison to magic strings
    "test_idle_loop"
  ];

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [ "aioimaplib" ];

  meta = {
    description = "Python asyncio IMAP4rev1 client library";
    homepage = "https://github.com/iroco-co/aioimaplib";
    changelog = "https://github.com/iroco-co/aioimaplib/blob/${src.tag}/CHANGES.rst";
    license = lib.licenses.gpl3Plus;
    maintainers = [ lib.maintainers.dotlambda ];
  };
}