Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, poetry-core 5, pythonOlder 6, requests 7, aiohttp 8, backoff 9}: 10 11buildPythonPackage rec { 12 pname = "cohere"; 13 version = "4.5.1"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-+/oeZpYyCrQava0lEt5uLlSc65XaBCyI/G/lwAxfBTA="; 21 }; 22 23 nativeBuildInputs = [ 24 poetry-core 25 ]; 26 27 propagatedBuildInputs = [ 28 requests 29 aiohttp 30 backoff 31 ]; 32 33 # tests require CO_API_KEY 34 doCheck = false; 35 36 pythonImportsCheck = [ 37 "cohere" 38 ]; 39 40 meta = with lib; { 41 description = "Simplify interfacing with the Cohere API"; 42 homepage = "https://docs.cohere.com/docs"; 43 changelog = "https://github.com/cohere-ai/cohere-python/blob/main/CHANGELOG.md#${builtins.replaceStrings ["."] [""] version}"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ natsukium ]; 46 }; 47}