1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 click, 11 12 # testing 13 pytest-asyncio, 14 pytestCheckHook, 15 docker-compose, 16 17 # passthru 18 nix-update-script, 19}: 20 21buildPythonPackage rec { 22 pname = "langgraph-cli"; 23 version = "0.2.10"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "langchain-ai"; 28 repo = "langgraph"; 29 tag = "cli==${version}"; 30 hash = "sha256-gSiyFjk1lXiCv7JpX4J00WAPoMv4VsXDuCswbFhP2kY="; 31 }; 32 33 sourceRoot = "${src.name}/libs/cli"; 34 35 build-system = [ poetry-core ]; 36 37 dependencies = [ click ]; 38 39 nativeCheckInputs = [ 40 pytest-asyncio 41 pytestCheckHook 42 docker-compose 43 ]; 44 45 pytestFlagsArray = [ "tests/unit_tests" ]; 46 47 pythonImportsCheck = [ "langgraph_cli" ]; 48 49 disabledTests = [ 50 # Flaky tests that generate a Docker configuration then compare to exact text 51 "test_config_to_docker_simple" 52 "test_config_to_docker_pipconfig" 53 "test_config_to_compose_env_vars" 54 "test_config_to_compose_env_file" 55 "test_config_to_compose_end_to_end" 56 "test_config_to_compose_simple_config" 57 "test_config_to_compose_watch" 58 # Tests exit value, needs to happen in a passthru test 59 "test_dockerfile_command_with_docker_compose" 60 ]; 61 62 passthru.updateScript = nix-update-script { 63 extraArgs = [ 64 "--version-regex" 65 "cli==(\\d+\\.\\d+\\.\\d+)" 66 ]; 67 }; 68 69 meta = { 70 description = "Official CLI for LangGraph API"; 71 homepage = "https://github.com/langchain-ai/langgraph/libs/cli"; 72 changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}"; 73 mainProgram = "langgraph"; 74 license = lib.licenses.mit; 75 maintainers = with lib.maintainers; [ sarahec ]; 76 }; 77}