2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aioredis,
|
|
|
|
aiosmtplib,
|
|
|
|
blinker,
|
|
|
|
buildPythonPackage,
|
|
|
|
email-validator,
|
|
|
|
fakeredis,
|
|
|
|
fastapi,
|
|
|
|
fetchFromGitHub,
|
|
|
|
httpx,
|
|
|
|
jinja2,
|
|
|
|
poetry-core,
|
|
|
|
pydantic,
|
|
|
|
pydantic-settings,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-multipart,
|
|
|
|
pythonOlder,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastapi-mail";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.4.1";
|
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sabuhish";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "fastapi-mail";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-2iTZqZIxlt1GKhElasTcnys18UbNNDwHoZziHBOIGBo=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-07-15 17:15:38 +00:00
|
|
|
--replace 'version = "1.2.5"' 'version = "${version}"' \
|
2023-01-11 07:51:40 +00:00
|
|
|
--replace 'aiosmtplib = "^2.0"' 'aiosmtplib = "*"' \
|
2024-01-13 08:15:51 +00:00
|
|
|
--replace 'pydantic = "^2.0"' 'pydantic = "*"' \
|
2022-06-26 10:26:21 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
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
|
2024-01-13 08:15:51 +00:00
|
|
|
pydantic-settings
|
2022-06-16 17:23:12 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "fastapi_mail" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|