summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2021-06-27 14:13:51 +0200
committerGitHub <noreply@github.com>2021-06-27 14:13:51 +0200
commit630de311e4eed9e88e0577041f08a4be60994100 (patch)
tree50bb5c85886968e8958c9c6215e304af846bb4e7
parent6234ff1caeb2198f1d2ae806d1ef4aa3e6560735 (diff)
parent1d473cf59377e961260b8dbab5e1b7bca9b2f66d (diff)
downloadnixpkgs-630de311e4eed9e88e0577041f08a4be60994100.tar
nixpkgs-630de311e4eed9e88e0577041f08a4be60994100.tar.gz
nixpkgs-630de311e4eed9e88e0577041f08a4be60994100.tar.bz2
nixpkgs-630de311e4eed9e88e0577041f08a4be60994100.tar.lz
nixpkgs-630de311e4eed9e88e0577041f08a4be60994100.tar.xz
nixpkgs-630de311e4eed9e88e0577041f08a4be60994100.tar.zst
nixpkgs-630de311e4eed9e88e0577041f08a4be60994100.zip
Merge pull request #128294 from dotlambda/total-connect-client-init
-rw-r--r--pkgs/development/python-modules/total-connect-client/default.nix39
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/servers/home-assistant/default.nix1
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 43 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/total-connect-client/default.nix b/pkgs/development/python-modules/total-connect-client/default.nix
new file mode 100644
index 00000000000..1347ecab3e2
--- /dev/null
+++ b/pkgs/development/python-modules/total-connect-client/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, zeep
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "total-connect-client";
+  version = "0.58";
+
+  src = fetchFromGitHub {
+    owner = "craigjmidwinter";
+    repo = "total-connect-client";
+    rev = version;
+    sha256 = "1dqmgvgvwjh235wghygan2jnfvmn9vz789in2as3asig9cifix9z";
+  };
+
+  propagatedBuildInputs = [
+    zeep
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  preCheck = ''
+    export PYTHONPATH="total_connect_client:$PYTHONPATH"
+  '';
+
+  pythonImportsCheck = [ "total_connect_client" ];
+
+  meta = with lib; {
+    description = "Interact with Total Connect 2 alarm systems";
+    homepage = "https://github.com/craigjmidwinter/total-connect-client";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 4dcc6a32d05..b58525d5da4 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -873,7 +873,7 @@
     "tomato" = ps: with ps; [ ];
     "toon" = ps: with ps; [ aiohttp-cors hass-nabucasa toonapi ];
     "torque" = ps: with ps; [ aiohttp-cors ];
-    "totalconnect" = ps: with ps; [ ]; # missing inputs: total_connect_client
+    "totalconnect" = ps: with ps; [ total-connect-client ];
     "touchline" = ps: with ps; [ ]; # missing inputs: pytouchline
     "tplink" = ps: with ps; [ pyhs100 ];
     "tplink_lte" = ps: with ps; [ ]; # missing inputs: tp-connected
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index c31dde4fd3e..b6d4229b018 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -701,6 +701,7 @@ in with py.pkgs; buildPythonApplication rec {
     "tod"
     "tomato"
     "toon"
+    "totalconnect"
     "tplink"
     "trace"
     "tradfri"
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index cb071289770..72af595d3c1 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -8617,6 +8617,8 @@ in {
   # Used by streamlit, graphite_beacon, 2021-01-29
   tornado_5 = callPackage ../development/python-modules/tornado/5.nix { };
 
+  total-connect-client = callPackage ../development/python-modules/total-connect-client { };
+
   towncrier = callPackage ../development/python-modules/towncrier {
     inherit (pkgs) git;
   };