From 13f2a8f99170479eaffdd5049c9970e04e06bfbd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Mar 2021 23:54:27 +0100 Subject: [PATCH 1/3] python3Packages.aionotion: init at 3.0.1 --- .../python-modules/aionotion/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/aionotion/default.nix diff --git a/pkgs/development/python-modules/aionotion/default.nix b/pkgs/development/python-modules/aionotion/default.nix new file mode 100644 index 00000000000..078184275eb --- /dev/null +++ b/pkgs/development/python-modules/aionotion/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aionotion"; + version = "3.0.1"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1ydrazg7gcwf53006n1fvxh9zm77by6zi36haq1bmy5skqccyiki"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aresponses + pytest-aiohttp + pytest-asyncio + pytest-cov + pytestCheckHook + ]; + + disabledTestPaths = [ "examples" ]; + + pythonImportsCheck = [ "aionotion" ]; + + meta = with lib; { + description = "Python library for Notion Home Monitoring"; + homepage = "https://github.com/bachya/aionotion"; + 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 04a6e7b5eb0..5f95b268149 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -302,6 +302,8 @@ in { aionotify = callPackage ../development/python-modules/aionotify { }; + aionotion = callPackage ../development/python-modules/aionotion { }; + aioprocessing = callPackage ../development/python-modules/aioprocessing { }; aiopulse = callPackage ../development/python-modules/aiopulse { }; From 6022ca6e0b6a67ab1b38258ce7cd018d9d2f7e01 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Mar 2021 23:48:10 +0100 Subject: [PATCH 2/3] 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 98fba35b9f1..f44b8a61b44 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -563,7 +563,7 @@ "norway_air" = ps: with ps; [ pymetno ]; "notify" = ps: with ps; [ ]; "notify_events" = ps: with ps; [ ]; # missing inputs: notify-events - "notion" = ps: with ps; [ ]; # missing inputs: aionotion + "notion" = ps: with ps; [ aionotion ]; "nsw_fuel_station" = ps: with ps; [ ]; # missing inputs: nsw-fuel-api-client "nsw_rural_fire_service_feed" = ps: with ps; [ ]; # missing inputs: aio_geojson_nsw_rfs_incidents "nuheat" = ps: with ps; [ ]; # missing inputs: nuheat From b9375be57e70a1c266d30580108f41b671f63911 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Mar 2021 23:49:26 +0100 Subject: [PATCH 3/3] home-assistant: enable notion tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index dc61317876b..5f14506161f 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -250,6 +250,7 @@ in with py.pkgs; buildPythonApplication rec { "mqtt_statestream" "mullvad" "notify" + "notion" "number" "ozw" "panel_custom"