1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build system 7 poetry-core, 8 9 # dependencies 10 langchain-core, 11 msgpack, 12 ormsgpack, 13 14 # testing 15 dataclasses-json, 16 pytest-asyncio, 17 pytest-mock, 18 pytestCheckHook, 19 20 # passthru 21 nix-update-script, 22}: 23 24buildPythonPackage rec { 25 pname = "langgraph-checkpoint"; 26 version = "2.0.26"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "langchain-ai"; 31 repo = "langgraph"; 32 tag = "checkpoint==${version}"; 33 hash = "sha256-DSkjaxUfpsOg2ex0dgfO/UJ7WiQb5wQsAGgHPTckF6o="; 34 }; 35 36 sourceRoot = "${src.name}/libs/checkpoint"; 37 38 build-system = [ poetry-core ]; 39 40 dependencies = [ 41 langchain-core 42 ormsgpack 43 ]; 44 45 propagatedBuildInputs = [ msgpack ]; 46 47 pythonImportsCheck = [ "langgraph.checkpoint" ]; 48 49 nativeCheckInputs = [ 50 dataclasses-json 51 pytest-asyncio 52 pytest-mock 53 pytestCheckHook 54 ]; 55 56 disabledTests = [ 57 # AssertionError 58 "test_serde_jsonplus" 59 ]; 60 61 passthru.updateScript = nix-update-script { 62 extraArgs = [ 63 "--version-regex" 64 "checkpoint==(\\d+\\.\\d+\\.\\d+)" 65 ]; 66 }; 67 68 meta = { 69 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/checkpoint==${version}"; 70 description = "Library with base interfaces for LangGraph checkpoint savers"; 71 homepage = "https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint"; 72 license = lib.licenses.mit; 73 maintainers = with lib.maintainers; [ 74 drupol 75 sarahec 76 ]; 77 }; 78}