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