mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
84 lines
1.6 KiB
Nix
84 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
|
|
# build-system
|
|
poetry-core,
|
|
|
|
# dependencies
|
|
langchain-core,
|
|
numpy,
|
|
pymongo,
|
|
|
|
freezegun,
|
|
httpx,
|
|
langchain,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
pytest-mock,
|
|
syrupy,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "langchain-mongodb";
|
|
version = "0.2.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "langchain-ai";
|
|
repo = "langchain";
|
|
tag = "langchain-mongodb==${version}";
|
|
hash = "sha256-Jd9toXkS9dGtSIrJQ/5W+swV1z2BJOJKBtkyGzj3oSc=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/libs/partners/mongodb";
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
pythonRelaxDeps = [
|
|
# Each component release requests the exact latest core.
|
|
# That prevents us from updating individual components.
|
|
"langchain-core"
|
|
"numpy"
|
|
];
|
|
|
|
dependencies = [
|
|
langchain-core
|
|
numpy
|
|
pymongo
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
httpx
|
|
langchain
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
pytest-mock
|
|
syrupy
|
|
];
|
|
|
|
pytestFlagsArray = [ "tests/unit_tests" ];
|
|
|
|
pythonImportsCheck = [ "langchain_mongodb" ];
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"^langchain-mongodb==([0-9.]+)$"
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-mongodb==${version}";
|
|
description = "Integration package connecting MongoDB and LangChain";
|
|
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/mongodb";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
natsukium
|
|
sarahec
|
|
];
|
|
};
|
|
}
|