1{ lib 2, async-timeout 3, buildPythonPackage 4, dnspython 5, fetchFromGitHub 6, ifaddr 7, netifaces 8, pyroute2 9, pytest-asyncio 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "aiodiscover"; 16 version = "1.4.13"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "bdraco"; 23 repo = pname; 24 rev = "v${version}"; 25 sha256 = "sha256-tIbLb4Jk3vR1hVcdUPuYJrse7BcfE4Z/dXShs/uBDBo="; 26 }; 27 28 propagatedBuildInputs = [ 29 async-timeout 30 dnspython 31 netifaces 32 pyroute2 33 ifaddr 34 ]; 35 36 postPatch = '' 37 substituteInPlace setup.py \ 38 --replace '"pytest-runner>=5.2",' "" \ 39 --replace "pyroute2>=0.5.18,!=0.6.1" "pyroute2" 40 ''; 41 42 checkInputs = [ 43 pytest-asyncio 44 pytestCheckHook 45 ]; 46 47 disabledTests = [ 48 # Tests require access to /etc/resolv.conf 49 "test_async_discover_hosts" 50 ]; 51 52 pythonImportsCheck = [ 53 "aiodiscover" 54 ]; 55 56 meta = with lib; { 57 description = "Python module to discover hosts via ARP and PTR lookup"; 58 homepage = "https://github.com/bdraco/aiodiscover"; 59 license = with licenses; [ asl20 ]; 60 maintainers = with maintainers; [ fab ]; 61 }; 62}