117 lines
2.8 KiB
Nix
117 lines
2.8 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.8-unstable";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Shelpuk-AI-Technology-Consulting";
|
|
repo = "kindly-web-search-mcp-server";
|
|
rev = "2fd83d28710cce335f610e3d5ed0b403250ab1ba";
|
|
hash = "sha256-sOLx87p+w51wuBOItDdzrsrgItNZ92WivZAv3Zzp16o=";
|
|
};
|
|
|
|
build-system = with python313Packages; [
|
|
hatchling
|
|
];
|
|
|
|
dependencies = with python313Packages; [
|
|
mcp
|
|
pydantic
|
|
httpx
|
|
beautifulsoup4
|
|
markdownify
|
|
nodriver
|
|
pymupdf
|
|
fastmcp
|
|
];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
# 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;
|
|
};
|
|
}
|