From 58f967af43a8eaa44f02394c7d085cc2117dcd58 Mon Sep 17 00:00:00 2001 From: TheK0tYaRa Date: Sat, 14 Feb 2026 20:10:05 +0200 Subject: [PATCH] forgot to merge package --- .../ll/llama-cpp-agent/default.nix | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 custom/pkgs/by-category/python3Packages/ll/llama-cpp-agent/default.nix diff --git a/custom/pkgs/by-category/python3Packages/ll/llama-cpp-agent/default.nix b/custom/pkgs/by-category/python3Packages/ll/llama-cpp-agent/default.nix new file mode 100644 index 0000000..4d776ea --- /dev/null +++ b/custom/pkgs/by-category/python3Packages/ll/llama-cpp-agent/default.nix @@ -0,0 +1,63 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + llama-cpp, + pythonOlder, + pythonRelaxDepsHook, + setuptools, + pyyaml, + requests, + numpy, + jinja2, +}: + +buildPythonPackage rec { + pname = "llama-cpp-agent"; + version = "0.2.35"; # Check for the latest release on GitHub + pyproject = true; + + disabled = pythonOlder "3.9"; + + # Fetch the latest source from GitHub + src = fetchFromGitHub { + owner = "Maximilian-Winter"; + repo = "llama-cpp-agent"; + # Use the latest release tag or commit hash. For the tag 'v0.2.21': + rev = "v${version}"; + hash = "sha256-Z6QDK/5DPidYS/yGz6JC6gPOBvnm7Yc1cNTdCLLT2Fw="; # You MUST update this hash + }; + + # This hook will automatically relax version constraints in `pyproject.toml` if needed + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools + ]; + + # Relax overly strict dependencies, especially for `llama-cpp-python` + pythonRelaxDeps = [ + "llama-cpp-python" + ]; + + propagatedBuildInputs = [ + # The framework requires a llama-cpp-python binding. + # We use the one provided by Nixpkgs, which is built against the system's `llama-cpp`. + llama-cpp.python312Packages.llama-cpp-python # Use the Python version you need (e.g., python311Packages) + pyyaml + requests + numpy + jinja2 + ]; + + # Optional: Run basic tests if available + pythonImportsCheck = [ "llama_cpp_agent" ]; + + meta = with lib; { + description = "A framework for easy interaction with Large Language Models (LLMs), supporting chat, structured function calls, and structured output"; + homepage = "https://github.com/Maximilian-Winter/llama-cpp-agent"; + license = licenses.mit; + maintainers = with maintainers; [ + # You can add your name here + ]; + }; +}