diff --git a/pkgs/development/python-modules/python-open-router/default.nix b/pkgs/development/python-modules/python-open-router/default.nix new file mode 100644 index 000000000000..76abdf1da097 --- /dev/null +++ b/pkgs/development/python-modules/python-open-router/default.nix @@ -0,0 +1,55 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + aiohttp, + yarl, + mashumaro, + orjson, + pytestCheckHook, + pytest-asyncio, + pytest-cov-stub, + aioresponses, + syrupy, +}: + +buildPythonPackage rec { + pname = "python-open-router"; + version = "0.3.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "joostlek"; + repo = "python-open-router"; + tag = "v${version}"; + hash = "sha256-EoLBlgXKrAo2DKOuLGvN3MbWIJIG+Ehtznegnq3VX44="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + aiohttp + yarl + mashumaro + orjson + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + pytest-cov-stub + aioresponses + syrupy + ]; + + pythonImportsCheck = [ "python_open_router" ]; + + meta = { + description = "Asynchronous Python client for Open Router"; + homepage = "https://github.com/joostlek/python-open-router"; + changelog = "https://github.com/joostlek/python-open-router/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index fcb31858a7ee..cf6aa4f9f917 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4176,7 +4176,8 @@ openai pymicro-vad pyspeex-noise - ]; # missing inputs: python-open-router + python-open-router + ]; "openai_conversation" = ps: with ps; [ ha-ffmpeg @@ -7438,6 +7439,7 @@ "onkyo" "onvif" "open_meteo" + "open_router" "openai_conversation" "openalpr_cloud" "openerz" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4e9f5f12e5c3..44f6ae2d6caf 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14739,6 +14739,8 @@ self: super: with self; { python-on-whales = callPackage ../development/python-modules/python-on-whales { }; + python-open-router = callPackage ../development/python-modules/python-open-router { }; + python-opendata-transport = callPackage ../development/python-modules/python-opendata-transport { }; python-openems = callPackage ../development/python-modules/python-openems { };