1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 llm, 7 llm-anthropic, 8 anthropic, 9 pytestCheckHook, 10 pytest-asyncio, 11 pytest-recording, 12 writableTmpDirAsHomeHook, 13}: 14 15buildPythonPackage rec { 16 pname = "llm-anthropic"; 17 version = "0.18"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "simonw"; 22 repo = "llm-anthropic"; 23 tag = version; 24 hash = "sha256-eyB68wPc4ALnEypUXN20ru7UfS6yKLp2NJohH3Av9Ls="; 25 }; 26 27 build-system = [ 28 setuptools 29 ]; 30 31 dependencies = [ 32 anthropic 33 llm 34 ]; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 pytest-asyncio 39 pytest-recording 40 writableTmpDirAsHomeHook 41 ]; 42 43 pythonImportsCheck = [ "llm_anthropic" ]; 44 45 passthru.tests = llm.mkPluginTest llm-anthropic; 46 47 meta = { 48 description = "LLM access to models by Anthropic, including the Claude series"; 49 homepage = "https://github.com/simonw/llm-anthropic"; 50 changelog = "https://github.com/simonw/llm-anthropic/releases/tag/${src.tag}/CHANGELOG.md"; 51 license = lib.licenses.asl20; 52 maintainers = with lib.maintainers; [ aos ]; 53 }; 54}