2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, stdenv
|
2023-03-04 12:14:45 +00:00
|
|
|
, aioquic
|
2021-05-20 23:08:51 +00:00
|
|
|
, buildPythonPackage
|
2023-03-04 12:14:45 +00:00
|
|
|
, cacert
|
|
|
|
, cryptography
|
|
|
|
, curio
|
2021-05-20 23:08:51 +00:00
|
|
|
, fetchPypi
|
2023-03-04 12:14:45 +00:00
|
|
|
, h2
|
|
|
|
, httpx
|
|
|
|
, idna
|
|
|
|
, pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, pythonOlder
|
2023-03-04 12:14:45 +00:00
|
|
|
, requests
|
|
|
|
, requests-toolbelt
|
2022-02-10 20:34:41 +00:00
|
|
|
, setuptools-scm
|
2023-03-04 12:14:45 +00:00
|
|
|
, sniffio
|
|
|
|
, trio
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dnspython";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "2.3.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-Ik4ysD60a+cOEu9tZOC+Ejpk5iGrTAgi/21FDVKlQLk=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
DOH = [
|
|
|
|
httpx
|
|
|
|
h2
|
|
|
|
requests
|
|
|
|
requests-toolbelt
|
|
|
|
];
|
|
|
|
IDNA = [
|
|
|
|
idna
|
|
|
|
];
|
|
|
|
DNSSEC = [
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
trio = [
|
|
|
|
trio
|
|
|
|
];
|
|
|
|
curio = [
|
|
|
|
curio
|
|
|
|
sniffio
|
|
|
|
];
|
|
|
|
DOQ = [
|
|
|
|
aioquic
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
checkInputs = [
|
|
|
|
cacert
|
|
|
|
] ++ passthru.optional-dependencies.DNSSEC;
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# dns.exception.SyntaxError: protocol not found
|
|
|
|
"test_misc_good_WKS_text"
|
2022-04-15 01:41:22 +00:00
|
|
|
# fails if IPv6 isn't available
|
2022-03-30 09:31:56 +00:00
|
|
|
"test_resolver_override"
|
2022-04-15 01:41:22 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-03-04 12:14:45 +00:00
|
|
|
# Tests that run inconsistently on darwin systems
|
2022-04-15 01:41:22 +00:00
|
|
|
# 9 tests fail with: BlockingIOError: [Errno 35] Resource temporarily unavailable
|
|
|
|
"testQueryUDP"
|
|
|
|
# 6 tests fail with: dns.resolver.LifetimeTimeout: The resolution lifetime expired after ...
|
|
|
|
"testResolveCacheHit"
|
|
|
|
"testResolveTCP"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"dns"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A DNS toolkit for Python";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://www.dnspython.org";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/rthalley/dnspython/blob/v${version}/doc/whatsnew.rst";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ isc ];
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ gador ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|