2025-05-08 12:08:19 -07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
llm,
|
2025-05-08 16:27:03 -07:00
|
|
|
llm-grok,
|
2025-05-08 12:08:19 -07:00
|
|
|
httpx,
|
|
|
|
httpx-sse,
|
|
|
|
rich,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-httpx,
|
|
|
|
writableTmpDirAsHomeHook,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "llm-grok";
|
|
|
|
version = "1.0.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Hiepler";
|
|
|
|
repo = "llm-grok";
|
|
|
|
tag = "v${version}";
|
|
|
|
hash = "sha256-OeeU/53XKucLCtGvnl5RWc/QqF0TprB/SO8pnnK5fdw=";
|
|
|
|
};
|
|
|
|
|
2025-05-30 17:13:35 -07:00
|
|
|
build-system = [ setuptools ];
|
2025-05-08 12:08:19 -07:00
|
|
|
|
|
|
|
dependencies = [
|
2025-05-30 17:13:35 -07:00
|
|
|
llm
|
2025-05-08 12:08:19 -07:00
|
|
|
httpx
|
|
|
|
httpx-sse
|
|
|
|
rich
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-httpx
|
|
|
|
writableTmpDirAsHomeHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "llm_grok" ];
|
|
|
|
|
2025-05-08 16:27:03 -07:00
|
|
|
passthru.tests = llm.mkPluginTest llm-grok;
|
2025-05-08 12:08:19 -07:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "LLM plugin providing access to Grok models using the xAI API";
|
|
|
|
homepage = "https://github.com/Hiepler/llm-grok";
|
|
|
|
changelog = "https://github.com/Hiepler/llm-grok/releases/tag/${src.tag}/CHANGELOG.md";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ philiptaron ];
|
|
|
|
};
|
|
|
|
}
|