Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768{ lib, anyio, buildPythonPackage, fetchFromGitHub, hatchling, mcp, pytest-asyncio, pytest-cov-stub, pytestCheckHook, sniffio, typing-extensions,}:
buildPythonPackage (finalAttrs: { pname = "claude-agent-sdk"; version = "0.2.180"; pyproject = true;
src = fetchFromGitHub { owner = "anthropics"; repo = "claude-agent-sdk-python"; tag = "v${finalAttrs.version}"; hash = "sha256-ZUQXWm2q2I9tO2PrDrPKu/IZvkQz/kembHu+wwAXYEY="; };
build-system = [ hatchling ];
dependencies = [ anyio mcp sniffio typing-extensions ];
nativeCheckInputs = [ anyio pytestCheckHook pytest-asyncio pytest-cov-stub ] ++ anyio.passthru.optional-dependencies.trio;
pythonImportsCheck = [ "claude_agent_sdk" ];
disabledTests = [ # Code not available "test_query_with_async_iterable" # Tests require claude code with is non-free "test_ceiling_closes_stdin_when_idle_never_comes" "test_caller_who_opted_in_sees_the_frames" "test_follow_up_turn_is_served_and_sdk_frames_stay_hidden" ];
disabledTestPaths = [ # Tests require claude code with is non-free "tests/test_close_cancellation.py" ];
meta = { description = "Python SDK for Claude Agent"; homepage = "https://github.com/anthropics/claude-agent-sdk-python"; changelog = "https://github.com/anthropics/claude-agent-sdk-python/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; };})