Merge pull request #175984 from fabaff/fastapi-mail
python310Packages.fastapi-mail: init at 1.0.8, python310Packages.aiosmtplib: init at 1.1.6
This commit is contained in:
commit
48aef08805
3 changed files with 133 additions and 0 deletions
57
pkgs/development/python-modules/aiosmtplib/default.nix
Normal file
57
pkgs/development/python-modules/aiosmtplib/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, aiosmtpd
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, hypothesis
|
||||
, poetry-core
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiosmtplib";
|
||||
version = "1.1.6";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cole";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-bo+u3I+ZX95UYkEam2TB6d6rvbYKa5Qu/9oNX5le478=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
aiosmtpd
|
||||
hypothesis
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Switch to poetry-core, https://github.com/cole/aiosmtplib/pull/183
|
||||
(fetchpatch {
|
||||
name = "switch-to-poetry-core.patch";
|
||||
url = "https://github.com/cole/aiosmtplib/commit/3aba1c132d9454e05d4281f4c8aa618b4e1b783d.patch";
|
||||
hash = "sha256-KlA46gD6swfJ/3OLO3xWZWa66Gx1/izmUMQ60PQy0po=";
|
||||
})
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aiosmtplib"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Module which provides a SMTP client";
|
||||
homepage = "https://github.com/cole/aiosmtplib";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
72
pkgs/development/python-modules/fastapi-mail/default.nix
Normal file
72
pkgs/development/python-modules/fastapi-mail/default.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{ lib
|
||||
, aioredis
|
||||
, aiosmtplib
|
||||
, blinker
|
||||
, buildPythonPackage
|
||||
, email_validator
|
||||
, fakeredis
|
||||
, fastapi
|
||||
, fetchFromGitHub
|
||||
, httpx
|
||||
, jinja2
|
||||
, poetry-core
|
||||
, pydantic
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, python-multipart
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fastapi-mail";
|
||||
version = "1.0.8";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sabuhish";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-PkA7qkdDUd7mrtvb6IbCzFRq6X0M3iKY+FKuNConJ5A=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aioredis
|
||||
aiosmtplib
|
||||
blinker
|
||||
email_validator
|
||||
fakeredis
|
||||
fastapi
|
||||
httpx
|
||||
jinja2
|
||||
pydantic
|
||||
python-multipart
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
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";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -411,6 +411,8 @@ in {
|
|||
|
||||
aiosmtpd = callPackage ../development/python-modules/aiosmtpd { };
|
||||
|
||||
aiosmtplib = callPackage ../development/python-modules/aiosmtplib { };
|
||||
|
||||
aiosqlite = callPackage ../development/python-modules/aiosqlite { };
|
||||
|
||||
aiosteamist = callPackage ../development/python-modules/aiosteamist { };
|
||||
|
@ -2915,6 +2917,8 @@ in {
|
|||
|
||||
fastapi = callPackage ../development/python-modules/fastapi { };
|
||||
|
||||
fastapi-mail = callPackage ../development/python-modules/fastapi-mail { };
|
||||
|
||||
fastavro = callPackage ../development/python-modules/fastavro { };
|
||||
|
||||
fastbencode = callPackage ../development/python-modules/fastbencode { };
|
||||
|
|
Loading…
Reference in a new issue