Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest-mock 5, pytestCheckHook 6, python-socks 7, pythonOlder 8, tldextract 9, whodap 10}: 11 12buildPythonPackage rec { 13 pname = "asyncwhois"; 14 version = "1.0.6"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "pogzyb"; 21 repo = pname; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-SakO+s05P1Kj2NWlhMcdNa4bDs+DaVZ1W2ybs51U+BQ="; 24 }; 25 26 propagatedBuildInputs = [ 27 python-socks 28 tldextract 29 whodap 30 ]; 31 32 nativeCheckInputs = [ 33 pytest-mock 34 pytestCheckHook 35 ]; 36 37 postPatch = '' 38 substituteInPlace setup.py \ 39 --replace "python-socks[asyncio]" "python-socks" 40 ''; 41 42 disabledTests = [ 43 # Tests require network access 44 "test_pywhois_aio_get_hostname_from_ip" 45 "test_pywhois_get_hostname_from_ip" 46 "test_pywhois_aio_lookup_ipv4" 47 "test_not_found" 48 "test_aio_from_whois_cmd" 49 "test_aio_get_hostname_from_ip" 50 "test_from_whois_cmd" 51 "test_get_hostname_from_ip" 52 "test_whois_query_run" 53 "test_whois_query_create_connection" 54 "test_whois_query_send_and_recv" 55 ]; 56 57 pythonImportsCheck = [ 58 "asyncwhois" 59 ]; 60 61 meta = with lib; { 62 description = "Python module for retrieving WHOIS information"; 63 homepage = "https://github.com/pogzyb/asyncwhois"; 64 changelog = "https://github.com/pogzyb/asyncwhois/releases/tag/v${version}"; 65 license = with licenses; [ asl20 ]; 66 maintainers = with maintainers; [ fab ]; 67 }; 68}