about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/netdisco/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/netdisco/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/netdisco/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/netdisco/default.nix b/nixpkgs/pkgs/development/python-modules/netdisco/default.nix
new file mode 100644
index 000000000000..db1d17de07ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/netdisco/default.nix
@@ -0,0 +1,46 @@
+{
+  lib,
+  buildPythonPackage,
+  isPy3k,
+  fetchPypi,
+  requests,
+  zeroconf,
+  pytestCheckHook,
+}:
+
+buildPythonPackage rec {
+  pname = "netdisco";
+  version = "3.0.0";
+  format = "setuptools";
+
+  disabled = !isPy3k;
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-TbtZBILzd8zEYeAXQnB8y+jx0tGyhXivkdybf+vNy9I=";
+  };
+
+  propagatedBuildInputs = [
+    requests
+    zeroconf
+  ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  disabledTestPaths = [
+    # Broken due to removed discoverables in https://github.com/home-assistant-libs/netdisco/commit/477db5a1dc93919a6c5bd61b4b1d3c80e75785bd
+    "tests/test_xboxone.py"
+  ];
+
+  pythonImportsCheck = [
+    "netdisco"
+    "netdisco.discovery"
+  ];
+
+  meta = with lib; {
+    description = "Python library to scan local network for services and devices";
+    homepage = "https://github.com/home-assistant/netdisco";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}