Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 google-ai-generativelanguage, 6 google-api-core, 7 google-api-python-client, 8 google-auth, 9 protobuf, 10 pydantic, 11 pythonOlder, 12 setuptools, 13 tqdm, 14 typing-extensions, 15}: 16 17buildPythonPackage rec { 18 pname = "google-generativeai"; 19 version = "0.7.2"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "google"; 26 repo = "generative-ai-python"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-KVKoPCpMaaVMU6VqYXD7vHmhv1AS5slRobRVDDuaDHc="; 29 }; 30 31 pythonRelaxDeps = [ "google-ai-generativelanguage" ]; 32 33 build-system = [ setuptools ]; 34 35 36 dependencies = [ 37 google-ai-generativelanguage 38 google-api-core 39 google-api-python-client 40 google-auth 41 protobuf 42 pydantic 43 tqdm 44 typing-extensions 45 ]; 46 47 # Issue with the google.ai module. Check with the next release 48 doCheck = false; 49 50 pythonImportsCheck = [ "google.generativeai" ]; 51 52 meta = with lib; { 53 description = "Python client library for Google's large language model PaLM API"; 54 homepage = "https://github.com/google/generative-ai-python"; 55 changelog = "https://github.com/google/generative-ai-python/releases/tag/v${version}"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}