Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.6 kB · 92 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293{ lib, aiohttp, anyio, buildPythonPackage, dirty-equals, distro, fetchFromGitHub, hatch-fancy-pypi-readme, hatchling, httpx-aiohttp, httpx, nest-asyncio, pydantic, pytest-asyncio, pytest-xdist, pytestCheckHook, respx, sniffio, typing-extensions,}:
buildPythonPackage rec { pname = "groq"; version = "0.30.0"; pyproject = true;
src = fetchFromGitHub { owner = "groq"; repo = "groq-python"; tag = "v${version}"; hash = "sha256-URjfgZC+6YIY7SBfaOmDavQ73YWAqHf9KHunyvniy2E="; };
postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "hatchling==1.26.3" \ "hatchling>=1.26.3" '';
build-system = [ hatch-fancy-pypi-readme hatchling ];
dependencies = [ anyio distro httpx pydantic sniffio typing-extensions ];
optional-dependencies = { aiohttp = [ aiohttp httpx-aiohttp ]; };
nativeCheckInputs = [ dirty-equals nest-asyncio pytest-asyncio pytest-xdist pytestCheckHook respx ] ++ lib.flatten (builtins.attrValues optional-dependencies);
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.tag}/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ fab sarahec ]; };}