{pkgs,lib,...}:letclaude=letinherit(pkgs)fetchFromGitHubnix-update-scriptpython3Packages;inherit(python3Packages)buildPythonPackagesetuptoolsanthropicllmpytestCheckHookpytestpytest-recording;inbuildPythonPackagerec{pname="llm-claude-3";version="0.4";pyproject=true;src=fetchFromGitHub{owner="simonw";repo="llm-claude-3";rev="refs/tags/${version}";hash="sha256-5qF5BK319PNzB4XsLdYvtyq/SxBDdHJ9IoKWEnvNRp4=";};build-system=[setuptools];buildInputs=[llm];dependencies=[anthropic];optional-dependencies={test=[pytestpytest-recording];};# Test suite requires network access to talk to Claude (duh).nativeCheckInputs=[pytestCheckHook];doCheck=false;pythonImportsCheck=["llm_claude_3"];passthru.updateScript=nix-update-script{};meta={description="LLM plugin for interacting with the Claude 3 family of models";homepage="https://github.com/simonw/llm-claude-3";license=lib.licenses.asl20;maintainers=withlib.maintainers;[jkachmar];};};pyWithPackages=(pkgs.python3.withPackages(py:[py.llmclaude]));in{home.packages=[(pkgs.runCommand"llm"{}''
mkdir -p $out/bin
ln -s ${pyWithPackages}/bin/llm $out/bin/llm
'')];}