Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, aioredis
3, aiosmtplib
4, blinker
5, buildPythonPackage
6, email-validator
7, fakeredis
8, fastapi
9, fetchFromGitHub
10, httpx
11, jinja2
12, poetry-core
13, pydantic
14, pytest-asyncio
15, pytestCheckHook
16, python-multipart
17, pythonOlder
18}:
19
20buildPythonPackage rec {
21 pname = "fastapi-mail";
22 version = "1.2.2";
23 format = "pyproject";
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchFromGitHub {
28 owner = "sabuhish";
29 repo = pname;
30 rev = "refs/tags/${version}";
31 hash = "sha256-+i/p4KVppsOkj2TEoZKmjrlnkhk2wxPg2enh2QCXiQI=";
32 };
33
34 postPatch = ''
35 substituteInPlace pyproject.toml \
36 --replace 'starlette = "^0.21.0"' 'starlette = "*"'
37 '';
38
39 nativeBuildInputs = [
40 poetry-core
41 ];
42
43 propagatedBuildInputs = [
44 aioredis
45 aiosmtplib
46 blinker
47 email-validator
48 fakeredis
49 fastapi
50 httpx
51 jinja2
52 pydantic
53 python-multipart
54 ];
55
56 checkInputs = [
57 pytest-asyncio
58 pytestCheckHook
59 ];
60
61 disabledTests = [
62 # Tests require access to /etc/resolv.conf
63 "test_default_checker"
64 "test_redis_checker"
65 ];
66
67 pythonImportsCheck = [
68 "fastapi_mail"
69 ];
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}