From a83af8d3ddf34dcd06dae248aa2ec38882b9560a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 5 Feb 2024 10:05:53 +0100 Subject: [PATCH 1/2] python311Packages.aioapcaccess: init at 0.4.2 Module for working with apcaccess https://github.com/yuxincs/aioapcaccess --- .../python-modules/aioapcaccess/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/aioapcaccess/default.nix diff --git a/pkgs/development/python-modules/aioapcaccess/default.nix b/pkgs/development/python-modules/aioapcaccess/default.nix new file mode 100644 index 000000000000..373324848222 --- /dev/null +++ b/pkgs/development/python-modules/aioapcaccess/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, setuptools +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "aioapcaccess"; + version = "0.4.2"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "yuxincs"; + repo = "aioapcaccess"; + rev = "refs/tags/v${version}"; + hash = "sha256-Ig9aQduM9wby3DzPjvbubihopwhdMXHovMo3Id47mRk="; + }; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aioapcaccess" + ]; + + meta = with lib; { + description = "Module for working with apcaccess"; + homepage = "https://github.com/yuxincs/aioapcaccess"; + changelog = "https://github.com/yuxincs/aioapcaccess/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 c46adcf249fd..d5b4cf6e8455 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -153,6 +153,8 @@ self: super: with self; { aioambient = callPackage ../development/python-modules/aioambient { }; + aioapcaccess = callPackage ../development/python-modules/aioapcaccess { }; + aioapns = callPackage ../development/python-modules/aioapns { }; aiocron = callPackage ../development/python-modules/aiocron { }; From eef2539c595dcb26c761e859a129d9c66ca1aa36 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 5 Feb 2024 10:07:30 +0100 Subject: [PATCH 2/2] 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 a00b6523d995..0a1764705709 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -188,7 +188,8 @@ aiokafka ]; "apcupsd" = ps: with ps; [ - ]; # missing inputs: aioapcaccess + aioapcaccess + ]; "api" = ps: with ps; [ aiohttp-cors aiohttp-fast-url-dispatcher @@ -5751,6 +5752,7 @@ "anova" "anthemav" "apache_kafka" + "apcupsd" "api" "apple_tv" "application_credentials"