From a75ce75e11d3cb23993b4f0f45061526a93d6581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 31 Aug 2024 19:21:52 -0700 Subject: [PATCH] python312Packages.ayla-iot-unofficial: init at 1.3.1 --- .../ayla-iot-unofficial/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/ayla-iot-unofficial/default.nix diff --git a/pkgs/development/python-modules/ayla-iot-unofficial/default.nix b/pkgs/development/python-modules/ayla-iot-unofficial/default.nix new file mode 100644 index 000000000000..de43b8c642ac --- /dev/null +++ b/pkgs/development/python-modules/ayla-iot-unofficial/default.nix @@ -0,0 +1,52 @@ +{ + aiohttp, + buildPythonPackage, + fetchFromGitHub, + lib, + pytest-asyncio, + pytestCheckHook, + requests, + setuptools, + ujson, +}: + +buildPythonPackage rec { + pname = "ayla-iot-unofficial"; + version = "1.3.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "rewardone"; + repo = "ayla-iot-unofficial"; + rev = "refs/tags/v${version}"; + hash = "sha256-WfaDTKht+WEnozVFWGYwNvrC8Rr/IePxjNp5O7jz/9A="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + requests + ujson + ]; + + pythonImportsCheck = [ "ayla_iot_unofficial" ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pytestFlagsArray = [ "tests/ayla_iot_unofficial.py" ]; + + # tests interact with the actual API + doCheck = false; + + meta = { + changelog = "https://github.com/rewardone/ayla-iot-unofficial/releases/tag/v${version}"; + description = "Unofficial python library for interacting with the Ayla IoT API"; + homepage = "https://github.com/rewardone/ayla-iot-unofficial"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f182ff803017..a00c04f3afa4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1110,6 +1110,8 @@ self: super: with self; { axisregistry = callPackage ../development/python-modules/axisregistry { }; + ayla-iot-unofficial = callPackage ../development/python-modules/ayla-iot-unofficial { }; + azure-appconfiguration = callPackage ../development/python-modules/azure-appconfiguration { }; azure-applicationinsights = callPackage ../development/python-modules/azure-applicationinsights { };