playwright-mcp: init at 0.0.29
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
playwright-driver,
|
||||
playwright-test,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "playwright-mcp";
|
||||
version = "0.0.29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Microsoft";
|
||||
repo = "playwright-mcp";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-owSoE3+jSg09dFpM5wv7FJovzsX5ZMp/9IIQhkmSZt0=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-jweIBhlVci8CFBIYlFp0opc1ilWMcHt0is4qgTiYNcQ=";
|
||||
|
||||
postInstall = ''
|
||||
rm -r $out/lib/node_modules/@playwright/mcp/node_modules/playwright
|
||||
rm -r $out/lib/node_modules/@playwright/mcp/node_modules/playwright-core
|
||||
ln -s ${playwright-test}/lib/node_modules/playwright $out/lib/node_modules/@playwright/mcp/node_modules/playwright
|
||||
ln -s ${playwright-test}/lib/node_modules/playwright-core $out/lib/node_modules/@playwright/mcp/node_modules/playwright-core
|
||||
|
||||
wrapProgram $out/bin/mcp-server-playwright \
|
||||
--set PLAYWRIGHT_BROWSERS_PATH ${playwright-driver.browsers}
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# Package and playwright driver versions are tightly coupled.
|
||||
skipBulkUpdate = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/Microsoft/playwright-mcp/releases/tag/v${version}";
|
||||
description = "Playwright MCP server";
|
||||
homepage = "https://github.com/Microsoft/playwright-mcp";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "mcp-server-playwright";
|
||||
maintainers = [ lib.maintainers.kalekseev ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user