1{ 2 lib, 3 callPackage, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 llm, 8 httpx, 9 ijson, 10 pytestCheckHook, 11 pytest-recording, 12 pytest-asyncio, 13 nest-asyncio, 14 writableTmpDirAsHomeHook, 15}: 16buildPythonPackage rec { 17 pname = "llm-gemini"; 18 version = "0.19.1"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "simonw"; 23 repo = "llm-gemini"; 24 tag = version; 25 hash = "sha256-znN+4hhQNDvDy6Wzad9TpR1m1i6tOPvWrCdCocaf8N8="; 26 }; 27 28 build-system = [ 29 setuptools 30 ]; 31 32 dependencies = [ 33 llm 34 httpx 35 ijson 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 pytest-recording 41 pytest-asyncio 42 nest-asyncio 43 writableTmpDirAsHomeHook 44 ]; 45 46 pythonImportsCheck = [ "llm_gemini" ]; 47 48 passthru.tests = { 49 llm-plugin = callPackage ./tests/llm-plugin.nix { }; 50 }; 51 52 meta = { 53 description = "LLM plugin to access Google's Gemini family of models"; 54 homepage = "https://github.com/simonw/llm-gemini"; 55 changelog = "https://github.com/simonw/llm-gemini/releases/tag/${src.tag}"; 56 license = lib.licenses.asl20; 57 maintainers = with lib.maintainers; [ josh ]; 58 }; 59}