nixpkgs/pkgs/development/python-modules/llm-openrouter/default.nix
Philip Taron 42fa505cf7 python3Packages.llm-*: use llm in the dependencies
There's no circular dependency problems anymore.
2025-05-31 20:52:40 -07:00

56 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
llm,
llm-openrouter,
httpx,
openai,
pytestCheckHook,
inline-snapshot,
pytest-recording,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "llm-openrouter";
version = "0.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "simonw";
repo = "llm-openrouter";
tag = version;
hash = "sha256-ojBkyXqEaqTcOv7mzTWL5Ihhb50zeVzeQZNA6DySuVg=";
};
build-system = [
setuptools
];
dependencies = [
httpx
llm
openai
];
nativeCheckInputs = [
pytestCheckHook
inline-snapshot
pytest-recording
writableTmpDirAsHomeHook
];
pythonImportsCheck = [ "llm_openrouter" ];
passthru.tests = llm.mkPluginTest llm-openrouter;
meta = {
description = "LLM plugin for models hosted by OpenRouter";
homepage = "https://github.com/simonw/llm-openrouter";
changelog = "https://github.com/simonw/llm-openrouter/releases/tag/${version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ philiptaron ];
};
}