From 7534a77bb6a1d8236acc94cd654d97952ba1e361 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Feb 2024 08:56:34 +0100 Subject: [PATCH] python311Packages.aioautomower: int at 2024.2.4 Module to communicate with the Automower Connect API https://github.com/Thomas55555/aioautomower --- .../python-modules/aioautomower/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/aioautomower/default.nix diff --git a/pkgs/development/python-modules/aioautomower/default.nix b/pkgs/development/python-modules/aioautomower/default.nix new file mode 100644 index 000000000000..239d8ba1e7dd --- /dev/null +++ b/pkgs/development/python-modules/aioautomower/default.nix @@ -0,0 +1,61 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, mashumaro +, poetry-core +, pyjwt +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "aioautomower"; + version = "2024.2.4"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "Thomas55555"; + repo = "aioautomower"; + rev = "refs/tags/${version}"; + hash = "sha256-bgNfV87rHMbNGy8azCS0b6PgkalY2RrbSW2VtjtgPrw="; + }; + + postPatch = '' + # Upstream doesn't set a version + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${version}"' + ''; + + nativeBuildInputs = [ + poetry-core + setuptools + ]; + + propagatedBuildInputs = [ + aiohttp + mashumaro + pyjwt + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aioautomower" + ]; + + meta = with lib; { + description = "Module to communicate with the Automower Connect API"; + homepage = "https://github.com/Thomas55555/aioautomower"; + changelog = "https://github.com/Thomas55555/aioautomower/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9c483e790da8..4c9527eb677f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -167,6 +167,8 @@ self: super: with self; { aioasuswrt = callPackage ../development/python-modules/aioasuswrt { }; + aioautomower = callPackage ../development/python-modules/aioautomower { }; + aioazuredevops = callPackage ../development/python-modules/aioazuredevops { }; aiobafi6 = callPackage ../development/python-modules/aiobafi6 { };