1{ lib
2, beautifulsoup4
3, boto3
4, buildPythonPackage
5, cryptography
6, dnspython
7, fetchFromGitHub
8, importlib-metadata
9, localzone
10, oci
11, poetry-core
12, pyotp
13, pytest-vcr
14, pytestCheckHook
15, pythonOlder
16, pyyaml
17, requests
18, softlayer
19, tldextract
20, zeep
21}:
22
23buildPythonPackage rec {
24 pname = "dns_lexicon";
25 version = "3.16.1";
26 pyproject = true;
27
28 disabled = pythonOlder "3.8";
29
30 src = fetchFromGitHub {
31 owner = "Analogj";
32 repo = "lexicon";
33 rev = "refs/tags/v${version}";
34 hash = "sha256-79/zz0TOCpx26TEo6gi9JDBQeVW2azWnxAjWr/FGRLA=";
35 };
36
37 nativeBuildInputs = [
38 poetry-core
39 ];
40
41 propagatedBuildInputs = [
42 beautifulsoup4
43 cryptography
44 pyotp
45 pyyaml
46 requests
47 tldextract
48 ] ++ lib.optionals (pythonOlder "3.10") [
49 importlib-metadata
50 ];
51
52 passthru.optional-dependencies = {
53 route53 = [
54 boto3
55 ];
56 localzone = [
57 localzone
58 ];
59 softlayer = [
60 softlayer
61 ];
62 ddns = [
63 dnspython
64 ];
65 duckdns = [
66 dnspython
67 ];
68 oci = [
69 oci
70 ];
71 full = [
72 boto3
73 dnspython
74 localzone
75 oci
76 softlayer
77 zeep
78 ];
79 };
80
81 nativeCheckInputs = [
82 pytestCheckHook
83 pytest-vcr
84 ] ++ passthru.optional-dependencies.full;
85
86 pytestFlagsArray = [
87 "tests/"
88 ];
89
90 disabledTestPaths = [
91 # Needs network access
92 "tests/providers/test_auto.py"
93 # Needs network access (and an API token)
94 "tests/providers/test_namecheap.py"
95 ];
96
97 disabledTests = [
98 # Tests want to download Public Suffix List
99 "test_client_legacy_init"
100 "test_client_basic_init"
101 "test_client_init"
102 "test_client_parse_env"
103 "test_missing"
104 "action_is_correctly"
105 ];
106
107 pythonImportsCheck = [
108 "lexicon"
109 ];
110
111 meta = with lib; {
112 description = "Manipulate DNS records on various DNS providers in a standardized way";
113 homepage = "https://github.com/AnalogJ/lexicon";
114 changelog = "https://github.com/AnalogJ/lexicon/blob/v${version}/CHANGELOG.md";
115 license = with licenses; [ mit ];
116 maintainers = with maintainers; [ aviallon ];
117 };
118}