All checks were successful
CI / Flake Check (push) Successful in 41s
CI / Build Individual Packages (academic-search-mcp-server) (push) Successful in 55s
CI / Build Individual Packages (duckduckgo-mcp-server) (push) Successful in 50s
CI / Build Individual Packages (kindly-web-search-mcp-server) (push) Successful in 1m27s
CI / Build Individual Packages (manim-mcp-server) (push) Successful in 1m5s
CI / Build Individual Packages (pdf-reader-mcp) (push) Successful in 1m3s
CI / Build Individual Packages (zotero-mcp) (push) Successful in 1m25s
CI / Build Individual Packages (rust-research-mcp) (push) Successful in 6m40s
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
python3,
|
|
}:
|
|
|
|
let
|
|
python = python3.withPackages (
|
|
ps: with ps; [
|
|
fastapi
|
|
fastmcp
|
|
httpx
|
|
python-dotenv
|
|
]
|
|
);
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "sabnzbd-mcp";
|
|
version = "0.1.0-unstable";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jmagar";
|
|
repo = "sabnzbd-mcp";
|
|
rev = "refs/heads/main";
|
|
hash = "sha256-1sEnHH40cDVT5oiZD2Xywl7S9vJThii/ce+6r+XmpSw=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postPatch = ''
|
|
# The upstream client hardcodes /sabnzbd/api as the API path.
|
|
# Change to just /api so SABNZBD_URL can optionally include the path prefix
|
|
# (e.g. http://host:9092/sabnzbd or just http://host:9092).
|
|
substituteInPlace client.py \
|
|
--replace-fail '"{self.base_url}/sabnzbd/api"' '"{self.base_url}/api"'
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/sabnzbd-mcp
|
|
cp sabnzbd-mcp-server.py client.py $out/lib/sabnzbd-mcp/
|
|
|
|
makeWrapper ${python}/bin/python $out/bin/sabnzbd-mcp \
|
|
--add-flags "$out/lib/sabnzbd-mcp/sabnzbd-mcp-server.py" \
|
|
--set-default SABNZBD_MCP_TRANSPORT stdio
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "MCP server for SABnzbd Usenet client";
|
|
homepage = "https://github.com/jmagar/sabnzbd-mcp";
|
|
license = licenses.mit;
|
|
mainProgram = "sabnzbd-mcp";
|
|
platforms = platforms.all;
|
|
};
|
|
}
|