15 buildPythonPackage rec {
20 disabled = pythonOlder "3.7";
22 src = fetchFromGitHub {
25 rev = "refs/tags/v${version}";
26 hash = "sha256-2CfRRHlIIaycUtzKeMBKi6pVPeBCb1nW3/1hoxQU1YM=";
30 # Use assertEqual instead of assertEquals, https://github.com/secynic/ipwhois/pull/316
32 name = "assert-equal.patch";
33 url = "https://github.com/secynic/ipwhois/commit/fce2761354af99bc169e6cd08057e838fcc40f75.patch";
34 hash = "sha256-7Ic4xWTAmklk6MvnZ/WsH9SW/4D9EG/jFKt5Wi89Xtc=";
38 __darwinAllowLocalNetworking = true;
49 propagatedBuildInputs = [
57 pythonImportsCheck = [
61 preCheck = lib.optionalString stdenv.isLinux ''
62 echo "nameserver 127.0.0.1" > resolv.conf
63 export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
64 LD_PRELOAD=${libredirect}/lib/libredirect.so
68 # Tests require network access
69 "ipwhois/tests/online/"
71 "ipwhois/tests/stress/test_experimental.py"
76 "test_unique_addresses"
81 description = "Library to retrieve and parse whois data";
82 homepage = "https://github.com/secynic/ipwhois";
83 changelog = "https://github.com/secynic/ipwhois/blob/v${version}/CHANGES.rst";
84 license = licenses.bsd2;
85 maintainers = with maintainers; [ fab ];