|
27 | 27 | } |
28 | 28 | .${system} or throwSystem; |
29 | 29 |
|
30 | | - version = "1.50.1"; |
| 30 | + version = "1.52.0"; |
31 | 31 |
|
32 | 32 | src = fetchFromGitHub { |
33 | 33 | owner = "Microsoft"; |
34 | 34 | repo = "playwright"; |
35 | 35 | rev = "v${version}"; |
36 | | - hash = "sha256-s4lJRdsA4H+Uf9LjriZ6OimBl5A9Pf4fvhWDw2kOMkg="; |
| 36 | + hash = "sha256-+2ih1tZHqbNtyabtYi1Sd3f9Qs3Is8zUMNBt6Lo2IKs="; |
37 | 37 | }; |
38 | 38 |
|
39 | 39 | babel-bundle = buildNpmPackage { |
40 | 40 | pname = "babel-bundle"; |
41 | 41 | inherit version src; |
42 | 42 | sourceRoot = "${src.name}/packages/playwright/bundles/babel"; |
43 | | - npmDepsHash = "sha256-HrDTkP2lHl2XKD8aGpmnf6YtSe/w9UePH5W9QfbaoMg="; |
| 43 | + npmDepsHash = "sha256-sdl+rMCmuOmY1f7oSfGuAAFCiPCFzqkQtFCncL4o5LQ="; |
44 | 44 | dontNpmBuild = true; |
45 | 45 | installPhase = '' |
46 | 46 | cp -r . "$out" |
|
70 | 70 | pname = "utils-bundle-core"; |
71 | 71 | inherit version src; |
72 | 72 | sourceRoot = "${src.name}/packages/playwright-core/bundles/utils"; |
73 | | - npmDepsHash = "sha256-TarWFVp5JFCKZIvBUTohzzsFaLZHV79lN5+G9+rCP8Y="; |
| 73 | + npmDepsHash = "sha256-3hdOmvs/IGAgW7vhldms9Q9/ZQfbjbc+xP+JEtGJ7g8="; |
74 | 74 | dontNpmBuild = true; |
75 | 75 | installPhase = '' |
76 | 76 | cp -r . "$out" |
|
92 | 92 | inherit version src; |
93 | 93 |
|
94 | 94 | sourceRoot = "${src.name}"; # update.sh depends on sourceRoot presence |
95 | | - npmDepsHash = "sha256-RoKw3Ie41/4DsjCeqkMhKFyjDPuvMgxajZYZhRdiTuY="; |
| 95 | + npmDepsHash = "sha256-Os/HvvL+CFFb2sM+EDdxF2hN28Sg7oy3vBBfkIipkqs="; |
96 | 96 |
|
97 | | - nativeBuildInputs = [ cacert ]; |
| 97 | + nativeBuildInputs = [ |
| 98 | + cacert |
| 99 | + jq |
| 100 | + ]; |
98 | 101 |
|
99 | 102 | ELECTRON_SKIP_BINARY_DOWNLOAD = true; |
100 | 103 |
|
|
127 | 130 | mkdir -p "$out/lib/node_modules/playwright" |
128 | 131 | cp -r packages/playwright/!(bundles|src|node_modules|.*) "$out/lib/node_modules/playwright" |
129 | 132 |
|
| 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 |
130 | 139 | mkdir -p "$out/lib/node_modules/playwright-core" |
131 | 140 | cp -r packages/playwright-core/!(bundles|src|bin|.*) "$out/lib/node_modules/playwright-core" |
132 | 141 |
|
|
197 | 206 | { |
198 | 207 | withChromium ? true, |
199 | 208 | withFirefox ? true, |
200 | | - withWebkit ? true, |
| 209 | + withWebkit ? true, # may require `export PLAYWRIGHT_HOST_PLATFORM_OVERRIDE="ubuntu-24.04"` |
201 | 210 | withFfmpeg ? true, |
202 | 211 | withChromiumHeadlessShell ? true, |
203 | 212 | fontconfig_file ? makeFontsConf { |
|
0 commit comments