lol

llm-gemini: init at 0.15 (#390715)

authored by

Gaétan Lepage and committed by
GitHub
49b04059 5d928bf4

+83
+59
pkgs/development/python-modules/llm-gemini/default.nix
··· 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 + }: 16 + buildPythonPackage rec { 17 + pname = "llm-gemini"; 18 + version = "0.15"; 19 + pyproject = true; 20 + 21 + src = fetchFromGitHub { 22 + owner = "simonw"; 23 + repo = "llm-gemini"; 24 + tag = version; 25 + hash = "sha256-NNzorEb3dVoKef+9eXzStcFAkQhnhMBVnwLBc2lA2+o="; 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/${version}"; 56 + license = lib.licenses.asl20; 57 + maintainers = with lib.maintainers; [ josh ]; 58 + }; 59 + }
+22
pkgs/development/python-modules/llm-gemini/tests/llm-plugin.nix
··· 1 + { 2 + runCommand, 3 + python, 4 + yq, 5 + }: 6 + let 7 + venv = python.withPackages (ps: [ 8 + ps.llm 9 + ps.llm-gemini 10 + ]); 11 + in 12 + runCommand "llm-gemini-test-llm-plugin" 13 + { 14 + nativeBuildInputs = [ 15 + venv 16 + yq 17 + ]; 18 + } 19 + '' 20 + llm plugins | yq --exit-status 'any(.name == "llm-gemini")' 21 + touch "$out" 22 + ''
+2
pkgs/top-level/python-packages.nix
··· 7818 7818 7819 7819 llm-cmd = callPackage ../development/python-modules/llm-cmd { }; 7820 7820 7821 + llm-gemini = callPackage ../development/python-modules/llm-gemini { }; 7822 + 7821 7823 llm-gguf = callPackage ../development/python-modules/llm-gguf { }; 7822 7824 7823 7825 llm-jq = callPackage ../development/python-modules/llm-jq { };