at master 1.2 kB view raw
1{ 2 lib, 3 aioquic, 4 buildPythonPackage, 5 cryptography, 6 fetchPypi, 7 h2, 8 httpcore, 9 httpx, 10 idna, 11 hatchling, 12 pytestCheckHook, 13 trio, 14}: 15 16buildPythonPackage rec { 17 pname = "dnspython"; 18 version = "2.7.0"; 19 pyproject = true; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-zpxDLtoNyRz2GKXO3xpOFCZRGWu80sgOie1akH5c+vE="; 24 }; 25 26 build-system = [ hatchling ]; 27 28 optional-dependencies = { 29 doh = [ 30 httpx 31 h2 32 httpcore 33 ]; 34 idna = [ idna ]; 35 dnssec = [ cryptography ]; 36 trio = [ trio ]; 37 doq = [ aioquic ]; 38 }; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 disabledTests = [ 43 # dns.exception.SyntaxError: protocol not found 44 "test_misc_good_WKS_text" 45 ]; 46 47 # disable network on all builds (including darwin) 48 # see https://github.com/NixOS/nixpkgs/issues/356803 49 preCheck = '' 50 export NO_INTERNET=1 51 ''; 52 53 pythonImportsCheck = [ "dns" ]; 54 55 meta = { 56 description = "DNS toolkit for Python"; 57 homepage = "https://www.dnspython.org"; 58 changelog = "https://github.com/rthalley/dnspython/blob/v${version}/doc/whatsnew.rst"; 59 license = lib.licenses.isc; 60 maintainers = with lib.maintainers; [ gador ]; 61 }; 62}