summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/llm-llama-server/default.nix
blob: 4ea9f73c5a97b4ef570b6512b8161d323780d764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  llm,
  llm-llama-server,
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "llm-llama-server";
  version = "0.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "simonw";
    repo = "llm-llama-server";
    tag = version;
    hash = "sha256-jtFSfGu3JhNUfTsspY+OFLTMt9jQrh6R05sK9KBOKTE=";
  };

  build-system = [ setuptools ];

  dependencies = [ llm ];

  nativeCheckInputs = [
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  pythonImportsCheck = [ "llm_llama_server" ];

  passthru.tests = llm.mkPluginTest llm-llama-server;

  meta = {
    description = "LLM plugin for interacting with llama-server models";
    homepage = "https://github.com/simonw/llm-llama-server";
    changelog = "https://github.com/simonw/llm-llama-server/releases/tag/${version}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ philiptaron ];
  };
}