2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
atpublic,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
django,
|
|
|
|
aiosmtplib,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiosmtpd";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.4.6";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aio-libs";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "aiosmtpd";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-Ih/xbWM9O/fFQiZezydlPlIr36fLRc2lLgdfxD5Jviw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
atpublic
|
|
|
|
attrs
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
# Fixes for Python 3.10 can't be applied easily, https://github.com/aio-libs/aiosmtpd/pull/294
|
|
|
|
doCheck = pythonOlder "3.10";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Requires git
|
|
|
|
"test_ge_master"
|
|
|
|
# Seems to be a sandbox issue
|
|
|
|
"test_byclient"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiosmtpd" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit django aiosmtplib;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Asyncio based SMTP server";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "aiosmtpd";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://aiosmtpd.readthedocs.io/";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/aio-libs/aiosmtpd/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
This is a server for SMTP and related protocols, similar in utility to the
|
2021-12-06 16:07:01 +00:00
|
|
|
standard library's smtpd.py module.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|