1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 httpx,
11 llama-cpp-python,
12 llm,
13}:
14
15buildPythonPackage rec {
16 pname = "llm-gguf";
17 version = "0.2";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "simonw";
22 repo = "llm-gguf";
23 tag = version;
24 hash = "sha256-ihMOiQnTfgZKICVDoQHLOMahrd+GiB+HwWFBMyIcs0A=";
25 };
26
27 build-system = [
28 setuptools
29 ];
30
31 dependencies = [
32 httpx
33 llama-cpp-python
34 llm
35 ];
36
37 pythonImportsCheck = [ "llm_gguf" ];
38
39 # Tests require internet access (downloading models)
40 doCheck = false;
41
42 meta = {
43 description = "Run models distributed as GGUF files using LLM";
44 homepage = "https://github.com/simonw/llm-gguf";
45 changelog = "https://github.com/simonw/llm-gguf/releases/tag/${src.tag}";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [ GaetanLepage ];
48 };
49}