{ lib, stdenv, python3, makeWrapper, }: stdenv.mkDerivation { pname = "romarr-mcp"; version = "1.0.0"; src = ./.; nativeBuildInputs = [ makeWrapper ]; dontBuild = true; dontConfigure = true; # Single stdlib-only file: no wheels to vendor, no interpreter to pin beyond # the python3 in nixpkgs. ROMarr's own API is reached over plain HTTP(S). installPhase = '' runHook preInstall mkdir -p $out/lib/romarr-mcp $out/bin install -m644 romarr_mcp.py $out/lib/romarr-mcp/romarr_mcp.py makeWrapper ${python3}/bin/python3 $out/bin/romarr-mcp \ --add-flags "$out/lib/romarr-mcp/romarr_mcp.py" runHook postInstall ''; meta = with lib; { description = "MCP server for ROMarr: library, wanted, queue, indexer search, DAT audit"; homepage = "https://github.com/BlizzHacker/romarr"; license = licenses.mit; mainProgram = "romarr-mcp"; platforms = platforms.all; }; }