Files
mcp-servers/packages/kindly-web-search-mcp-server/package.nix
T
luis 471a7b4fbf
NixOS Configuration CI / Nix Flake Check (push) Successful in 8s
update
2026-09-23 12:04:12 +02:00

126 lines
3.2 KiB
Nix

{
lib,
python313Packages,
fetchFromGitHub,
fetchPypi,
makeWrapper,
chromium,
}:
let
# Inline dependency: markdownify (not in nixpkgs)
# Converts HTML to Markdown
markdownify = python313Packages.buildPythonPackage rec {
pname = "markdownify";
version = "1.2.2";
format = "wheel";
src = fetchPypi {
inherit pname version;
format = "wheel";
dist = "py3";
python = "py3";
hash = "sha256-PwLTzFJxQITW5Yn3A5e2/J8vOoUxSBvzXozDn5deGGo=";
};
propagatedBuildInputs = with python313Packages; [
beautifulsoup4
six
];
doCheck = false;
pythonImportsCheck = [ "markdownify" ];
meta = with lib; {
description = "Convert HTML to Markdown";
homepage = "https://github.com/matthewwithanm/python-markdownify";
license = licenses.mit;
};
};
# Inline dependency: nodriver (not in nixpkgs)
# Headless browser automation without webdriver
nodriver = python313Packages.buildPythonPackage rec {
pname = "nodriver";
version = "0.48.1";
format = "wheel";
src = fetchPypi {
inherit pname version;
format = "wheel";
dist = "py3";
python = "py3";
hash = "sha256-2UtJ/WyoMf0lRt7h452Fuqlg9SU29G4dx+jcs46Ngro=";
};
propagatedBuildInputs = with python313Packages; [
mss
websockets
deprecated
];
doCheck = false;
pythonImportsCheck = [ "nodriver" ];
meta = with lib; {
description = "Web automation without webdriver";
homepage = "https://github.com/ultrafunkamsterdam/nodriver";
license = licenses.mit;
};
};
in
python313Packages.buildPythonApplication rec {
pname = "kindly-web-search-mcp-server";
version = "0.1.9-unstable";
pyproject = true;
src = fetchFromGitHub {
owner = "Shelpuk-AI-Technology-Consulting";
repo = "kindly-web-search-mcp-server";
rev = "52a4e480d8041f8d4f388cee1ddecbd8e1ab01c7";
hash = "sha256-Mf3PMUic3XiNkiABRy6DrEhoGwcqq/xThU4ROO4S8dY=";
};
build-system = with python313Packages; [
hatchling
];
dependencies = with python313Packages; [
mcp
pydantic
httpx
beautifulsoup4
markdownify
nodriver
pymupdf
fastmcp
trafilatura
starlette
uvicorn
];
nativeBuildInputs = [ makeWrapper ];
# Upstream pins floors newer than nixpkgs currently ships (starlette 1.6,
# pydantic 2.13, beautifulsoup4 4.15, trafilatura 2.2, ...). The APIs this
# server actually uses are present in the nixpkgs versions, so the strict
# runtime-deps floor check is skipped here.
dontCheckRuntimeDeps = true;
# Wrap with Chromium path for headless browser content extraction
postInstall = ''
wrapProgram $out/bin/kindly-web-search-mcp-server \
--set KINDLY_BROWSER_EXECUTABLE_PATH "${chromium}/bin/chromium"
'';
pythonImportsCheck = [ "kindly_web_search_mcp_server" ];
meta = with lib; {
description = "Web search + robust content retrieval MCP server for AI coding tools";
homepage = "https://github.com/Shelpuk-AI-Technology-Consulting/kindly-web-search-mcp-server";
license = licenses.mit;
mainProgram = "kindly-web-search-mcp-server";
platforms = platforms.linux ++ platforms.darwin;
};
}