1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
defusedxml,
|
|
dnspython,
|
|
fetchFromGitHub,
|
|
iana-etc,
|
|
libredirect,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ipwhois";
|
|
version = "1.3.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "secynic";
|
|
repo = "ipwhois";
|
|
tag = "v${version}";
|
|
hash = "sha256-PY3SUPELcCvS/o5kfko4OD1BlTc9DnyqfkSFuzcAOSY=";
|
|
};
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
pythonRelaxDeps = [ "dnspython" ];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
defusedxml
|
|
dnspython
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
libredirect.hook
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "ipwhois" ];
|
|
|
|
preCheck = lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
echo "nameserver 127.0.0.1" > resolv.conf
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
|
|
'';
|
|
|
|
disabledTestPaths = [
|
|
# Tests require network access
|
|
"ipwhois/tests/online/"
|
|
# Stress test
|
|
"ipwhois/tests/stress/test_experimental.py"
|
|
];
|
|
|
|
disabledTests = [
|
|
"test_lookup"
|
|
"test_unique_addresses"
|
|
"test_get_http_json"
|
|
];
|
|
|
|
meta = {
|
|
description = "Library to retrieve and parse whois data";
|
|
homepage = "https://github.com/secynic/ipwhois";
|
|
changelog = "https://github.com/secynic/ipwhois/blob/v${version}/CHANGES.rst";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|