playwright: 1.58.2 -> 1.59.1 (#514945)
This commit is contained in:
@@ -7,29 +7,38 @@
|
||||
}:
|
||||
buildNpmPackage rec {
|
||||
pname = "playwright-mcp";
|
||||
version = "0.0.56";
|
||||
version = "0.0.69";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Microsoft";
|
||||
repo = "playwright-mcp";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-kfn9vIxmx+dSYKzR5ayGX8RIWd5d8quTAyx4/dC6hIY=";
|
||||
hash = "sha256-zX9RsHVInRib69N4LkG3R4TB5qjlBirpu9BBftcr92I=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-Qsln4llNpfXYXhSEfHnvdsFIF7adHKEyC1eGHtVY2Qk=";
|
||||
npmDepsHash = "sha256-hc5AkUTGoXxXlDW9vPpiO23QOgANJp1lX4xoaySHoK4=";
|
||||
|
||||
# Codex MCP smoke test (after `codex mcp add playwright-nix --env DISPLAY=:0 -- $out/bin/mcp-server-playwright --headless --isolated`):
|
||||
npmWorkspace = "packages/playwright-mcp";
|
||||
|
||||
# Codex MCP smoke test (after `codex mcp add playwright-nix --env DISPLAY=:0 -- $out/bin/playwright-mcp --headless --isolated`):
|
||||
# timeout 45s codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check "Use only playwright-nix MCP tools. Navigate to https://example.com and return only the page title."
|
||||
postInstall = ''
|
||||
rm -rf "$out/lib/node_modules/@playwright/mcp/node_modules/playwright"
|
||||
rm -rf "$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"
|
||||
pkg_dir="$out/lib/node_modules/playwright-mcp-internal"
|
||||
rm -rf "$pkg_dir/node_modules/playwright"
|
||||
rm -rf "$pkg_dir/node_modules/playwright-core"
|
||||
ln -s ${playwright-test}/lib/node_modules/playwright "$pkg_dir/node_modules/playwright"
|
||||
ln -s ${playwright-test}/lib/node_modules/playwright-core "$pkg_dir/node_modules/playwright-core"
|
||||
|
||||
wrapProgram $out/bin/mcp-server-playwright \
|
||||
# Workspace symlinks point to a packages/ tree that npmInstallHook does not
|
||||
# ship; npm hoisted the workspace contents directly into playwright-mcp-internal.
|
||||
rm "$pkg_dir/node_modules/@playwright/mcp"
|
||||
rm "$pkg_dir/node_modules/@playwright/mcp-extension"
|
||||
rm "$pkg_dir/node_modules/playwright-cli"
|
||||
rm "$pkg_dir/node_modules/.bin/playwright-mcp"
|
||||
|
||||
wrapProgram $out/bin/playwright-mcp \
|
||||
--set PLAYWRIGHT_BROWSERS_PATH ${playwright-driver.browsers} \
|
||||
--set-default PLAYWRIGHT_MCP_BROWSER chromium \
|
||||
--run 'if [ -z "$PLAYWRIGHT_MCP_USER_DATA_DIR" ]; then PLAYWRIGHT_MCP_USER_DATA_DIR="$(mktemp -d -t mcp-pw-XXXXXX)"; export PLAYWRIGHT_MCP_USER_DATA_DIR; trap "rm -rf \"$PLAYWRIGHT_MCP_USER_DATA_DIR\"" EXIT; fi'
|
||||
--set-default PLAYWRIGHT_MCP_BROWSER chromium
|
||||
'';
|
||||
|
||||
dontNpmBuild = true;
|
||||
@@ -44,7 +53,7 @@ buildNpmPackage rec {
|
||||
description = "Playwright MCP server";
|
||||
homepage = "https://github.com/Microsoft/playwright-mcp";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "mcp-server-playwright";
|
||||
mainProgram = "playwright-mcp";
|
||||
maintainers = [ lib.maintainers.kalekseev ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -31,14 +31,14 @@ in
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "playwright";
|
||||
# run ./pkgs/development/web/playwright/update.sh to update
|
||||
version = "1.58.0";
|
||||
version = "1.59.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "microsoft";
|
||||
repo = "playwright-python";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-gK19pjB8TDy/kK+fb4pjwlGZlUyY26p+CNxunvIMrrY=";
|
||||
hash = "sha256-CbvVSx/KDaX+CZEJRlDd4GUwWejzjTKNyL4+FhgT6qE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -2,29 +2,31 @@
|
||||
"comment": "This file is kept up to date via update.sh",
|
||||
"browsers": {
|
||||
"chromium": {
|
||||
"revision": "1208",
|
||||
"browserVersion": "145.0.7632.6",
|
||||
"revision": "1217",
|
||||
"browserVersion": "147.0.7727.15",
|
||||
"title": "Chrome for Testing"
|
||||
},
|
||||
"chromium-headless-shell": {
|
||||
"revision": "1208",
|
||||
"browserVersion": "145.0.7632.6",
|
||||
"revision": "1217",
|
||||
"browserVersion": "147.0.7727.15",
|
||||
"title": "Chrome Headless Shell"
|
||||
},
|
||||
"firefox": {
|
||||
"revision": "1509",
|
||||
"browserVersion": "146.0.1",
|
||||
"revision": "1511",
|
||||
"browserVersion": "148.0.2",
|
||||
"title": "Firefox"
|
||||
},
|
||||
"webkit": {
|
||||
"revision": "2248",
|
||||
"revision": "2272",
|
||||
"revisionOverrides": {
|
||||
"mac14": "2251",
|
||||
"mac14-arm64": "2251",
|
||||
"debian11-x64": "2105",
|
||||
"debian11-arm64": "2105",
|
||||
"ubuntu20.04-x64": "2092",
|
||||
"ubuntu20.04-arm64": "2092"
|
||||
},
|
||||
"browserVersion": "26.0",
|
||||
"browserVersion": "26.4",
|
||||
"title": "WebKit"
|
||||
},
|
||||
"ffmpeg": {
|
||||
|
||||
@@ -36,8 +36,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-/xskLzTc9tTZmu1lwkMpjV3QV7XjP92D/7zRcFuVWT8=";
|
||||
aarch64-linux = "sha256-jckH5+eGJ4BhH1NAa5LIgf3/salKLAHW9XUOo5gob4c=";
|
||||
x86_64-linux = "sha256-kQCw0nQHHuUIfn8rGVcN7Ip6ZOk5c3Or+GG5RvSica4=";
|
||||
aarch64-linux = "sha256-s2IIjSY5t9AtT05dUS0mp4fPlaixND9+Cg0+0S8Kkx8=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -72,8 +72,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-bgU7lZhp9XUFfGu58pFdZyhXho3Jiy4MjljR+yk0M1c=";
|
||||
aarch64-darwin = "sha256-45DjMIu0t7IEYdXOmIqpV/1/MKdEfx/8T7DWagh6Zhc=";
|
||||
x86_64-darwin = "sha256-kzbLpzzMpBurQHyGaz561A0K46GzgWPP2JSQKRV6C+Y=";
|
||||
aarch64-darwin = "sha256-67ekk37uq5ITq9ZvwPTZhhqEgQY17g/3KJ/vnqZz3h0=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
@@ -63,8 +63,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-dJSO05xOzlSl/EwOWNQCeuSb+lhUU6NlGBnRu59irnM=";
|
||||
aarch64-linux = "sha256-9DFLCPuc9WZjYLzlRW+Df2pb+mViPK3/IOkkUozELsw=";
|
||||
x86_64-linux = "sha256-GtaJk9Qr1bTbDfpB+noGlLcIDEIS2uzDiV5rb2DZhVQ=";
|
||||
aarch64-linux = "sha256-jsesQ6juzMPQzmn0Ygb8hmpxCeLHJVBL89qto5yuh5s=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -130,8 +130,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-vQuBHM0jkk6S/Gco/bBqSPJqXi/CJt/+nkbGtFNpgwk=";
|
||||
aarch64-darwin = "sha256-qXdgHeBS5IFIa4hZVmjq0+31v/uDPXHyc4aH7Wn2E7E=";
|
||||
x86_64-darwin = "sha256-CxnLSe+sZYskO7H5f3cA+BlWCZsFOPpp1gVG5s37r80=";
|
||||
aarch64-darwin = "sha256-n3JLK+hJwzPihC2qSHrSCYPz3jonZNz7GMgXiPBLaS0=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
@@ -19,20 +19,20 @@ let
|
||||
throwSystem = throw "Unsupported system: ${system}";
|
||||
browsersJSON = (lib.importJSON ./browsers.json).browsers;
|
||||
|
||||
version = "1.58.2";
|
||||
version = "1.59.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Microsoft";
|
||||
repo = "playwright";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-PRA3hjMlnHGVMidhEo371WXRPyVP2W0rle8ONUlKg9Y=";
|
||||
hash = "sha256-kiH1jDyt5xMWc5C2dytoDC9fi1b5tWXZG8S6KEpuotM=";
|
||||
};
|
||||
|
||||
babel-bundle = buildNpmPackage {
|
||||
pname = "babel-bundle";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright/bundles/babel";
|
||||
npmDepsHash = "sha256-MVMxYncmIA4k6h7mLirJaroOSNbCpvKSGxN3BGGqJ9w=";
|
||||
npmDepsHash = "sha256-ByCy4go8PM0ksDg+2DcJPyoKG7Z0uIqKM647ZQwYwAE=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -42,7 +42,7 @@ let
|
||||
pname = "expect-bundle";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright/bundles/expect";
|
||||
npmDepsHash = "sha256-wXy6pkHJusB/WLgNKIPnuY4mTjntOMbrFrQp0UjrqAw=";
|
||||
npmDepsHash = "sha256-PbPCsMqRkfU2c/mCsLSagew84XTgeO6H5+isNZQl2ek=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -52,7 +52,7 @@ let
|
||||
pname = "utils-bundle";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright/bundles/utils";
|
||||
npmDepsHash = "sha256-HzMu3xDb7MleJSsQ1+VvpIFSxcRfnVXniYIv/c5PHRg=";
|
||||
npmDepsHash = "sha256-BTaF1atpK+kG++ZJBUK4r3A7mbN2vv3xpDmb1NiNngE=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -62,7 +62,7 @@ let
|
||||
pname = "utils-bundle-core";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright-core/bundles/utils";
|
||||
npmDepsHash = "sha256-/nxMK+gr4jmxeUazLRXd9LXdYYBVY9VnzbbXoxazX7c=";
|
||||
npmDepsHash = "sha256-O8X80rTT10ht97towSocANnGwH4fH1f3nZMSl8TOc+Y=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -72,7 +72,7 @@ let
|
||||
pname = "zip-bundle";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright-core/bundles/zip";
|
||||
npmDepsHash = "sha256-c0UZ0Jg86icwJp3xarpXpxWjRYeIjz9wpWtJZDHkd8U=";
|
||||
npmDepsHash = "sha256-5BHgCelIPh8ljIcdrO4AHafjqfLowDwJcpN+mD13Syw=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -84,7 +84,7 @@ let
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "${src.name}"; # update.sh depends on sourceRoot presence
|
||||
npmDepsHash = "sha256-kc77z9REuV7b+zHcUzBLf7F2+cbAhzD/kaGxa6xNnGo=";
|
||||
npmDepsHash = "sha256-H3kKFthmZH4fqFPQA34w7iw2rubpEKLlJ9jaW6mpuyo=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
|
||||
@@ -19,8 +19,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-+mwhR8QQ9fs7hD3C4Xn9xcL8LRU+rt2JO8Gcg/KjqRU=";
|
||||
aarch64-linux = "sha256-drL8jduYK0rnmLYW9jzSTKHb0pKaezMnpER5kLikEvY=";
|
||||
x86_64-linux = "sha256-kfXBssU8pJbBqEUQkgpUFXaskx95OyQEYXDhe6cteR8=";
|
||||
aarch64-linux = "sha256-OMPpE0VUgZ65cPOZ7f3sfQMaI++lp6B/RBmhH0E7Y9k=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -42,8 +42,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-uxPOq2U1D9gFXqvNzclctLbHx4fZ9O92GtDQjCRYGiM=";
|
||||
aarch64-darwin = "sha256-ZFRmtlNrzrjB3ELXmGC67XO1IhfWsWZ7rXaUQ6If65s=";
|
||||
x86_64-darwin = "sha256-OfNmamn82tJ8+eY6DC8a3AynmhObZ8E0GTegF8l7km4=";
|
||||
aarch64-darwin = "sha256-WEYhmqGhGvO47i/OICJgXyqj64Wt52juJDEe7nD7HXU=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused common-updater-scripts jq prefetch-npm-deps unzip nix-prefetch
|
||||
#!nix-shell -i bash -p curl gnused common-updater-scripts jq prefetch-npm-deps
|
||||
# shellcheck shell=bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -103,10 +103,19 @@ replace_sha() {
|
||||
prefetch_browser() {
|
||||
local url="$1"
|
||||
local strip_root="$2"
|
||||
local fake="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
local expr
|
||||
local out
|
||||
|
||||
# nix-prefetch is used to obtain sha with `stripRoot = false`
|
||||
# doesn't work on macOS https://github.com/msteen/nix-prefetch/issues/53
|
||||
nix-prefetch --option extra-experimental-features flakes -q "{ stdenv, fetchzip }: stdenv.mkDerivation { name=\"browser\"; src = fetchzip { url = \"$url\"; stripRoot = $strip_root; }; }"
|
||||
# Use real fetchzip via fake-hash trick. nix-prefetch wrapper is broken on
|
||||
# macOS (msteen/nix-prefetch#53), so parse the "got:" line from the
|
||||
# mismatch error of a fixed-output derivation instead.
|
||||
expr="(import \"$repo_root\" {}).fetchzip { url = \"$url\"; stripRoot = $strip_root; hash = \"$fake\"; }"
|
||||
if out=$(nix-build --no-out-link -E "$expr" 2>&1); then
|
||||
echo "prefetch_browser: unexpected build success for $url" >&2
|
||||
return 1
|
||||
fi
|
||||
echo "$out" | grep -Eo 'got:[[:space:]]+sha256-[A-Za-z0-9+/=]+' | awk '{print $NF}' | head -n1
|
||||
}
|
||||
|
||||
browser_download_info() {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
gst_all_1,
|
||||
harfbuzz,
|
||||
harfbuzzFull,
|
||||
hyphen,
|
||||
icu74,
|
||||
lcms,
|
||||
libavif,
|
||||
@@ -120,8 +121,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-Ei08TuR+WedVAfKRSeRQq7ZhULgxXQIV0bQPcNFYhr4=";
|
||||
aarch64-linux = "sha256-/+tven7ksYhXQxPYfazyZhNsgvE8rr3A28fZPwL4c9s=";
|
||||
x86_64-linux = "sha256-BVIZxnnfhBvI737ojRZ+yUX8mcbQ6WOlNdYJ9t4R5yY=";
|
||||
aarch64-linux = "sha256-t9kqUdyOgDXroKp7LWQsaiaRGZVZN3ZdfYLahl5GW2E=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -145,6 +146,7 @@ let
|
||||
gst_all_1.gstreamer
|
||||
harfbuzz
|
||||
harfbuzzFull
|
||||
hyphen
|
||||
icu74
|
||||
lcms
|
||||
libavif
|
||||
@@ -201,8 +203,8 @@ let
|
||||
inherit (download) url stripRoot;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-An3sdw8HltgHQ6YASsxyhoK1fd8PxZ0BBCMpnOORkv8=";
|
||||
aarch64-darwin = "sha256-suXPCuXLMz3xoFxE5+Yjd9OXxLfNDDJiU6O1Ic0PsOI=";
|
||||
x86_64-darwin = "sha256-NjuRZrYzraE1FrPAmyMcQFAS2zWZXYe8cBQVbSU6zFw=";
|
||||
aarch64-darwin = "sha256-9g7YHg+TQNmAE07K6jKSSRUJ7IENUQMp2q54Mk2BbaY=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user