Skip to content

Commit e462a75

Browse files
kalekseevteto
authored andcommitted
playwright: 1.50.0 -> 1.52.0
1 parent 0a955a5 commit e462a75

File tree

8 files changed

+46
-33
lines changed

8 files changed

+46
-33
lines changed

pkgs/development/python-modules/playwright/default.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ in
2222
buildPythonPackage rec {
2323
pname = "playwright";
2424
# run ./pkgs/development/python-modules/playwright/update.sh to update
25-
version = "1.50.0";
25+
version = "1.52.0";
2626
pyproject = true;
2727
disabled = pythonOlder "3.9";
2828

2929
src = fetchFromGitHub {
3030
owner = "microsoft";
3131
repo = "playwright-python";
3232
tag = "v${version}";
33-
hash = "sha256-g32QwEA4Ofzh7gVEsC++uA/XqT1eIrUH+fQi15SRxko=";
33+
hash = "sha256-8hl+5kIORq9uwYbf9354iqlL0RIkhTnokzQXoYFr5AI=";
3434
};
3535

3636
patches = [
@@ -51,9 +51,7 @@ buildPythonPackage rec {
5151
git config --global user.name "nixpkgs"
5252
git commit -m "workaround setuptools-scm"
5353
54-
substituteInPlace pyproject.toml \
55-
--replace-fail 'requires = ["setuptools==75.6.0", "setuptools-scm==8.1.0", "wheel==0.45.1", "auditwheel==6.2.0"]' \
56-
'requires = ["setuptools", "setuptools-scm", "wheel"]'
54+
sed -i -e 's/requires = \["setuptools==.*", "setuptools-scm==.*", "wheel==.*", "auditwheel==.*"\]/requires = ["setuptools", "setuptools-scm", "wheel"]/' pyproject.toml
5755
5856
# setup.py downloads and extracts the driver.
5957
# This is done manually in postInstall instead.

pkgs/development/python-modules/playwright/update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ replace_sha() {
3232
prefetch_browser() {
3333
# nix-prefetch is used to obtain sha with `stripRoot = false`
3434
# doesn't work on macOS https://github.com/msteen/nix-prefetch/issues/53
35-
nix-prefetch -q "{ stdenv, fetchzip }: stdenv.mkDerivation { name=\"browser\"; src = fetchzip { url = \"$1\"; stripRoot = $2; }; }"
35+
nix-prefetch --option extra-experimental-features flakes -q "{ stdenv, fetchzip }: stdenv.mkDerivation { name=\"browser\"; src = fetchzip { url = \"$1\"; stripRoot = $2; }; }"
3636
}
3737

3838
update_browser() {

pkgs/development/web/playwright/browsers.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
"comment": "This file is kept up to date via update.sh",
33
"browsers": {
44
"chromium": {
5-
"revision": "1155",
6-
"browserVersion": "133.0.6943.16"
5+
"revision": "1169",
6+
"browserVersion": "136.0.7103.25"
7+
},
8+
"chromium-headless-shell": {
9+
"revision": "1169",
10+
"browserVersion": "136.0.7103.25"
711
},
812
"firefox": {
9-
"revision": "1471",
10-
"browserVersion": "134.0"
13+
"revision": "1482",
14+
"browserVersion": "137.0"
1115
},
1216
"webkit": {
13-
"revision": "2123",
17+
"revision": "2158",
1418
"revisionOverrides": {
1519
"debian11-x64": "2105",
1620
"debian11-arm64": "2105",
@@ -20,10 +24,12 @@
2024
"mac11-arm64": "1816",
2125
"mac12": "2009",
2226
"mac12-arm64": "2009",
27+
"mac13": "2140",
28+
"mac13-arm64": "2140",
2329
"ubuntu20.04-x64": "2092",
2430
"ubuntu20.04-arm64": "2092"
2531
},
26-
"browserVersion": "18.2"
32+
"browserVersion": "18.4"
2733
},
2834
"ffmpeg": {
2935
"revision": "1011",

pkgs/development/web/playwright/chromium-headless-shell.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ let
3030
stripRoot = false;
3131
hash =
3232
{
33-
x86_64-linux = "sha256-UNLSiI9jWLev2YwqiXuoHwJfdB4teNhEfQjQRBEo8uY=";
34-
aarch64-linux = "sha256-aVGLcJHFER09frJdKsGW/pKPl5MXoXef2hy5WTA8rS4=";
33+
x86_64-linux = "sha256-WCn3j9JnKqGJoQ4X2FWdghha/AxusqCYTCL0sEpA2pM=";
34+
aarch64-linux = "sha256-IIz4E4ylXU5e4XAyqOI6yXc680Lb5bFze0VRuB8Wwck=";
3535
}
3636
.${system} or throwSystem;
3737
};
@@ -66,8 +66,8 @@ let
6666
stripRoot = false;
6767
hash =
6868
{
69-
x86_64-darwin = "sha256-c26ubAgM9gQPaYqobQyS3Y7wvMUmmdpDlrYmZJrUgho=";
70-
aarch64-darwin = "sha256-XRFqlhVx+GuDxz/kDP8TtyPQfR0JbFD0qu5OSywGTX8=";
69+
x86_64-darwin = "sha256-346DDhORd+wGchEpU3Tf3DSwlo8fejomgSUqmF/HmA4=";
70+
aarch64-darwin = "sha256-3WMfwOVlap5HxLzalg8+TTlsyda/HPabJMM0T31UKlE=";
7171
}
7272
.${system} or throwSystem;
7373
};

pkgs/development/web/playwright/chromium.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ let
3434
stripRoot = false;
3535
hash =
3636
{
37-
x86_64-darwin = "sha256-seMHD+TmxrfgsN6sLN2Bp3WgAooDnlSxGN6CPw1Q790=";
38-
aarch64-darwin = "sha256-SsIRzxTIuf/mwsYvRM2mv8PzWQAAflxOyoK5TuyhMAU=";
37+
x86_64-darwin = "sha256-IJxCYtHTOtBxQdGbiLz+PODQL4rmBn4WXNJ3QNr0D/I=";
38+
aarch64-darwin = "sha256-6QP1OY1krhcfMf5rNzbd55W/Wg02LnbqaU7aKWhJ7qM=";
3939
}
4040
.${system} or throwSystem;
4141
};

pkgs/development/web/playwright/driver.nix

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ let
2727
}
2828
.${system} or throwSystem;
2929

30-
version = "1.50.1";
30+
version = "1.52.0";
3131

3232
src = fetchFromGitHub {
3333
owner = "Microsoft";
3434
repo = "playwright";
3535
rev = "v${version}";
36-
hash = "sha256-s4lJRdsA4H+Uf9LjriZ6OimBl5A9Pf4fvhWDw2kOMkg=";
36+
hash = "sha256-+2ih1tZHqbNtyabtYi1Sd3f9Qs3Is8zUMNBt6Lo2IKs=";
3737
};
3838

3939
babel-bundle = buildNpmPackage {
4040
pname = "babel-bundle";
4141
inherit version src;
4242
sourceRoot = "${src.name}/packages/playwright/bundles/babel";
43-
npmDepsHash = "sha256-HrDTkP2lHl2XKD8aGpmnf6YtSe/w9UePH5W9QfbaoMg=";
43+
npmDepsHash = "sha256-sdl+rMCmuOmY1f7oSfGuAAFCiPCFzqkQtFCncL4o5LQ=";
4444
dontNpmBuild = true;
4545
installPhase = ''
4646
cp -r . "$out"
@@ -70,7 +70,7 @@ let
7070
pname = "utils-bundle-core";
7171
inherit version src;
7272
sourceRoot = "${src.name}/packages/playwright-core/bundles/utils";
73-
npmDepsHash = "sha256-TarWFVp5JFCKZIvBUTohzzsFaLZHV79lN5+G9+rCP8Y=";
73+
npmDepsHash = "sha256-3hdOmvs/IGAgW7vhldms9Q9/ZQfbjbc+xP+JEtGJ7g8=";
7474
dontNpmBuild = true;
7575
installPhase = ''
7676
cp -r . "$out"
@@ -92,9 +92,12 @@ let
9292
inherit version src;
9393

9494
sourceRoot = "${src.name}"; # update.sh depends on sourceRoot presence
95-
npmDepsHash = "sha256-RoKw3Ie41/4DsjCeqkMhKFyjDPuvMgxajZYZhRdiTuY=";
95+
npmDepsHash = "sha256-Os/HvvL+CFFb2sM+EDdxF2hN28Sg7oy3vBBfkIipkqs=";
9696

97-
nativeBuildInputs = [ cacert ];
97+
nativeBuildInputs = [
98+
cacert
99+
jq
100+
];
98101

99102
ELECTRON_SKIP_BINARY_DOWNLOAD = true;
100103

@@ -127,6 +130,12 @@ let
127130
mkdir -p "$out/lib/node_modules/playwright"
128131
cp -r packages/playwright/!(bundles|src|node_modules|.*) "$out/lib/node_modules/playwright"
129132
133+
# for not supported platforms (such as NixOS) playwright assumes that it runs on ubuntu-20.04
134+
# that forces it to use overridden webkit revision
135+
# let's remove that override to make it use latest revision provided in Nixpkgs
136+
# https://github.com/microsoft/playwright/blob/baeb065e9ea84502f347129a0b896a85d2a8dada/packages/playwright-core/src/server/utils/hostPlatform.ts#L111
137+
jq '(.browsers[] | select(.name == "webkit") | .revisionOverrides) |= del(."ubuntu20.04-x64", ."ubuntu20.04-arm64")' \
138+
packages/playwright-core/browsers.json > browser.json.tmp && mv browser.json.tmp packages/playwright-core/browsers.json
130139
mkdir -p "$out/lib/node_modules/playwright-core"
131140
cp -r packages/playwright-core/!(bundles|src|bin|.*) "$out/lib/node_modules/playwright-core"
132141
@@ -197,7 +206,7 @@ let
197206
{
198207
withChromium ? true,
199208
withFirefox ? true,
200-
withWebkit ? true,
209+
withWebkit ? true, # may require `export PLAYWRIGHT_HOST_PLATFORM_OVERRIDE="ubuntu-24.04"`
201210
withFfmpeg ? true,
202211
withChromiumHeadlessShell ? true,
203212
fontconfig_file ? makeFontsConf {

pkgs/development/web/playwright/firefox.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ let
1717
}.zip";
1818
hash =
1919
{
20-
x86_64-linux = "sha256-53DXgD/OzGo7fEp/DBX1TiBBpFSHwiluqBji6rFKTtE=";
21-
aarch64-linux = "sha256-CBg2PgAXU1ZWUob73riEkQmn/EmIqhvOgBPSAphkAyM=";
20+
x86_64-linux = "sha256-tZ5rDLVzNaGILydgGbSOjtgfoRx0DWesZMmW0X8Pphc=";
21+
aarch64-linux = "sha256-2NOK02C2APHVh4gVrQygrazGUJzJXH/3uOYDoyIn7fU=";
2222
}
2323
.${system} or throwSystem;
2424
};
@@ -41,8 +41,8 @@ let
4141
stripRoot = false;
4242
hash =
4343
{
44-
x86_64-darwin = "sha256-GbrbNMFv1dT8Duo2otoZvmZk4Sgj81aRNwPAGKkRlnI=";
45-
aarch64-darwin = "sha256-/e51eJTCqr8zEeWWJNS2UgPT9Y+a33Dj619JkCVVeRs=";
44+
x86_64-darwin = "sha256-2j59mGvDiHMwmUQQFRVhToCooBdIGkF5s9iuXrVenHU=";
45+
aarch64-darwin = "sha256-L7ffypyrX8qSCXksNxnihEZaV+wChoggGIcCuqosXzA=";
4646
}
4747
.${system} or throwSystem;
4848
};

pkgs/development/web/playwright/webkit.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ let
126126
stripRoot = false;
127127
hash =
128128
{
129-
x86_64-linux = "sha256-jw/wQ2Ql7KNpquz5CK+Mo6nPcCbMf8jeSQT64Vt/sLs=";
130-
aarch64-linux = "sha256-vKAvl1kMxTE4CsDryseWF5lxf2iYOYkHHXAdPCnfnHk=";
129+
x86_64-linux = "sha256-kGTfPFosn8BsBDo9boJWgkPtdAig8+Ffv3Q4eYPy5ls=";
130+
aarch64-linux = "sha256-9NFR3j8M9i3Gk/LCwK+LRpKzJsTt3w2VHGmsGtsoKJU=";
131131
}
132132
.${system} or throwSystem;
133133
};
@@ -201,8 +201,8 @@ let
201201
stripRoot = false;
202202
hash =
203203
{
204-
x86_64-darwin = "sha256-6GpzcA77TthcZEtAC7s3dVpnLk31atw7EPxKUZeC5i4=";
205-
aarch64-darwin = "sha256-lDyeehVveciOsm4JZvz7CPphkl/ryRK1rz7DOcEDzYc=";
204+
x86_64-darwin = "sha256-yvIscuu+37eFH/lEhTPostoJ5kHmpdkZiRBtKWDlOuw=";
205+
aarch64-darwin = "sha256-VtOmp/YJ8oRBZvDg4sNskY7TVQdHglwkAveybY7QYno=";
206206
}
207207
.${system} or throwSystem;
208208
};

0 commit comments

Comments
 (0)