1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonAtLeast,
6 setuptools,
7 pytest,
8 portpicker,
9 cryptography,
10 aiosmtpd,
11 pytestCheckHook,
12 pytest-asyncio,
13}:
14
15buildPythonPackage rec {
16 pname = "smtpdfix";
17 version = "0.5.2";
18 format = "pyproject";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-5NGs6Q83EqGRJ+2IdOaXqGFIwfSNKy2wwHIJaOjj7JU=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 propagatedBuildInputs = [
28 aiosmtpd
29 cryptography
30 portpicker
31 pytest
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 pytest-asyncio
37 ];
38
39 disabledTests = lib.optionals (pythonAtLeast "3.12") [
40 # https://github.com/bebleo/smtpdfix/issues/335
41 "test_missing_certs"
42 ];
43
44 meta = with lib; {
45 description = "SMTP server for use as a pytest fixture for testing";
46 homepage = "https://github.com/bebleo/smtpdfix";
47 changelog = "https://github.com/bebleo/smtpdfix/releases/tag/v${version}";
48 license = licenses.mit;
49 teams = [ teams.wdz ];
50 };
51}