summary refs log tree commit diff
path: root/pkgs/development/python-modules/loqedapi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/loqedapi/default.nix')
-rw-r--r--pkgs/development/python-modules/loqedapi/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/loqedapi/default.nix b/pkgs/development/python-modules/loqedapi/default.nix
new file mode 100644
index 00000000000..332edd1c011
--- /dev/null
+++ b/pkgs/development/python-modules/loqedapi/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, aiohttp
+, async-timeout
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, setuptools
+, wheel
+}:
+
+buildPythonPackage rec {
+  pname = "loqedapi";
+  version = "2.1.8";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "cpolhout";
+    repo = "loqedAPI";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-9ekZ98GazH1tna4JT5SEUETKR227UYRIBBghdj+TFB4=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+    wheel
+  ];
+
+  propagatedBuildInputs = [
+    aiohttp
+    async-timeout
+  ];
+
+  # Tests require network access
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "loqedAPI"
+  ];
+
+  meta = with lib; {
+    description = "Module to interact with the Loqed Smart Door Lock API";
+    homepage = "https://github.com/cpolhout/loqedAPI";
+    changelog = "https://github.com/cpolhout/loqedAPI/releases/tag/v${version}";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ fab ];
+  };
+}