1{
2 lib,
3 aiosmtplib,
4 blinker,
5 buildPythonPackage,
6 email-validator,
7 fakeredis,
8 fetchFromGitHub,
9 httpx,
10 jinja2,
11 poetry-core,
12 pydantic-settings,
13 pydantic,
14 pytest-asyncio,
15 pytestCheckHook,
16 pythonOlder,
17 redis,
18 starlette,
19}:
20
21buildPythonPackage rec {
22 pname = "fastapi-mail";
23 version = "1.4.2";
24 pyproject = true;
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchFromGitHub {
29 owner = "sabuhish";
30 repo = "fastapi-mail";
31 tag = version;
32 hash = "sha256-QypW7yE5jBkS1Q4XPIOktWnCmCXGoUzZF/SdWmFsPX8=";
33 };
34
35 pythonRelaxDeps = [
36 "aiosmtplib"
37 "pydantic"
38 ];
39
40 build-system = [ poetry-core ];
41
42 dependencies = [
43 aiosmtplib
44 blinker
45 email-validator
46 fakeredis
47 jinja2
48 pydantic
49 pydantic-settings
50 starlette
51 ];
52
53 optional-dependencies = {
54 httpx = [ httpx ];
55 redis = [ redis ];
56 };
57
58 nativeCheckInputs = [
59 pytest-asyncio
60 pytestCheckHook
61 ];
62
63 disabledTests = [
64 # Tests require access to /etc/resolv.conf
65 "test_default_checker"
66 "test_redis_checker"
67 ];
68
69 pythonImportsCheck = [ "fastapi_mail" ];
70
71 meta = with lib; {
72 description = "Module for sending emails and attachments";
73 homepage = "https://github.com/sabuhish/fastapi-mail";
74 changelog = "https://github.com/sabuhish/fastapi-mail/releases/tag/${version}";
75 license = with licenses; [ mit ];
76 maintainers = with maintainers; [ fab ];
77 };
78}