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