1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 llm,
7 llm-llama-server,
8 pytestCheckHook,
9 writableTmpDirAsHomeHook,
10}:
11
12buildPythonPackage rec {
13 pname = "llm-llama-server";
14 version = "0.2";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "simonw";
19 repo = "llm-llama-server";
20 tag = version;
21 hash = "sha256-jtFSfGu3JhNUfTsspY+OFLTMt9jQrh6R05sK9KBOKTE=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [ llm ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 writableTmpDirAsHomeHook
31 ];
32
33 pythonImportsCheck = [ "llm_llama_server" ];
34
35 passthru.tests = llm.mkPluginTest llm-llama-server;
36
37 meta = {
38 description = "LLM plugin for interacting with llama-server models";
39 homepage = "https://github.com/simonw/llm-llama-server";
40 changelog = "https://github.com/simonw/llm-llama-server/releases/tag/${version}/CHANGELOG.md";
41 license = lib.licenses.asl20;
42 maintainers = with lib.maintainers; [ philiptaron ];
43 };
44}