From 7e6bc49753eb0d24f23796e5fae4a424f1aec0fa Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Wed, 13 Dec 2023 21:39:30 -0800 Subject: [PATCH 1/2] python311Packages.anova-wifi: init at 0.10.3 --- .../python-modules/anova-wifi/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/anova-wifi/default.nix diff --git a/pkgs/development/python-modules/anova-wifi/default.nix b/pkgs/development/python-modules/anova-wifi/default.nix new file mode 100644 index 000000000000..b6f885daf619 --- /dev/null +++ b/pkgs/development/python-modules/anova-wifi/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, poetry-core +, aiohttp +, sensor-state-data +, pytestCheckHook +, pytest-asyncio +}: + +buildPythonPackage rec { + pname = "anova-wifi"; + version = "0.10.3"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "Lash-L"; + repo = "anova_wifi"; + rev = "refs/tags/v${version}"; + hash = "sha256-tCmvp29KSCkc+g0w0odcB7vGjtDx6evac7XsHEF0syM="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov=anova_wifi --cov-report=term-missing:skip-covered" "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + sensor-state-data + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + disabledTests = [ + # Makes network calls + "test_async_data_1" + ]; + + pythonImportsCheck = [ "anova_wifi" ]; + + meta = with lib; { + description = "A Python package for reading anova sous vide api data"; + homepage = "https://github.com/Lash-L/anova_wifi"; + changelog = "https://github.com/Lash-L/anova_wifi/releases/tag/v${version}"; + maintainers = with maintainers; [ jamiemagee ]; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 35ca0d3fd5fe..4bc7c58c1928 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -554,6 +554,8 @@ self: super: with self; { anonip = callPackage ../development/python-modules/anonip { }; + anova-wifi = callPackage ../development/python-modules/anova-wifi { }; + ansi2html = callPackage ../development/python-modules/ansi2html { }; ansi2image = callPackage ../development/python-modules/ansi2image { }; From 551d7c03299f224e4cfe03babac2455b8dd9a95a Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Wed, 13 Dec 2023 21:42:45 -0800 Subject: [PATCH 2/2] home-assistant: update component packages --- pkgs/servers/home-assistant/component-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 31a389b98200..e9d881978dbd 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -169,7 +169,8 @@ anel-pwrctrl-homeassistant ]; "anova" = ps: with ps; [ - ]; # missing inputs: anova-wifi + anova-wifi + ]; "anthemav" = ps: with ps; [ anthemav ];