2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-socks,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
tldextract,
|
|
|
|
whodap,
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asyncwhois";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.1.4";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pogzyb";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "asyncwhois";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-BjHGp94vad5qTvffiU8ZEOxYeXNzQHlNq1SaxviYfps=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "python-socks[asyncio]" "python-socks"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2022-02-20 05:27:41 +00:00
|
|
|
python-socks
|
2021-01-05 17:05:55 +00:00
|
|
|
tldextract
|
2021-10-04 12:37:57 +00:00
|
|
|
whodap
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-10-19 13:55:26 +00:00
|
|
|
pytest-asyncio
|
2023-02-22 10:55:15 +00:00
|
|
|
pytest-mock
|
2021-02-16 17:04:54 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2022-02-20 05:27:41 +00:00
|
|
|
# Tests require network access
|
2021-02-16 17:04:54 +00:00
|
|
|
"test_pywhois_aio_get_hostname_from_ip"
|
|
|
|
"test_pywhois_get_hostname_from_ip"
|
|
|
|
"test_pywhois_aio_lookup_ipv4"
|
|
|
|
"test_not_found"
|
|
|
|
"test_aio_from_whois_cmd"
|
|
|
|
"test_aio_get_hostname_from_ip"
|
|
|
|
"test_from_whois_cmd"
|
|
|
|
"test_get_hostname_from_ip"
|
|
|
|
"test_whois_query_run"
|
2022-02-20 05:27:41 +00:00
|
|
|
"test_whois_query_create_connection"
|
|
|
|
"test_whois_query_send_and_recv"
|
2023-10-19 13:55:26 +00:00
|
|
|
"test_input_parameters_for_domain_query"
|
|
|
|
"test__get_top_level_domain"
|
2021-02-16 17:04:54 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "asyncwhois" ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for retrieving WHOIS information";
|
|
|
|
homepage = "https://github.com/pogzyb/asyncwhois";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/pogzyb/asyncwhois/releases/tag/v${version}";
|
2021-01-05 17:05:55 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|