nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 83 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 hatchling, 8 9 # dependencies 10 anthropic, 11 langchain-core, 12 pydantic, 13 14 # tests 15 blockbuster, 16 langchain, 17 langchain-tests, 18 pytest-asyncio, 19 pytestCheckHook, 20 21 # passthru 22 gitUpdater, 23}: 24 25buildPythonPackage (finalAttrs: { 26 pname = "langchain-anthropic"; 27 version = "1.3.4"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "langchain-ai"; 32 repo = "langchain"; 33 tag = "langchain-anthropic==${finalAttrs.version}"; 34 hash = "sha256-8dGP26N2aheMTtI2wYMBVitlzrTsJZa5Zt5xVl+vqI4="; 35 }; 36 37 sourceRoot = "${finalAttrs.src.name}/libs/partners/anthropic"; 38 39 build-system = [ hatchling ]; 40 41 dependencies = [ 42 anthropic 43 langchain-core 44 pydantic 45 ]; 46 47 nativeCheckInputs = [ 48 blockbuster 49 langchain 50 langchain-tests 51 pytest-asyncio 52 pytestCheckHook 53 ]; 54 55 enabledTestPaths = [ 56 "tests/unit_tests" 57 ]; 58 59 disabledTests = [ 60 # Fails when langchain-core gets ahead of this 61 "test_serdes" 62 ]; 63 64 pythonImportsCheck = [ "langchain_anthropic" ]; 65 66 passthru = { 67 # python updater script sets the wrong tag 68 skipBulkUpdate = true; 69 updateScript = gitUpdater { 70 rev-prefix = "langchain-anthropic=="; 71 }; 72 }; 73 74 meta = { 75 changelog = "https://github.com/langchain-ai/langchain-anthropic/releases/tag/${finalAttrs.src.tag}"; 76 description = "Build LangChain applications with Anthropic"; 77 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/anthropic"; 78 license = lib.licenses.mit; 79 maintainers = [ 80 lib.maintainers.sarahec 81 ]; 82 }; 83})