summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aiodiscover
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-04-07 23:29:44 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-04-08 00:48:47 +0200
commiteca0abfd504e6380ace27c00386d385a95d962c5 (patch)
tree65ac6159439a5e011e8721a75adedb17cfabd799 /pkgs/development/python-modules/aiodiscover
parentpython3Packages.async-dns: init at 1.1.9 (diff)
downloadnixpkgs-eca0abfd504e6380ace27c00386d385a95d962c5.tar.gz
python3Packages.aiodiscover: init at 1.3.2
Diffstat (limited to 'pkgs/development/python-modules/aiodiscover')
-rw-r--r--pkgs/development/python-modules/aiodiscover/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aiodiscover/default.nix b/pkgs/development/python-modules/aiodiscover/default.nix
new file mode 100644
index 000000000000..923be510c457
--- /dev/null
+++ b/pkgs/development/python-modules/aiodiscover/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, async-dns
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, ifaddr
+, pyroute2
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+ pname = "aiodiscover";
+ version = "1.3.2";
+ disabled = pythonOlder "3.7";
+
+ src = fetchFromGitHub {
+ owner = "bdraco";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "0qg2wm6ddsfai788chylr5ynrvakwg91q3dszz7dxzbkfdcxixj3";
+ };
+
+ patches = [
+ (fetchpatch {
+ name = "remove-entry_point.patch";
+ url = "https://github.com/bdraco/aiodiscover/commit/4c497fb7d4c8685a78209c710e92e0bd17f46bb2.patch";
+ sha256 = "0py9alhg6qdncbn6a04mrnjhs4j19kg759dv69knpqzryikcfa63";
+ })
+ ];
+
+ propagatedBuildInputs = [
+ async-dns
+ pyroute2
+ ifaddr
+ ];
+
+ postPatch = ''
+ substituteInPlace setup.py --replace '"pytest-runner>=5.2",' ""
+ '';
+
+ # Tests require access to /etc/resolv.conf
+ # pythonImportsCheck doesn't work as async-dns wants to create its CONFIG_DIR
+ doCheck = false;
+
+ meta = with lib; {
+ description = "Python module to discover hosts via ARP and PTR lookup";
+ homepage = "https://github.com/bdraco/aiodiscover";
+ license = with licenses; [ asl20 ];
+ maintainers = with maintainers; [ fab ];
+ };
+}