blob: 3956bb775654679da7a6987fd1382054d50d1324 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
llm,
# dependencies
click,
ollama,
pydantic,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "llm-ollama";
version = "0.8.2";
pyproject = true;
src = fetchFromGitHub {
owner = "taketwo";
repo = "llm-ollama";
tag = version;
hash = "sha256-/WAugfkI4izIQ7PoKM9epd/4vFxYPvsiwDbEqqTdMq4=";
};
build-system = [
setuptools
# Follows the reasoning from https://github.com/NixOS/nixpkgs/pull/327800#discussion_r1681586659 about including llm in build-system
llm
];
dependencies = [
click
ollama
pydantic
];
nativeCheckInputs = [
pytestCheckHook
];
# These tests try to access the filesystem and fail
disabledTests = [
"test_registered_model"
"test_registered_chat_models"
"test_registered_embedding_models"
"test_registered_models_when_ollama_is_down"
];
pythonImportsCheck = [
"llm_ollama"
];
meta = {
description = "LLM plugin providing access to Ollama models using HTTP API";
homepage = "https://github.com/taketwo/llm-ollama";
changelog = "https://github.com/taketwo/llm-ollama/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [erethon];
};
}
|