mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
76 lines
1.6 KiB
Nix
76 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
chromadb,
|
|
langchain-core,
|
|
langchain-tests,
|
|
numpy,
|
|
pdm-backend,
|
|
pytestCheckHook,
|
|
pytest-asyncio,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "langchain-chroma";
|
|
version = "0.2.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "langchain-ai";
|
|
repo = "langchain";
|
|
tag = "langchain-chroma==${version}";
|
|
hash = "sha256-6WOViBKXZ844g2M6pYohHsXnzJiWbTNgj9EjN+z+B+4=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/libs/partners/chroma";
|
|
|
|
patches = [ ./001-async-test.patch ];
|
|
|
|
build-system = [ pdm-backend ];
|
|
|
|
pythonRelaxDeps = [
|
|
# Each component release requests the exact latest core.
|
|
# That prevents us from updating individual components.
|
|
"langchain-core"
|
|
"numpy"
|
|
];
|
|
|
|
dependencies = [
|
|
chromadb
|
|
langchain-core
|
|
numpy
|
|
];
|
|
|
|
pythonImportsCheck = [ "langchain_chroma" ];
|
|
|
|
nativeCheckInputs = [
|
|
langchain-tests
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# Bad integration test, not used or vetted by the langchain team
|
|
"test_chroma_update_document"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"langchain-chroma==([0-9.]+)"
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-chroma==${version}";
|
|
description = "Integration package connecting Chroma and LangChain";
|
|
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/chroma";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
natsukium
|
|
sarahec
|
|
];
|
|
};
|
|
}
|