1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build system
7 hatchling,
8
9 # dependencies
10 langchain-core,
11 msgpack,
12 ormsgpack,
13
14 # testing
15 dataclasses-json,
16 numpy,
17 pandas,
18 pytest-asyncio,
19 pytest-mock,
20 pytestCheckHook,
21
22 # passthru
23 gitUpdater,
24}:
25
26buildPythonPackage rec {
27 pname = "langgraph-checkpoint";
28 version = "2.1.1";
29 pyproject = true;
30
31 src = fetchFromGitHub {
32 owner = "langchain-ai";
33 repo = "langgraph";
34 tag = "checkpoint==${version}";
35 hash = "sha256-UY3AChShKfOrtOQzOm5vi3Yy3rlBc+TAje9L2L6My/U=";
36 };
37
38 sourceRoot = "${src.name}/libs/checkpoint";
39
40 build-system = [ hatchling ];
41
42 dependencies = [
43 langchain-core
44 ormsgpack
45 ];
46
47 propagatedBuildInputs = [ msgpack ];
48
49 pythonImportsCheck = [ "langgraph.checkpoint" ];
50
51 nativeCheckInputs = [
52 dataclasses-json
53 numpy
54 pandas
55 pytest-asyncio
56 pytest-mock
57 pytestCheckHook
58 ];
59
60 disabledTests = [
61 # assert 1.0000000000000004 == 1.0000000000000002
62 # https://github.com/langchain-ai/langgraph/issues/5845
63 "test_embed_with_path"
64 ];
65
66 passthru = {
67 # python updater script sets the wrong tag
68 skipBulkUpdate = true;
69 updateScript = gitUpdater {
70 rev-prefix = "checkpoint==";
71 };
72 };
73
74 meta = {
75 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
76 description = "Library with base interfaces for LangGraph checkpoint savers";
77 homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint";
78 license = lib.licenses.mit;
79 maintainers = with lib.maintainers; [
80 sarahec
81 ];
82 };
83}