at master 1.5 kB view raw
1{ 2 lib, 3 atpublic, 4 attrs, 5 buildPythonPackage, 6 fetchFromGitHub, 7 pytest-mock, 8 pytestCheckHook, 9 pythonOlder, 10 setuptools, 11 typing-extensions, 12 13 # for passthru.tests 14 django, 15 aiosmtplib, 16}: 17 18buildPythonPackage rec { 19 pname = "aiosmtpd"; 20 version = "1.4.6"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.6"; 24 25 src = fetchFromGitHub { 26 owner = "aio-libs"; 27 repo = "aiosmtpd"; 28 tag = "v${version}"; 29 hash = "sha256-Ih/xbWM9O/fFQiZezydlPlIr36fLRc2lLgdfxD5Jviw="; 30 }; 31 32 nativeBuildInputs = [ setuptools ]; 33 34 propagatedBuildInputs = [ 35 atpublic 36 attrs 37 ] 38 ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; 39 40 nativeCheckInputs = [ 41 pytest-mock 42 pytestCheckHook 43 ]; 44 45 # Fixes for Python 3.10 can't be applied easily, https://github.com/aio-libs/aiosmtpd/pull/294 46 doCheck = pythonOlder "3.10"; 47 48 disabledTests = [ 49 # Requires git 50 "test_ge_master" 51 # Seems to be a sandbox issue 52 "test_byclient" 53 ]; 54 55 pythonImportsCheck = [ "aiosmtpd" ]; 56 57 passthru.tests = { 58 inherit django aiosmtplib; 59 }; 60 61 meta = with lib; { 62 description = "Asyncio based SMTP server"; 63 mainProgram = "aiosmtpd"; 64 homepage = "https://aiosmtpd.readthedocs.io/"; 65 changelog = "https://github.com/aio-libs/aiosmtpd/releases/tag/v${version}"; 66 longDescription = '' 67 This is a server for SMTP and related protocols, similar in utility to the 68 standard library's smtpd.py module. 69 ''; 70 license = licenses.asl20; 71 maintainers = with maintainers; [ eadwu ]; 72 }; 73}