1{ lib
2, aiodns
3, asynctest
4, buildPythonPackage
5, fetchFromGitHub
6, pytestCheckHook
7, pythonOlder
8, tldextract
9}:
10
11buildPythonPackage rec {
12 pname = "asyncwhois";
13 version = "0.3.1";
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "pogzyb";
18 repo = pname;
19 rev = "v${version}";
20 sha256 = "1wp6pwnc1inzzn9nhkwq9m9ab1aylw0hzq94w6p2dsm2njfqma8h";
21 };
22
23 propagatedBuildInputs = [
24 aiodns
25 tldextract
26 ];
27
28 checkInputs = [
29 asynctest
30 pytestCheckHook
31 ];
32
33 # Disable tests that require network access
34 disabledTests = [
35 "test_pywhois_aio_get_hostname_from_ip"
36 "test_pywhois_get_hostname_from_ip"
37 "test_pywhois_aio_lookup_ipv4"
38 "test_not_found"
39 "test_aio_from_whois_cmd"
40 "test_aio_get_hostname_from_ip"
41 "test_from_whois_cmd"
42 "test_get_hostname_from_ip"
43 "test_whois_query_run"
44 ];
45
46 pythonImportsCheck = [ "asyncwhois" ];
47
48 meta = with lib; {
49 description = "Python module for retrieving WHOIS information";
50 homepage = "https://github.com/pogzyb/asyncwhois";
51 license = with licenses; [ asl20 ];
52 maintainers = with maintainers; [ fab ];
53 };
54}