diff --git a/packages/sabnzbd-mcp/package.nix b/packages/sabnzbd-mcp/package.nix index 68fe310..dc0a562 100644 --- a/packages/sabnzbd-mcp/package.nix +++ b/packages/sabnzbd-mcp/package.nix @@ -29,6 +29,14 @@ stdenv.mkDerivation { 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/