From 337540dd05180f322193a5323690e6996a239636 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 30 Nov 2024 23:35:19 +0100 Subject: [PATCH] python312Packages.aiohomeconnect: init at 0.6.0 An asyncio client for the Home Connect API https://github.com/MartinHjelmare/aiohomeconnect --- .../python-modules/aiohomeconnect/default.nix | 67 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/aiohomeconnect/default.nix diff --git a/pkgs/development/python-modules/aiohomeconnect/default.nix b/pkgs/development/python-modules/aiohomeconnect/default.nix new file mode 100644 index 000000000000..5fb81b688288 --- /dev/null +++ b/pkgs/development/python-modules/aiohomeconnect/default.nix @@ -0,0 +1,67 @@ +{ + lib, + authlib, + buildPythonPackage, + fastapi, + fetchFromGitHub, + httpx, + mashumaro, + poetry-core, + pytest-asyncio, + pytest-cov-stub, + pytest-httpx, + pytestCheckHook, + pythonOlder, + typer, + uvicorn, +}: + +buildPythonPackage rec { + pname = "aiohomeconnect"; + version = "0.6.0"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "MartinHjelmare"; + repo = "aiohomeconnect"; + rev = "refs/tags/v${version}"; + hash = "sha256-fPjr4LygYIfSOiVU1yD6ICKkEGJMWOTRrT6oh7DBGTI="; + }; + + pythonRelaxDeps = [ "httpx" ]; + + build-system = [ poetry-core ]; + + dependencies = [ + httpx + mashumaro + ]; + + optional-dependencies = { + cli = [ + authlib + fastapi + typer + uvicorn + ]; + }; + + nativeCheckInputs = [ + pytest-asyncio + pytest-cov-stub + pytest-httpx + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "aiohomeconnect" ]; + + meta = { + description = "An asyncio client for the Home Connect API"; + homepage = "https://github.com/MartinHjelmare/aiohomeconnect"; + changelog = "https://github.com/MartinHjelmare/aiohomeconnect/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 033bb020cc06..d7f5276ff08b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -245,6 +245,8 @@ self: super: with self; { aiohasupervisor = callPackage ../development/python-modules/aiohasupervisor { }; + aiohomeconnect = callPackage ../development/python-modules/aiohomeconnect { }; + aiohomekit = callPackage ../development/python-modules/aiohomekit { }; aiohttp = callPackage ../development/python-modules/aiohttp { };