about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cohere/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cohere/default.nix')
-rw-r--r--pkgs/development/python-modules/cohere/default.nix32
1 files changed, 22 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/cohere/default.nix b/pkgs/development/python-modules/cohere/default.nix
index b71784091607f..43180319f7e9a 100644
--- a/pkgs/development/python-modules/cohere/default.nix
+++ b/pkgs/development/python-modules/cohere/default.nix
@@ -1,13 +1,20 @@
 {
   lib,
   buildPythonPackage,
-  fetchPypi,
-  poetry-core,
   pythonOlder,
+  fetchFromGitHub,
+
+  # build-system
+  poetry-core,
+
+  # dependencies
+  boto3,
   fastavro,
   httpx,
   httpx-sse,
+  parameterized,
   pydantic,
+  pydantic-core,
   requests,
   tokenizers,
   types-requests,
@@ -16,23 +23,28 @@
 
 buildPythonPackage rec {
   pname = "cohere";
-  version = "5.3.4";
+  version = "5.8.1";
   pyproject = true;
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-tFoshbAl3RU2fWm/knSN5KMOyCq7Swj6UwG3LokFH+I=";
+  src = fetchFromGitHub {
+    owner = "cohere-ai";
+    repo = "cohere-python";
+    rev = "refs/tags/${version}";
+    hash = "sha256-IU+6X2lyH+5SeWSfzogLLj0D5t1rRwkNbb8AyaaIxnA=";
   };
 
   build-system = [ poetry-core ];
 
   dependencies = [
+    boto3
     fastavro
     httpx
     httpx-sse
+    parameterized
     pydantic
+    pydantic-core
     requests
     tokenizers
     types-requests
@@ -44,11 +56,11 @@ buildPythonPackage rec {
 
   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 ];
   };
 }