1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 filetype, 11 google-api-core, 12 google-auth, 13 google-generativeai, 14 langchain-core, 15 pydantic, 16 17 # tests 18 freezegun, 19 langchain-tests, 20 numpy, 21 pytest-asyncio, 22 pytest-mock, 23 pytestCheckHook, 24 syrupy, 25 26 # passthru 27 gitUpdater, 28}: 29 30buildPythonPackage rec { 31 pname = "langchain-google-genai"; 32 version = "2.1.10"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "langchain-ai"; 37 repo = "langchain-google"; 38 tag = "libs/genai/v${version}"; 39 hash = "sha256-kqII8RG1ep+n5CqKLY1v7Mc+zJh6kl1rAjMmkomfeqM="; 40 }; 41 42 sourceRoot = "${src.name}/libs/genai"; 43 44 build-system = [ poetry-core ]; 45 46 pythonRelaxDeps = [ 47 # Each component release requests the exact latest core. 48 # That prevents us from updating individual components. 49 "langchain-core" 50 ]; 51 52 dependencies = [ 53 filetype 54 google-api-core 55 google-auth 56 google-generativeai 57 langchain-core 58 pydantic 59 ]; 60 61 nativeCheckInputs = [ 62 freezegun 63 langchain-tests 64 numpy 65 pytest-asyncio 66 pytest-mock 67 pytestCheckHook 68 syrupy 69 ]; 70 71 pytestFlagsArray = [ "tests/unit_tests" ]; 72 73 pythonImportsCheck = [ "langchain_google_genai" ]; 74 75 passthru = { 76 # python updater script sets the wrong tag 77 skipBulkUpdate = true; 78 updateScript = gitUpdater { 79 rev-prefix = "libs/genai/v"; 80 }; 81 }; 82 83 meta = { 84 changelog = "https://github.com/langchain-ai/langchain-google/releases/tag/${src.tag}"; 85 description = "LangChain integrations for Google Gemini"; 86 homepage = "https://github.com/langchain-ai/langchain-google/tree/main/libs/genai"; 87 license = lib.licenses.mit; 88 maintainers = [ 89 lib.maintainers.eu90h 90 lib.maintainers.sarahec 91 ]; 92 }; 93}