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