diff options
Diffstat (limited to 'pkgs/development/python-modules/cohere/default.nix')
-rw-r--r-- | pkgs/development/python-modules/cohere/default.nix | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/pkgs/development/python-modules/cohere/default.nix b/pkgs/development/python-modules/cohere/default.nix index 26deb98e3d45..a7a7758656ae 100644 --- a/pkgs/development/python-modules/cohere/default.nix +++ b/pkgs/development/python-modules/cohere/default.nix @@ -1,39 +1,45 @@ -{ lib -, buildPythonPackage -, fetchPypi -, poetry-core -, pythonOlder -, fastavro -, httpx -, httpx-sse -, pydantic -, requests -, tokenizers -, types-requests -, typing-extensions +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + poetry-core, + + # dependencies + fastavro, + httpx, + httpx-sse, + parameterized, + pydantic, + pydantic-core, + requests, + tokenizers, + types-requests, + typing-extensions, }: buildPythonPackage rec { pname = "cohere"; - version = "5.3.3"; + version = "5.11.3"; pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-+/WcC6sN7U0oCR+gwZOhFtgwPEwLCaQnId2KEjDqJ8M="; + src = fetchFromGitHub { + owner = "cohere-ai"; + repo = "cohere-python"; + rev = "refs/tags/${version}"; + hash = "sha256-0Y/zSw2pdrwsYpBctiV/tVf2xPhf3jG7c18frSjBass="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; dependencies = [ fastavro httpx httpx-sse + parameterized pydantic + pydantic-core requests tokenizers types-requests @@ -43,15 +49,13 @@ buildPythonPackage rec { # tests require CO_API_KEY doCheck = false; - pythonImportsCheck = [ - "cohere" - ]; + pythonImportsCheck = [ "cohere" ]; - meta = with lib; { + meta = { description = "Simplify interfacing with the Cohere API"; homepage = "https://docs.cohere.com/docs"; changelog = "https://github.com/cohere-ai/cohere-python/releases/tag/${version}"; - license = licenses.mit; - maintainers = with maintainers; [ natsukium ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ natsukium ]; }; } |