forgot to merge package

This commit is contained in:
TheK0tYaRa 2026-02-14 20:10:05 +02:00
parent afafaa569b
commit 58f967af43

View file

@ -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
];
};
}