ed0c4a69f0
GitOrigin-RevId: e3652e0735fbec227f342712f180f4f21f0594f2
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ lib
|
|
, async-timeout
|
|
, buildPythonPackage
|
|
, dnspython
|
|
, fetchFromGitHub
|
|
, ifaddr
|
|
, netifaces
|
|
, pyroute2
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aiodiscover";
|
|
version = "1.4.15";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdraco";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-Ee6lo1910dR02fAQEkuS+xCzM93UMKkrgbKPd/Id0Uc=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
async-timeout
|
|
dnspython
|
|
netifaces
|
|
pyroute2
|
|
ifaddr
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace '"pytest-runner>=5.2",' ""
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests require access to /etc/resolv.conf
|
|
"test_async_discover_hosts"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"aiodiscover"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python module to discover hosts via ARP and PTR lookup";
|
|
homepage = "https://github.com/bdraco/aiodiscover";
|
|
changelog = "https://github.com/bdraco/aiodiscover/releases/tag/v${version}";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|