pdf-reader-mcp
This commit is contained in:
@@ -14,5 +14,6 @@
|
||||
# Add new packages here:
|
||||
academic-search-mcp-server = pkgs.callPackage ./academic-search-mcp-server/package.nix { };
|
||||
zotero-mcp = pkgs.callPackage ./zotero-mcp/package.nix { };
|
||||
pdf-reader-mcp = pkgs.callPackage ./pdf-reader-mcp/package.nix { };
|
||||
# example-mcp-server = pkgs.callPackage ./example-mcp-server/package.nix { };
|
||||
}
|
||||
|
||||
43
packages/pdf-reader-mcp/package.nix
Normal file
43
packages/pdf-reader-mcp/package.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
# NOTE: This package uses a wrapper approach because the upstream project
|
||||
# uses bun.lock instead of package-lock.json, which buildNpmPackage requires.
|
||||
# The wrapper invokes npx to run the package with its dependencies.
|
||||
# For a fully offline/reproducible build, upstream would need to provide
|
||||
# a package-lock.json file.
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
nodejs_22,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "pdf-reader-mcp";
|
||||
version = "2.2.0";
|
||||
|
||||
# No source needed - we use npx to fetch and run the package
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
# Create wrapper that uses npx to run the package
|
||||
# npx will cache the package after first run
|
||||
makeWrapper ${nodejs_22}/bin/npx $out/bin/${pname} \
|
||||
--add-flags "--yes" \
|
||||
--add-flags "@sylphx/pdf-reader-mcp@${version}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Production-ready MCP server for PDF processing with parallel processing";
|
||||
homepage = "https://github.com/SylphxAI/pdf-reader-mcp";
|
||||
license = licenses.mit;
|
||||
mainProgram = "pdf-reader-mcp";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user