From 6feb747491b1680ab5137b9f87511eb6d3eb8736 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sun, 10 May 2026 13:07:29 -0700 Subject: [PATCH] python3Packages.ha-garmin: init at 0.1.19 --- .../python-modules/ha-garmin/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/ha-garmin/default.nix diff --git a/pkgs/development/python-modules/ha-garmin/default.nix b/pkgs/development/python-modules/ha-garmin/default.nix new file mode 100644 index 000000000000..a445591e5dc3 --- /dev/null +++ b/pkgs/development/python-modules/ha-garmin/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + curl-cffi, + pydantic, + pytest-asyncio, + pytestCheckHook, + requests, +}: + +buildPythonPackage (finalAttrs: { + pname = "ha-garmin"; + version = "0.1.19"; + pyproject = true; + + src = fetchFromGitHub { + owner = "cyberjunky"; + repo = "ha-garmin"; + tag = "v${finalAttrs.version}"; + hash = "sha256-vzr32vuAVafdx64Fmv257gS2a+ZbfwZNwwuF5NPQbS0="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + curl-cffi + pydantic + requests + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + disabledTests = [ + # Upstream test relies on a field not present in the test fixture + "test_fetch_core_data_sleep_fields" + ]; + + pythonImportsCheck = [ "ha_garmin" ]; + + meta = { + description = "Python client for Garmin Connect API, designed for Home Assistant integration"; + homepage = "https://github.com/cyberjunky/ha-garmin"; + changelog = "https://github.com/cyberjunky/ha-garmin/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dcd84157257b..e1cd81997033 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6897,6 +6897,8 @@ self: super: with self; { ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { }; + ha-garmin = callPackage ../development/python-modules/ha-garmin { }; + ha-iotawattpy = callPackage ../development/python-modules/ha-iotawattpy { }; ha-mqtt-discoverable = callPackage ../development/python-modules/ha-mqtt-discoverable { };