1{ 2 lib, 3 aioredis, 4 aiosmtplib, 5 blinker, 6 buildPythonPackage, 7 email-validator, 8 fakeredis, 9 fastapi, 10 fetchFromGitHub, 11 httpx, 12 jinja2, 13 poetry-core, 14 pydantic, 15 pydantic-settings, 16 pytest-asyncio, 17 pytestCheckHook, 18 python-multipart, 19 pythonOlder, 20}: 21 22buildPythonPackage rec { 23 pname = "fastapi-mail"; 24 version = "1.4.1"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.8"; 28 29 src = fetchFromGitHub { 30 owner = "sabuhish"; 31 repo = "fastapi-mail"; 32 rev = "refs/tags/${version}"; 33 hash = "sha256-2iTZqZIxlt1GKhElasTcnys18UbNNDwHoZziHBOIGBo="; 34 }; 35 36 postPatch = '' 37 substituteInPlace pyproject.toml \ 38 --replace 'version = "1.2.5"' 'version = "${version}"' \ 39 --replace 'aiosmtplib = "^2.0"' 'aiosmtplib = "*"' \ 40 --replace 'pydantic = "^2.0"' 'pydantic = "*"' \ 41 ''; 42 43 nativeBuildInputs = [ poetry-core ]; 44 45 propagatedBuildInputs = [ 46 aioredis 47 aiosmtplib 48 blinker 49 email-validator 50 fakeredis 51 fastapi 52 httpx 53 jinja2 54 pydantic 55 pydantic-settings 56 python-multipart 57 ]; 58 59 nativeCheckInputs = [ 60 pytest-asyncio 61 pytestCheckHook 62 ]; 63 64 disabledTests = [ 65 # Tests require access to /etc/resolv.conf 66 "test_default_checker" 67 "test_redis_checker" 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 = with licenses; [ mit ]; 77 maintainers = with maintainers; [ fab ]; 78 }; 79}