diff --git a/pkgs/development/python-modules/aiopnsense/default.nix b/pkgs/development/python-modules/aiopnsense/default.nix new file mode 100644 index 000000000000..19541f5a3c3d --- /dev/null +++ b/pkgs/development/python-modules/aiopnsense/default.nix @@ -0,0 +1,55 @@ +{ + lib, + aiohttp, + awesomeversion, + buildPythonPackage, + fetchFromGitHub, + pytest-asyncio, + pytest-cov-stub, + pytest-timeout, + pytestCheckHook, + python-dateutil, + pythonOlder, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "aiopnsense"; + version = "1.0.8"; + pyproject = true; + + disabled = pythonOlder "3.14"; + + src = fetchFromGitHub { + owner = "Snuffy2"; + repo = "aiopnsense"; + tag = "v${finalAttrs.version}"; + hash = "sha256-pJVYbf81/vZRi5elhNhiscXrEqDRLiIrik8N9GcR6yQ="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + awesomeversion + python-dateutil + ]; + + nativeCheckInputs = [ + aiohttp + pytest-asyncio + pytest-cov-stub + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ "aiopnsense" ]; + + meta = { + description = "Async Python client library for OPNsense"; + homepage = "https://github.com/Snuffy2/aiopnsense"; + changelog = "https://github.com/Snuffy2/aiopnsense/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index e8f5d06f1332..33d1c2c1494d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4652,7 +4652,8 @@ ]; "opnsense" = ps: with ps; [ - ]; # missing inputs: aiopnsense + aiopnsense + ]; "opower" = ps: with ps; [ fnv-hash-fast @@ -8130,6 +8131,7 @@ "opentherm_gw" "openuv" "openweathermap" + "opnsense" "opower" "oralb" "orvibo" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fc801a15e5f5..db2987c015a8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -444,6 +444,8 @@ self: super: with self; { aiopinboard = callPackage ../development/python-modules/aiopinboard { }; + aiopnsense = callPackage ../development/python-modules/aiopnsense { }; + aioprocessing = callPackage ../development/python-modules/aioprocessing { }; aioprometheus = callPackage ../development/python-modules/aioprometheus { };