From 6503bc8e18ffeb80d6163a7e17b51eb2964b99ed Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 22 Jun 2024 14:33:36 +0200 Subject: [PATCH 1/3] python312Packages.airgradient: init at 0.6.0 Module for AirGradient https://github.com/airgradienthq/python-airgradient --- .../python-modules/airgradient/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/airgradient/default.nix diff --git a/pkgs/development/python-modules/airgradient/default.nix b/pkgs/development/python-modules/airgradient/default.nix new file mode 100644 index 000000000000..b31a713f4a96 --- /dev/null +++ b/pkgs/development/python-modules/airgradient/default.nix @@ -0,0 +1,61 @@ +{ + lib, + aiohttp, + aioresponses, + buildPythonPackage, + fetchFromGitHub, + mashumaro, + orjson, + poetry-core, + pytest-asyncio, + pytestCheckHook, + pythonOlder, + syrupy, + yarl, +}: + +buildPythonPackage rec { + pname = "airgradient"; + version = "0.6.0"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "airgradienthq"; + repo = "python-airgradient"; + rev = "refs/tags/v${version}"; + hash = "sha256-1miNMT4AiOEci/jfZJswaF/Dee0bCNH7CLiKoR443q0="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "--cov" "" + ''; + + build-system = [ poetry-core ]; + + dependencies = [ + aiohttp + mashumaro + orjson + yarl + ]; + + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytestCheckHook + syrupy + ]; + + pythonImportsCheck = [ "airgradient" ]; + + meta = with lib; { + description = "Module for AirGradient"; + homepage = "https://github.com/airgradienthq/python-airgradient"; + changelog = "https://github.com/airgradienthq/python-airgradient/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 076e5131f1b8..47b250c09124 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -465,6 +465,8 @@ self: super: with self; { aiozoneinfo = callPackage ../development/python-modules/aiozoneinfo { }; + airgradient = callPackage ../development/python-modules/airgradient { }; + airium = callPackage ../development/python-modules/airium { }; airly = callPackage ../development/python-modules/airly { }; From 73ab3b7dbb63a3fddb0fc48f76c44335fef9becd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 22 Jun 2024 14:36:51 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4f5f52c3522e..96c37125ba93 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -52,7 +52,8 @@ "air_quality" = ps: with ps; [ ]; "airgradient" = ps: with ps; [ - ]; # missing inputs: airgradient + airgradient + ]; "airly" = ps: with ps; [ airly ]; @@ -5241,6 +5242,7 @@ "aftership" "agent_dvr" "air_quality" + "airgradient" "airly" "airnow" "airq" From 0e559451d9b30c7d04ec72d4665a243dd18e5850 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Jul 2024 14:13:05 +0200 Subject: [PATCH 3/3] python312Packages.airgradient: 0.6.0 -> 0.6.1 Diff: https://github.com/airgradienthq/python-airgradient/compare/refs/tags/v0.6.0...v0.6.1 Changelog: https://github.com/airgradienthq/python-airgradient/releases/tag/v0.6.1 --- pkgs/development/python-modules/airgradient/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/airgradient/default.nix b/pkgs/development/python-modules/airgradient/default.nix index b31a713f4a96..bfffb0e3e9e0 100644 --- a/pkgs/development/python-modules/airgradient/default.nix +++ b/pkgs/development/python-modules/airgradient/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "airgradient"; - version = "0.6.0"; + version = "0.6.1"; pyproject = true; disabled = pythonOlder "3.11"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "airgradienthq"; repo = "python-airgradient"; rev = "refs/tags/v${version}"; - hash = "sha256-1miNMT4AiOEci/jfZJswaF/Dee0bCNH7CLiKoR443q0="; + hash = "sha256-1f5sFpuQgmmAFKdunpuuDuKm9CK1K8iXBV/q2qJoe/o="; }; postPatch = ''