2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, aioredis
|
|
|
|
, aiosmtplib
|
|
|
|
, blinker
|
|
|
|
, buildPythonPackage
|
2022-06-26 10:26:21 +00:00
|
|
|
, email-validator
|
2022-06-16 17:23:12 +00:00
|
|
|
, fakeredis
|
|
|
|
, fastapi
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
|
|
|
, jinja2
|
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-multipart
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastapi-mail";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "1.2.7";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sabuhish";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-zZjC8tNM6rjpgbMw4MHPVr1UOEhjlgCFcZMvSDmKfzs=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-01-11 07:51:40 +00:00
|
|
|
--replace 'version = "1.2.2"' 'version = "${version}"' \
|
|
|
|
--replace 'aiosmtplib = "^2.0"' 'aiosmtplib = "*"' \
|
|
|
|
--replace 'pydantic = "^1.8"' 'pydantic = "*"' \
|
|
|
|
--replace 'starlette = "^0.22.0"' 'starlette = "*"' \
|
|
|
|
--replace 'black = "^22.12.0"' ""
|
2022-06-26 10:26:21 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aioredis
|
|
|
|
aiosmtplib
|
|
|
|
blinker
|
2022-06-26 10:26:21 +00:00
|
|
|
email-validator
|
2022-06-16 17:23:12 +00:00
|
|
|
fakeredis
|
|
|
|
fastapi
|
|
|
|
httpx
|
|
|
|
jinja2
|
|
|
|
pydantic
|
|
|
|
python-multipart
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require access to /etc/resolv.conf
|
|
|
|
"test_default_checker"
|
|
|
|
"test_redis_checker"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastapi_mail"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for sending emails and attachments";
|
|
|
|
homepage = "https://github.com/sabuhish/fastapi-mail";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/sabuhish/fastapi-mail/releases/tag/${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|