42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildNpmPackage,
|
|
fetchzip,
|
|
autoPatchelfHook,
|
|
stdenv,
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "pdf-reader-mcp";
|
|
version = "4.1.3";
|
|
|
|
src = fetchzip {
|
|
url = "https://registry.npmjs.org/@sylphx/pdf-reader-mcp/-/pdf-reader-mcp-${version}.tgz";
|
|
hash = "sha256-oxEL7lwEJdhPoA4p/HiQeMp9TP7al1z2KpiPTUPqn6c=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-3XohzskNUMGkIgZvQie9DA8DfHxJZGD86n+uVZPxMdg=";
|
|
|
|
# The runtime launcher spawns a prebuilt Rust binary shipped in the matching
|
|
# optional platform package. On Linux it is dynamically linked against glibc,
|
|
# so its interpreter and RPATH must be patched for NixOS.
|
|
nativeBuildInputs = lib.optional stdenv.isLinux autoPatchelfHook;
|
|
|
|
buildInputs = lib.optional stdenv.isLinux stdenv.cc.cc.lib;
|
|
|
|
postPatch = ''
|
|
cp ${./package-lock.json} package-lock.json
|
|
'';
|
|
|
|
# dist/ and the native Rust binary ship prebuilt; there is no build step.
|
|
dontNpmBuild = true;
|
|
|
|
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;
|
|
};
|
|
}
|