diff --git a/pkgs/development/python-modules/hyponcloud/default.nix b/pkgs/development/python-modules/hyponcloud/default.nix new file mode 100644 index 000000000000..312a7b3508e5 --- /dev/null +++ b/pkgs/development/python-modules/hyponcloud/default.nix @@ -0,0 +1,49 @@ +{ + lib, + aiohttp, + buildPythonPackage, + fetchFromGitHub, + mashumaro, + pytest-asyncio, + pytestCheckHook, + setuptools, + setuptools-scm, +}: + +buildPythonPackage (finalAttrs: { + pname = "hyponcloud"; + version = "0.9.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "jcisio"; + repo = "hyponcloud"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ZFolkhyXauUS+6rbCjSp+5Oxfp3Y7oh8fjXHwDi+zKA="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + aiohttp + mashumaro + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "hyponcloud" ]; + + meta = { + description = "Python library for Hypontech Cloud API for solar inverter monitoring"; + homepage = "https://github.com/jcisio/hyponcloud"; + changelog = "https://github.com/jcisio/hyponcloud/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 48c4dff66996..d5984440b7eb 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2665,7 +2665,8 @@ ]; "hypontech" = ps: with ps; [ - ]; # missing inputs: hyponcloud + hyponcloud + ]; "ialarm" = ps: with ps; [ pyialarm @@ -7637,6 +7638,7 @@ "hvv_departures" "hydrawise" "hyperion" + "hypontech" "ialarm" "iaqualink" "ibeacon" diff --git a/pkgs/servers/home-assistant/tests.nix b/pkgs/servers/home-assistant/tests.nix index b579d174b505..9243882d503f 100644 --- a/pkgs/servers/home-assistant/tests.nix +++ b/pkgs/servers/home-assistant/tests.nix @@ -168,6 +168,10 @@ let }; extraDisabledTestPaths = { + hypontech = [ + # outdated snapshot + "tests/components/hypontech/test_sensor.py::test_sensors" + ]; jellyfin = [ # AssertionError: assert 'audio/x-flac' == 'audio/flac' "tests/components/jellyfin/test_media_source.py::test_resolve" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0dae3b830722..cba10e15a437 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7292,6 +7292,8 @@ self: super: with self; { hyperscan = callPackage ../development/python-modules/hyperscan { }; + hyponcloud = callPackage ../development/python-modules/hyponcloud { }; + hypothesis = callPackage ../development/python-modules/hypothesis { }; hypothesis-auto = callPackage ../development/python-modules/hypothesis-auto { };