nixpkgs/pkgs/development/python-modules/langchain-chroma/default.nix
Peder Bergebakken Sundt c77ac9dfc3 treewide: fix typos
2025-06-02 16:07:07 +02:00

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