1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, dnspython
5, idna
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "email-validator";
11 version = "1.2.1";
12
13 src = fetchFromGitHub {
14 owner = "JoshData";
15 repo = "python-${pname}";
16 rev = "refs/tags/v${version}";
17 sha256 = "sha256-Avsqaev3LMoymU06y+u8MMv38ZI2cWk5tc/MkO+9oyA=";
18 };
19
20 propagatedBuildInputs = [
21 dnspython
22 idna
23 ];
24
25 checkInputs = [
26 pytestCheckHook
27 ];
28
29 disabledTests = [
30 # fails with dns.resolver.NoResolverConfiguration due to network sandboxing
31 "test_deliverability_no_records"
32 "test_deliverability_found"
33 "test_deliverability_fails"
34 "test_deliverability_dns_timeout"
35 "test_email_example_reserved_domain"
36 "test_main_single_good_input"
37 "test_main_multi_input"
38 "test_main_input_shim"
39 "test_validate_email__with_caching_resolver"
40 "test_validate_email__with_configured_resolver"
41 ];
42
43 pythonImportsCheck = [
44 "email_validator"
45 ];
46
47 meta = with lib; {
48 description = "A robust email syntax and deliverability validation library";
49 homepage = "https://github.com/JoshData/python-email-validator";
50 license = licenses.cc0;
51 maintainers = with maintainers; [ siddharthist ];
52 };
53}