diff --git a/pkgs/development/python-modules/groq/default.nix b/pkgs/development/python-modules/groq/default.nix new file mode 100644 index 000000000000..8828f79a8c04 --- /dev/null +++ b/pkgs/development/python-modules/groq/default.nix @@ -0,0 +1,71 @@ +{ + lib, + anyio, + buildPythonPackage, + dirty-equals, + distro, + fetchFromGitHub, + hatch-fancy-pypi-readme, + hatchling, + httpx, + nest-asyncio, + pydantic, + pytest-asyncio, + pytestCheckHook, + respx, + sniffio, + typing-extensions, +}: + +buildPythonPackage rec { + pname = "groq"; + version = "0.13.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "groq"; + repo = "groq-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-EkEXXHca4DJtY1joM1E4IXzaQzJL+QC+aYaTe46EWlE="; + }; + + build-system = [ + hatch-fancy-pypi-readme + hatchling + ]; + + dependencies = [ + anyio + distro + httpx + pydantic + sniffio + typing-extensions + ]; + + nativeCheckInputs = [ + dirty-equals + nest-asyncio + pytest-asyncio + pytestCheckHook + respx + ]; + + pythonImportsCheck = [ "groq" ]; + + disabledTests = [ + # Tests require network access + "test_method" + "test_streaming" + "test_raw_response" + "test_copy_build_request" + ]; + + meta = { + description = "Library for the Groq API"; + homepage = "https://github.com/groq/groq-python"; + changelog = "https://github.com/groq/groq-python/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 c1682fcddad1..93718e43dc2c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5576,6 +5576,8 @@ self: super: with self; { greynoise = callPackage ../development/python-modules/greynoise { }; + groq = callPackage ../development/python-modules/groq { }; + growattserver = callPackage ../development/python-modules/growattserver { }; gridnet = callPackage ../development/python-modules/gridnet { };