From f6675420fc782198cc7a286c9bc95c3abc25c761 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Feb 2021 11:18:49 +0100 Subject: [PATCH 1/2] python3Packages.pydaikin: init at 2.4.1 --- .../python-modules/pydaikin/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/pydaikin/default.nix diff --git a/pkgs/development/python-modules/pydaikin/default.nix b/pkgs/development/python-modules/pydaikin/default.nix new file mode 100644 index 000000000000..209ef3dbc235 --- /dev/null +++ b/pkgs/development/python-modules/pydaikin/default.nix @@ -0,0 +1,45 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromBitbucket +, freezegun +, netifaces +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +, urllib3 +}: + +buildPythonPackage rec { + pname = "pydaikin"; + version = "2.4.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromBitbucket { + owner = "mustang51"; + repo = pname; + rev = "v${version}"; + sha256 = "1624adp4lqd1n9flnf0wqrcibml2nd19ga3fmxzjg4x5z6767bs3"; + }; + + propagatedBuildInputs = [ + aiohttp + netifaces + urllib3 + ]; + + checkInputs = [ + freezegun + pytest-aiohttp + pytestCheckHook + ]; + + pythonImportsCheck = [ "pydaikin" ]; + + meta = with lib; { + description = "Python Daikin HVAC appliances interface"; + homepage = "https://bitbucket.org/mustang51/pydaikin"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 17f6624c42ea..916d83a6e7f6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5342,6 +5342,8 @@ in { pycxx = callPackage ../development/python-modules/pycxx { }; + pydaikin = callPackage ../development/python-modules/pydaikin { }; + pydantic = callPackage ../development/python-modules/pydantic { }; pydbus = callPackage ../development/python-modules/pydbus { }; From be095d60ba98bbd0c5b686723e93a5a81340e684 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 13 Feb 2021 11:19:41 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 40779f4bc198..d8ffed98f898 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -145,7 +145,7 @@ "crimereports" = ps: with ps; [ ]; # missing inputs: crimereports "cups" = ps: with ps; [ pycups ]; "currencylayer" = ps: with ps; [ ]; - "daikin" = ps: with ps; [ ]; # missing inputs: pydaikin + "daikin" = ps: with ps; [ pydaikin ]; "danfoss_air" = ps: with ps; [ ]; # missing inputs: pydanfossair "darksky" = ps: with ps; [ python-forecastio ]; "datadog" = ps: with ps; [ datadog ];