about summary refs log tree commit diff
path: root/pkgs/development/python-modules/webthing-ws/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/webthing-ws/default.nix')
-rw-r--r--pkgs/development/python-modules/webthing-ws/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/webthing-ws/default.nix b/pkgs/development/python-modules/webthing-ws/default.nix
new file mode 100644
index 0000000000000..1e7b89e03b62b
--- /dev/null
+++ b/pkgs/development/python-modules/webthing-ws/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, aiohttp
+, async-timeout
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "webthing-ws";
+  version = "0.2.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "home-assistant-ecosystem";
+    repo = pname;
+    rev = "refs/tags/${version}";
+    hash = "sha256-j7nc4yJczDs28RVFDHeQ2ZIG9mIW2m25AAeErVKi4E4=";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+    async-timeout
+  ];
+
+  # Module has no tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "webthing_ws"
+  ];
+
+  meta = with lib; {
+    description = "WebThing WebSocket consumer and API client";
+    homepage = "https://github.com/home-assistant-ecosystem/webthing-ws";
+    changelog = "https://github.com/home-assistant-ecosystem/webthing-ws/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}