Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 aiosqlite, 5 dataclasses-json, 6 fetchFromGitHub, 7 grandalf, 8 httpx, 9 langchain-core, 10 langgraph-sdk, 11 langsmith, 12 poetry-core, 13 pydantic, 14 pytest-asyncio, 15 pytest-mock, 16 pytest-xdist, 17 pytestCheckHook, 18 pythonOlder, 19 syrupy, 20}: 21 22buildPythonPackage rec { 23 pname = "langgraph"; 24 version = "0.1.9"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.10"; 28 29 src = fetchFromGitHub { 30 owner = "langchain-ai"; 31 repo = "langgraph"; 32 rev = "refs/tags/${version}"; 33 hash = "sha256-sBjSfKzcILkHgvo8g/NHC+/yUjQSyZB/8xaSCY3rPDs="; 34 }; 35 36 sourceRoot = "${src.name}/libs/langgraph"; 37 38 build-system = [ poetry-core ]; 39 40 dependencies = [ langchain-core ]; 41 42 pythonImportsCheck = [ "langgraph" ]; 43 44 nativeCheckInputs = [ 45 aiosqlite 46 dataclasses-json 47 grandalf 48 httpx 49 langsmith 50 pydantic 51 pytest-asyncio 52 pytest-mock 53 pytest-xdist 54 pytestCheckHook 55 syrupy 56 ]; 57 58 pytestFlagsArray = [ "--snapshot-update" ]; 59 60 disabledTests = [ 61 "test_doesnt_warn_valid_schema" # test is flaky due to pydantic error on the exception 62 ]; 63 64 passthru = { 65 updateScript = langgraph-sdk.updateScript; 66 }; 67 68 meta = { 69 description = "Build resilient language agents as graphs"; 70 homepage = "https://github.com/langchain-ai/langgraph"; 71 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}"; 72 license = lib.licenses.mit; 73 maintainers = with lib.maintainers; [ sarahec ]; 74 }; 75}