From c342ff82b79e48a0429a04f0165645ac890a2d52 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 15:02:32 +0100 Subject: [PATCH 1/2] python3Packages.aioguardian: init at 1.0.4 --- .../python-modules/aioguardian/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/aioguardian/default.nix diff --git a/pkgs/development/python-modules/aioguardian/default.nix b/pkgs/development/python-modules/aioguardian/default.nix new file mode 100644 index 000000000000..f6822ede08cd --- /dev/null +++ b/pkgs/development/python-modules/aioguardian/default.nix @@ -0,0 +1,62 @@ +{ lib +, aiohttp +, async-timeout +, asyncio-dgram +, asynctest +, buildPythonPackage +, cryptography +, fetchFromGitHub +, poetry +, pytest-aiohttp +, pytest-asyncio +, pytestCheckHook +, pythonAtLeast +, voluptuous +}: + +buildPythonPackage rec { + pname = "aioguardian"; + version = "1.0.4"; + disabled = pythonAtLeast "3.9"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1cbxcsxh9c8r2zx3lsjdns26sm2qmlwnqgah2sfzbgp1lay23vvq"; + }; + + format = "pyproject"; + + nativeBuildInputs = [ poetry ]; + + propagatedBuildInputs = [ + aiohttp + async-timeout + asyncio-dgram + voluptuous + ]; + + checkInputs = [ + asyncio-dgram + asynctest + pytest-aiohttp + pytest-asyncio + pytestCheckHook + ]; + + # Ignore the examples as they are prefixed with test_ + pytestFlagsArray = [ "--ignore examples/" ]; + pythonImportsCheck = [ "aioguardian" ]; + + meta = with lib; { + description = " Python library to interact with Elexa Guardian devices"; + longDescription = '' + aioguardian is a Pytho3, asyncio-focused library for interacting with the + Guardian line of water valves and sensors from Elexa. + ''; + homepage = "https://github.com/bachya/aioguardian"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad775f0712b3..4fc036a452bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -209,6 +209,8 @@ in { aioftp = callPackage ../development/python-modules/aioftp { }; + aioguardian = callPackage ../development/python-modules/aioguardian { }; + aioh2 = callPackage ../development/python-modules/aioh2 { }; aioharmony = callPackage ../development/python-modules/aioharmony { }; From 36a24ff5bacad120715f7ccbc44f2db9a4cf95a6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 15:05:27 +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 6df1239537eb..97ed86904d4e 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -329,7 +329,7 @@ "growatt_server" = ps: with ps; [ ]; # missing inputs: growattServer "gstreamer" = ps: with ps; [ ]; # missing inputs: gstreamer-player "gtfs" = ps: with ps; [ ]; # missing inputs: pygtfs - "guardian" = ps: with ps; [ ]; # missing inputs: aioguardian + "guardian" = ps: with ps; [ aioguardian ]; "habitica" = ps: with ps; [ ]; # missing inputs: habitipy "hangouts" = ps: with ps; [ ]; # missing inputs: hangups "harman_kardon_avr" = ps: with ps; [ ]; # missing inputs: hkavr