about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-01-11 01:36:14 +0100
committerGitHub <noreply@github.com>2021-01-11 01:36:14 +0100
commit08943980b6158af1f41d2b2048277a43357e1f62 (patch)
tree1826f1febd46471d6ecafa9b5d55a37ae14ed80d /pkgs/development
parent3e5207becc1e69f805968dd08ceefaf16cd6ca5b (diff)
parent36a24ff5bacad120715f7ccbc44f2db9a4cf95a6 (diff)
Merge pull request #108673 from fabaff/aioguardian
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/aioguardian/default.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aioguardian/default.nix b/pkgs/development/python-modules/aioguardian/default.nix
new file mode 100644
index 0000000000000..f6822ede08cd6
--- /dev/null
+++ b/pkgs/development/python-modules/aioguardian/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, aiohttp
+, async-timeout
+, asyncio-dgram
+, asynctest
+, buildPythonPackage
+, cryptography
+, fetchFromGitHub
+, poetry
+, pytest-aiohttp
+, pytest-asyncio
+, pytestCheckHook
+, pythonAtLeast
+, voluptuous
+}:
+
+buildPythonPackage rec {
+  pname = "aioguardian";
+  version = "1.0.4";
+  disabled = pythonAtLeast "3.9";
+
+  src = fetchFromGitHub {
+    owner = "bachya";
+    repo = pname;
+    rev = version;
+    sha256 = "1cbxcsxh9c8r2zx3lsjdns26sm2qmlwnqgah2sfzbgp1lay23vvq";
+  };
+
+  format = "pyproject";
+
+  nativeBuildInputs = [ poetry ];
+
+  propagatedBuildInputs = [
+    aiohttp
+    async-timeout
+    asyncio-dgram
+    voluptuous
+  ];
+
+  checkInputs = [
+    asyncio-dgram
+    asynctest
+    pytest-aiohttp
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
+  # Ignore the examples as they are prefixed with test_
+  pytestFlagsArray = [ "--ignore examples/" ];
+  pythonImportsCheck = [ "aioguardian" ];
+
+  meta = with lib; {
+    description = " Python library to interact with Elexa Guardian devices";
+    longDescription = ''
+      aioguardian is a Pytho3, asyncio-focused library for interacting with the
+      Guardian line of water valves and sensors from Elexa.
+    '';
+    homepage = "https://github.com/bachya/aioguardian";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}