llm-gemini: init at 0.15 (#390715)

This commit is contained in:
Gaétan Lepage
2025-03-18 07:36:46 +01:00
committed by GitHub
3 changed files with 83 additions and 0 deletions
@@ -0,0 +1,59 @@
{
lib,
callPackage,
buildPythonPackage,
fetchFromGitHub,
setuptools,
llm,
httpx,
ijson,
pytestCheckHook,
pytest-recording,
pytest-asyncio,
nest-asyncio,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "llm-gemini";
version = "0.15";
pyproject = true;
src = fetchFromGitHub {
owner = "simonw";
repo = "llm-gemini";
tag = version;
hash = "sha256-NNzorEb3dVoKef+9eXzStcFAkQhnhMBVnwLBc2lA2+o=";
};
build-system = [
setuptools
];
dependencies = [
llm
httpx
ijson
];
nativeCheckInputs = [
pytestCheckHook
pytest-recording
pytest-asyncio
nest-asyncio
writableTmpDirAsHomeHook
];
pythonImportsCheck = [ "llm_gemini" ];
passthru.tests = {
llm-plugin = callPackage ./tests/llm-plugin.nix { };
};
meta = {
description = "LLM plugin to access Google's Gemini family of models";
homepage = "https://github.com/simonw/llm-gemini";
changelog = "https://github.com/simonw/llm-gemini/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ josh ];
};
}
@@ -0,0 +1,22 @@
{
runCommand,
python,
yq,
}:
let
venv = python.withPackages (ps: [
ps.llm
ps.llm-gemini
]);
in
runCommand "llm-gemini-test-llm-plugin"
{
nativeBuildInputs = [
venv
yq
];
}
''
llm plugins | yq --exit-status 'any(.name == "llm-gemini")'
touch "$out"
''
+2
View File
@@ -7818,6 +7818,8 @@ self: super: with self; {
llm-cmd = callPackage ../development/python-modules/llm-cmd { };
llm-gemini = callPackage ../development/python-modules/llm-gemini { };
llm-gguf = callPackage ../development/python-modules/llm-gguf { };
llm-jq = callPackage ../development/python-modules/llm-jq { };