{ lib, buildPythonPackage, fetchFromGitHub, # build-system hatchling, # dependencies anthropic, langchain-core, pydantic, # tests blockbuster, langchain, langchain-tests, pytest-asyncio, pytestCheckHook, # passthru gitUpdater, }: buildPythonPackage (finalAttrs: { pname = "langchain-anthropic"; version = "1.3.4"; pyproject = true; src = fetchFromGitHub { owner = "langchain-ai"; repo = "langchain"; tag = "langchain-anthropic==${finalAttrs.version}"; hash = "sha256-8dGP26N2aheMTtI2wYMBVitlzrTsJZa5Zt5xVl+vqI4="; }; sourceRoot = "${finalAttrs.src.name}/libs/partners/anthropic"; build-system = [ hatchling ]; dependencies = [ anthropic langchain-core pydantic ]; nativeCheckInputs = [ blockbuster langchain langchain-tests pytest-asyncio pytestCheckHook ]; enabledTestPaths = [ "tests/unit_tests" ]; disabledTests = [ # Fails when langchain-core gets ahead of this "test_serdes" ]; pythonImportsCheck = [ "langchain_anthropic" ]; passthru = { # python updater script sets the wrong tag skipBulkUpdate = true; updateScript = gitUpdater { rev-prefix = "langchain-anthropic=="; }; }; meta = { changelog = "https://github.com/langchain-ai/langchain-anthropic/releases/tag/${finalAttrs.src.tag}"; description = "Build LangChain applications with Anthropic"; homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/anthropic"; license = lib.licenses.mit; maintainers = [ lib.maintainers.sarahec ]; }; })