Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / google-generativeai / default.nix
blob69c9180ce4237308712c47a3cddd23b86cb9279e
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , google-ai-generativelanguage
5 , google-api-core
6 , google-auth
7 , protobuf
8 , pythonOlder
9 , pythonRelaxDepsHook
10 , tqdm
13 buildPythonPackage rec {
14   pname = "google-generativeai";
15   version = "0.2.2";
16   format = "setuptools";
18   disabled = pythonOlder "3.9";
20   src = fetchFromGitHub {
21     owner = "google";
22     repo = "generative-ai-python";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-WiDoeScro7TcW5nQBmLpVQriL6IzR9CAVqBj36nqivk=";
25   };
27   pythonRelaxDeps = [
28     "google-ai-generativelanguage"
29   ];
31   nativeBuildInputs = [
32     pythonRelaxDepsHook
33   ];
35   propagatedBuildInputs = [
36     google-ai-generativelanguage
37     google-auth
38     google-api-core
39     protobuf
40     tqdm
41   ];
43   # Issue with the google.ai module. Check with the next release
44   doCheck = false;
46   pythonImportsCheck = [
47     "google.generativeai"
48   ];
50   meta = with lib; {
51     description = "Python client library for Google's large language model PaLM API";
52     homepage = "https://github.com/google/generative-ai-python";
53     changelog = "https://github.com/google/generative-ai-python/releases/tag/v${version}";
54     license = licenses.asl20;
55     maintainers = with maintainers; [ fab ];
56   };