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