1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 langgraph-checkpoint,
6 aiosqlite,
7 pytest-asyncio,
8 pytestCheckHook,
9 langgraph-sdk,
10 poetry-core,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "langgraph-checkpoint-sqlite";
16 version = "2.0.1";
17 pyproject = true;
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchFromGitHub {
22 owner = "langchain-ai";
23 repo = "langgraph";
24 tag = "checkpointsqlite==${version}";
25 hash = "sha256-dh+cjcOp6rGFntz82VNfVyetcrQBdBFdXk5xFb0aR5c=";
26 };
27
28 sourceRoot = "${src.name}/libs/checkpoint-sqlite";
29
30 build-system = [ poetry-core ];
31
32 dependencies = [
33 aiosqlite
34 langgraph-checkpoint
35 ];
36
37 # Checkpoint clients are lagging behind langgraph-checkpoint
38 pythonRelaxDeps = [ "langgraph-checkpoint" ];
39
40 pythonImportsCheck = [ "langgraph.checkpoint.sqlite" ];
41
42 nativeCheckInputs = [
43 pytest-asyncio
44 pytestCheckHook
45 ];
46
47 passthru = {
48 updateScript = langgraph-sdk.updateScript;
49 };
50
51 meta = {
52 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpointsqlite==${version}";
53 description = "Library with a SQLite implementation of LangGraph checkpoint saver";
54 homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-sqlite";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [
57 drupol
58 sarahec
59 ];
60 };
61}