1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build system
7 hatchling,
8
9 # dependencies
10 aiosqlite,
11 langgraph-checkpoint,
12 sqlite-vec,
13
14 # testing
15 pytest-asyncio,
16 pytestCheckHook,
17 sqlite,
18
19 # passthru
20 gitUpdater,
21}:
22
23buildPythonPackage rec {
24 pname = "langgraph-checkpoint-sqlite";
25 version = "2.0.11";
26 pyproject = true;
27
28 src = fetchFromGitHub {
29 owner = "langchain-ai";
30 repo = "langgraph";
31 tag = "checkpointsqlite==${version}";
32 hash = "sha256-v/gRYkiS4AR1epWwPdG/QYbnUYte894kHTn5F58pVGI=";
33 };
34
35 sourceRoot = "${src.name}/libs/checkpoint-sqlite";
36
37 build-system = [ hatchling ];
38
39 dependencies = [
40 aiosqlite
41 langgraph-checkpoint
42 sqlite-vec
43 ];
44
45 pythonRelaxDeps = [
46 "aiosqlite"
47
48 # Bug: version is showing up as 0.0.0
49 # https://github.com/NixOS/nixpkgs/issues/427197
50 "sqlite-vec"
51
52 # Checkpoint clients are lagging behind langgraph-checkpoint
53 "langgraph-checkpoint"
54 ];
55
56 pythonImportsCheck = [ "langgraph.checkpoint.sqlite" ];
57
58 nativeCheckInputs = [
59 pytest-asyncio
60 pytestCheckHook
61 sqlite
62 ];
63
64 disabledTestPaths = [
65 # Failed: 'flaky' not found in `markers` configuration option
66 "tests/test_ttl.py"
67 ];
68
69 disabledTests = [
70 # AssertionError: (fails object comparison due to extra runtime fields)
71 # https://github.com/langchain-ai/langgraph/issues/5604
72 "test_combined_metadata"
73 "test_asearch"
74 "test_search"
75 ];
76
77 passthru = {
78 # python updater script sets the wrong tag
79 skipBulkUpdate = true;
80 updateScript = gitUpdater {
81 rev-prefix = "checkpointsqlite==";
82 };
83 };
84
85 meta = {
86 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${src.tag}";
87 description = "Library with a SQLite implementation of LangGraph checkpoint saver";
88 homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-sqlite";
89 license = lib.licenses.mit;
90 maintainers = with lib.maintainers; [
91 sarahec
92 ];
93 };
94}