diff --git a/pkgs/development/python-modules/egauge-async/default.nix b/pkgs/development/python-modules/egauge-async/default.nix new file mode 100644 index 000000000000..efc63ec440dc --- /dev/null +++ b/pkgs/development/python-modules/egauge-async/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + uv-dynamic-versioning, + httpx, + pytest-asyncio, + pytest-mock, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "egauge-async"; + version = "0.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "neggert"; + repo = "egauge-async"; + tag = "v${finalAttrs.version}"; + hash = "sha256-VESByB7TwB8jjvRMeNGIzJYurKGS4OqDYTw9f1QTyX8="; + }; + + build-system = [ + hatchling + uv-dynamic-versioning + ]; + + dependencies = [ + httpx + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-mock + pytestCheckHook + ]; + + disabledTestMarks = [ + "integration" + ]; + + pythonImportsCheck = [ + "egauge_async" + ]; + + meta = { + description = "Async client for eGauge energy monitor"; + homepage = "https://github.com/neggert/egauge-async"; + changelog = "https://github.com/neggert/egauge-async/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ jamiemagee ]; + }; +}) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 1874daf94d1b..48943721a15d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -1449,7 +1449,8 @@ ]; "egauge" = ps: with ps; [ - ]; # missing inputs: egauge-async + egauge-async + ]; "eheimdigital" = ps: with ps; [ eheimdigital @@ -7365,6 +7366,7 @@ "ecowitt" "edl21" "efergy" + "egauge" "eheimdigital" "eight_sleep" "ekeybionyx" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 36f3713fa276..994e8fb3070b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4872,6 +4872,8 @@ self: super: with self; { effect = callPackage ../development/python-modules/effect { }; + egauge-async = callPackage ../development/python-modules/egauge-async { }; + eggdeps = callPackage ../development/python-modules/eggdeps { }; eheimdigital = callPackage ../development/python-modules/eheimdigital { };