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