mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 11:03:15 +03:00
77 lines
1.5 KiB
Nix
77 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
pdm-backend,
|
|
|
|
# dependencies
|
|
langchain-core,
|
|
ollama,
|
|
|
|
# testing
|
|
langchain-tests,
|
|
pytestCheckHook,
|
|
pytest-asyncio,
|
|
syrupy,
|
|
|
|
# passthru
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "langchain-ollama";
|
|
version = "0.3.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "langchain-ai";
|
|
repo = "langchain";
|
|
tag = "langchain-ollama==${version}";
|
|
hash = "sha256-YxcxVyiPEZPvO4NyeDp8nTVfbxlOCLClWCmAlL5PPi0=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/libs/partners/ollama";
|
|
|
|
build-system = [
|
|
pdm-backend
|
|
];
|
|
|
|
pythonRelaxDeps = [
|
|
# Each component release requests the exact latest core.
|
|
# That prevents us from updating individual components.
|
|
"langchain-core"
|
|
];
|
|
|
|
dependencies = [
|
|
langchain-core
|
|
ollama
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
langchain-tests
|
|
pytestCheckHook
|
|
pytest-asyncio
|
|
syrupy
|
|
];
|
|
|
|
pytestFlagsArray = [ "tests/unit_tests" ];
|
|
|
|
pythonImportsCheck = [ "langchain_ollama" ];
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"langchain-ollama==([0-9.]+)"
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-ollama==${version}";
|
|
description = "Integration package connecting Ollama and LangChain";
|
|
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/ollama";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ sarahec ];
|
|
};
|
|
}
|