16 buildPythonPackage rec {
21 disabled = pythonOlder "3.7";
23 src = fetchFromGitHub {
26 rev = "refs/tags/v${version}";
27 hash = "sha256-PY3SUPELcCvS/o5kfko4OD1BlTc9DnyqfkSFuzcAOSY=";
30 __darwinAllowLocalNetworking = true;
32 pythonRelaxDeps = [ "dnspython" ];
34 build-system = [ setuptools ];
41 nativeCheckInputs = [ pytestCheckHook ];
43 pythonImportsCheck = [ "ipwhois" ];
45 preCheck = lib.optionalString stdenv.hostPlatform.isLinux ''
46 echo "nameserver 127.0.0.1" > resolv.conf
47 export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
48 LD_PRELOAD=${libredirect}/lib/libredirect.so
52 # Tests require network access
53 "ipwhois/tests/online/"
55 "ipwhois/tests/stress/test_experimental.py"
60 "test_unique_addresses"
65 description = "Library to retrieve and parse whois data";
66 homepage = "https://github.com/secynic/ipwhois";
67 changelog = "https://github.com/secynic/ipwhois/blob/v${version}/CHANGES.rst";
68 license = licenses.bsd2;
69 maintainers = with maintainers; [ fab ];