Skip to content

Commit

Permalink
Merge pull request #117013 from fabaff/iaqualink
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed Mar 21, 2021
2 parents d03cf14 + cfce515 commit 355d0fc
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
36 changes: 36 additions & 0 deletions pkgs/development/python-modules/iaqualink/default.nix
@@ -0,0 +1,36 @@
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pytest-runner
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
pname = "iaqualink";
version = "0.4.0";
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "flz";
repo = "iaqualink-py";
rev = "v${version}";
sha256 = "13iwngjjqzr1pkmskbc2wakccvcjkf4bk65f4jp4ywpciilr4zjw";
};

nativeBuildInputs = [ pytest-runner ];

propagatedBuildInputs = [ aiohttp ];

checkInputs = [ pytestCheckHook ];

pythonImportsCheck = [ "iaqualink" ];

meta = with lib; {
description = "Python library for Jandy iAqualink";
homepage = "https://github.com/flz/iaqualink-py";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}
2 changes: 1 addition & 1 deletion pkgs/servers/home-assistant/component-packages.nix
Expand Up @@ -374,7 +374,7 @@
"hydrawise" = ps: with ps; [ hydrawiser ];
"hyperion" = ps: with ps; [ ]; # missing inputs: hyperion-py
"iammeter" = ps: with ps; [ ]; # missing inputs: iammeter
"iaqualink" = ps: with ps; [ ]; # missing inputs: iaqualink
"iaqualink" = ps: with ps; [ iaqualink ];
"icloud" = ps: with ps; [ pyicloud ];
"idteck_prox" = ps: with ps; [ ]; # missing inputs: rfk101py
"ifttt" = ps: with ps; [ aiohttp-cors pyfttt ];
Expand Down
16 changes: 16 additions & 0 deletions pkgs/servers/home-assistant/default.nix
Expand Up @@ -28,6 +28,21 @@ let
(mkOverride "astral" "1.10.1"
"d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1")

# Pinned due to API changes in iaqualink>=2.0, remove after
# https://github.com/home-assistant/core/pull/48137 was merged
(self: super: {
iaqualink = super.iaqualink.overridePythonAttrs (oldAttrs: rec {
version = "0.3.4";
src = fetchFromGitHub {
owner = "flz";
repo = "iaqualink-py";
rev = version;
sha256 = "16mn6nd9x3hm6j6da99qhwbqs95hh8wx21r1h1m9csl76z77n9lh";
};
checkInputs = oldAttrs.checkInputs ++ [ python3.pkgs.asynctest ];
});
})

# Pinned due to bug in ring-doorbell 0.7.0
# https://github.com/tchellomello/python-ring-doorbell/issues/240
(mkOverride "ring-doorbell" "0.6.2"
Expand Down Expand Up @@ -213,6 +228,7 @@ in with py.pkgs; buildPythonApplication rec {
"html5"
"http"
"hue"
"iaqualink"
"ifttt"
"image"
"image_processing"
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -3206,6 +3206,8 @@ in {

iapws = callPackage ../development/python-modules/iapws { };

iaqualink = callPackage ../development/python-modules/iaqualink { };

ibis = callPackage ../development/python-modules/ibis { };

ibis-framework = callPackage ../development/python-modules/ibis-framework { };
Expand Down

0 comments on commit 355d0fc

Please sign in to comment.