summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/smtpdfix/default.nix
blob: e808c507d9a34f7f9758e838bf680d2a33dce9d5 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  pythonAtLeast,
  setuptools,
  pytest,
  portpicker,
  cryptography,
  aiosmtpd,
  pytestCheckHook,
  pytest-asyncio,
}:

buildPythonPackage rec {
  pname = "smtpdfix";
  version = "0.5.3";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-LqSbIv4ITJy5KlLlboNRx1PJhe7PcTx38IUW7F4uf9A=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    aiosmtpd
    cryptography
    portpicker
    pytest
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  disabledTests = lib.optionals (pythonAtLeast "3.12") [
    # https://github.com/bebleo/smtpdfix/issues/335
    "test_missing_certs"
  ];

  meta = {
    description = "SMTP server for use as a pytest fixture for testing";
    homepage = "https://github.com/bebleo/smtpdfix";
    changelog = "https://github.com/bebleo/smtpdfix/releases/tag/v${version}";
    license = lib.licenses.mit;
  };
}