Files
nixpkgs/pkgs/development/python-modules/langchain-anthropic/default.nix
T
2025-12-29 14:15:17 -08:00

84 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
anthropic,
langchain-core,
pydantic,
# tests
blockbuster,
langchain,
langchain-tests,
pytest-asyncio,
pytestCheckHook,
# passthru
gitUpdater,
}:
buildPythonPackage rec {
pname = "langchain-anthropic";
version = "1.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain";
tag = "langchain-anthropic==${version}";
hash = "sha256-/CqnpeQXYdafkly8shen72dIZU3I9o/2TwM903Nw9DA=";
};
sourceRoot = "${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/${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
];
};
}