1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 poetry-core,
8
9 # dependencies
10 langchain-core,
11 numpy,
12 pymongo,
13
14 freezegun,
15 httpx,
16 langchain,
17 pytest-asyncio,
18 pytestCheckHook,
19 pytest-mock,
20 syrupy,
21}:
22
23buildPythonPackage rec {
24 pname = "langchain-mongodb";
25 version = "0.2.0";
26 pyproject = true;
27
28 src = fetchFromGitHub {
29 owner = "langchain-ai";
30 repo = "langchain";
31 rev = "refs/tags/langchain-mongodb==${version}";
32 hash = "sha256-Jd9toXkS9dGtSIrJQ/5W+swV1z2BJOJKBtkyGzj3oSc=";
33 };
34
35 sourceRoot = "${src.name}/libs/partners/mongodb";
36
37 build-system = [ poetry-core ];
38
39 dependencies = [
40 langchain-core
41 numpy
42 pymongo
43 ];
44
45 nativeCheckInputs = [
46 freezegun
47 httpx
48 langchain
49 pytest-asyncio
50 pytestCheckHook
51 pytest-mock
52 syrupy
53 ];
54
55 pytestFlagsArray = [ "tests/unit_tests" ];
56
57 pythonImportsCheck = [ "langchain_mongodb" ];
58
59 passthru = {
60 inherit (langchain-core) updateScript;
61 };
62
63 meta = {
64 changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-mongodb==${version}";
65 description = "Integration package connecting MongoDB and LangChain";
66 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/mongodb";
67 license = lib.licenses.mit;
68 maintainers = with lib.maintainers; [
69 natsukium
70 sarahec
71 ];
72 };
73}