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.5.0";
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-v8cf4GlYAdl5+iD7hJHW+FuDN/I/VygWaaZLEotDNCU=";
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 "test_local_hostname_resolving"
68 ];
69
70 pythonImportsCheck = [ "fastapi_mail" ];
71
72 meta = with lib; {
73 description = "Module for sending emails and attachments";
74 homepage = "https://github.com/sabuhish/fastapi-mail";
75 changelog = "https://github.com/sabuhish/fastapi-mail/releases/tag/${version}";
76 license = licenses.mit;
77 maintainers = with maintainers; [ fab ];
78 };
79}