summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRobert Schütz <rschuetz17@gmail.com>2018-04-16 08:12:43 +0200
committerGitHub <noreply@github.com>2018-04-16 08:12:43 +0200
commitb70ad2ac314229c3cdbde6f2a243f536b81b7433 (patch)
tree3d8a23d6699b6cf3fb7d6e5c32ca0a7dfaaf2980 /pkgs
parent231e8e2a340baa1e7da54d877ba286ce6e263e7e (diff)
parentf6d9eed57f66b45a7f5f9643e4c5cdbd0fed4d21 (diff)
downloadnixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.tar
nixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.tar.gz
nixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.tar.bz2
nixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.tar.lz
nixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.tar.xz
nixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.tar.zst
nixpkgs-b70ad2ac314229c3cdbde6f2a243f536b81b7433.zip
Merge pull request #38653 from peterhoeg/hass_cloud
home-assistant: make hass cloud integration work
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/envs/default.nix24
-rw-r--r--pkgs/development/python-modules/warrant/default.nix36
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix4
4 files changed, 65 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/envs/default.nix b/pkgs/development/python-modules/envs/default.nix
new file mode 100644
index 00000000000..7b6159d0e61
--- /dev/null
+++ b/pkgs/development/python-modules/envs/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildPythonPackage, fetchFromGitHub
+, click, jinja2, terminaltables }:
+
+buildPythonPackage rec {
+  pname = "envs";
+  version = "1.2.4";
+
+  # move to fetchPyPi when https://github.com/capless/envs/issues/8 is fixed
+  src = fetchFromGitHub {
+    owner  = "capless";
+    repo   = "envs";
+    rev    = "e1f6cbad7f20316fc44324d2c50826d57c2817a8";
+    sha256 = "0p88a79amj0jxll3ssq1dzg78y7zwgc8yqyr7cf53nv2i7kmpakv";
+  };
+
+  checkInputs = [ click jinja2 terminaltables ];
+
+  meta = with lib; {
+    description = "Easy access to environment variables from Python";
+    homepage = https://github.com/capless/envs;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/development/python-modules/warrant/default.nix b/pkgs/development/python-modules/warrant/default.nix
new file mode 100644
index 00000000000..ac83430fbae
--- /dev/null
+++ b/pkgs/development/python-modules/warrant/default.nix
@@ -0,0 +1,36 @@
+{ lib, buildPythonPackage, fetchFromGitHub, fetchPypi
+, mock
+, boto3, envs, python-jose, requests }:
+
+buildPythonPackage rec {
+  pname = "warrant";
+  version = "0.6.1";
+
+  # move to fetchPyPi when https://github.com/capless/warrant/issues/97 is fixed
+  src = fetchFromGitHub {
+    owner  = "capless";
+    repo   = "warrant";
+    rev    = "ff2e4793d8479e770f2461ef7cbc0c15ee784395";
+    sha256 = "0gw3crg64p1zx3k5js0wh0x5bldgs7viy4g8hld9xbka8q0374hi";
+  };
+
+  # this needs to go when 0.6.2 or later is released
+  postPatch = ''
+    substituteInPlace requirements.txt \
+      --replace "python-jose-cryptodome>=1.3.2" "python-jose>=2.0.0"
+  '';
+
+  checkInputs = [ mock ];
+
+  propagatedBuildInputs = [ boto3 envs python-jose requests ];
+
+  # all the checks are failing
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Python library for using AWS Cognito with support for SRP";
+    homepage = https://github.com/capless/warrant;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 103505011ef..718fd3cc6a9 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -55,7 +55,7 @@
     "climate.sensibo" = ps: with ps; [  ];
     "climate.touchline" = ps: with ps; [  ];
     "climate.venstar" = ps: with ps; [  ];
-    "cloud" = ps: with ps; [  ];
+    "cloud" = ps: with ps; [ warrant ];
     "coinbase" = ps: with ps; [  ];
     "comfoconnect" = ps: with ps; [  ];
     "config.config_entries" = ps: with ps; [  ];
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index e572eaefb2e..d1ee00515cb 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1646,6 +1646,8 @@ in {
 
   curtsies = callPackage ../development/python-modules/curtsies { };
 
+  envs = callPackage ../development/python-modules/envs { };
+
   jsonrpc-async = callPackage ../development/python-modules/jsonrpc-async { };
 
   jsonrpc-base = callPackage ../development/python-modules/jsonrpc-base { };
@@ -18273,6 +18275,8 @@ EOF
 
   sseclient = callPackage ../development/python-modules/sseclient { };
 
+  warrant = callPackage ../development/python-modules/warrant { };
+
   textacy = callPackage ../development/python-modules/textacy { };
 
   pyemd  = callPackage ../development/python-modules/pyemd { };