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