59 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
jsonref,
langchain,
langgraph,
llama-index,
mcp,
pytest-asyncio,
pytestCheckHook,
python-dotenv,
smolagents,
}:
buildPythonPackage rec {
pname = "mcpadapt";
version = "0.1.10";
pyproject = true;
src = fetchFromGitHub {
owner = "grll";
repo = "mcpadapt";
tag = "v${version}";
hash = "sha256-605e28p1rlJ5teCLxL/Lh8p5zV7cPuSzZWwfkE1gM5I=";
};
build-system = [ hatchling ];
dependencies = [
jsonref
mcp
python-dotenv
];
optional-dependencies = {
langchain = [
langchain
# langchain-anthropic
langgraph
];
llamaindex = [ llama-index ];
};
pythonImportsCheck = [ "mcpadapt" ];
# Circular dependency smolagents
doCheck = false;
meta = {
description = "MCP servers tool";
homepage = "https://github.com/grll/mcpadapt";
changelog = "https://github.com/grll/mcpadapt/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}