playwright: 1.50.0 -> 1.52.0
This commit is contained in:
committed by
Matthieu Coudron
parent
0a955a5ef6
commit
e462a75ad4
@@ -22,7 +22,7 @@ in
|
||||
buildPythonPackage rec {
|
||||
pname = "playwright";
|
||||
# run ./pkgs/development/python-modules/playwright/update.sh to update
|
||||
version = "1.50.0";
|
||||
version = "1.52.0";
|
||||
pyproject = true;
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
@@ -30,7 +30,7 @@ buildPythonPackage rec {
|
||||
owner = "microsoft";
|
||||
repo = "playwright-python";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-g32QwEA4Ofzh7gVEsC++uA/XqT1eIrUH+fQi15SRxko=";
|
||||
hash = "sha256-8hl+5kIORq9uwYbf9354iqlL0RIkhTnokzQXoYFr5AI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -51,9 +51,7 @@ buildPythonPackage rec {
|
||||
git config --global user.name "nixpkgs"
|
||||
git commit -m "workaround setuptools-scm"
|
||||
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'requires = ["setuptools==75.6.0", "setuptools-scm==8.1.0", "wheel==0.45.1", "auditwheel==6.2.0"]' \
|
||||
'requires = ["setuptools", "setuptools-scm", "wheel"]'
|
||||
sed -i -e 's/requires = \["setuptools==.*", "setuptools-scm==.*", "wheel==.*", "auditwheel==.*"\]/requires = ["setuptools", "setuptools-scm", "wheel"]/' pyproject.toml
|
||||
|
||||
# setup.py downloads and extracts the driver.
|
||||
# This is done manually in postInstall instead.
|
||||
|
||||
@@ -32,7 +32,7 @@ replace_sha() {
|
||||
prefetch_browser() {
|
||||
# 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 -q "{ stdenv, fetchzip }: stdenv.mkDerivation { name=\"browser\"; src = fetchzip { url = \"$1\"; stripRoot = $2; }; }"
|
||||
nix-prefetch --option extra-experimental-features flakes -q "{ stdenv, fetchzip }: stdenv.mkDerivation { name=\"browser\"; src = fetchzip { url = \"$1\"; stripRoot = $2; }; }"
|
||||
}
|
||||
|
||||
update_browser() {
|
||||
|
||||
@@ -2,15 +2,19 @@
|
||||
"comment": "This file is kept up to date via update.sh",
|
||||
"browsers": {
|
||||
"chromium": {
|
||||
"revision": "1155",
|
||||
"browserVersion": "133.0.6943.16"
|
||||
"revision": "1169",
|
||||
"browserVersion": "136.0.7103.25"
|
||||
},
|
||||
"chromium-headless-shell": {
|
||||
"revision": "1169",
|
||||
"browserVersion": "136.0.7103.25"
|
||||
},
|
||||
"firefox": {
|
||||
"revision": "1471",
|
||||
"browserVersion": "134.0"
|
||||
"revision": "1482",
|
||||
"browserVersion": "137.0"
|
||||
},
|
||||
"webkit": {
|
||||
"revision": "2123",
|
||||
"revision": "2158",
|
||||
"revisionOverrides": {
|
||||
"debian11-x64": "2105",
|
||||
"debian11-arm64": "2105",
|
||||
@@ -20,10 +24,12 @@
|
||||
"mac11-arm64": "1816",
|
||||
"mac12": "2009",
|
||||
"mac12-arm64": "2009",
|
||||
"mac13": "2140",
|
||||
"mac13-arm64": "2140",
|
||||
"ubuntu20.04-x64": "2092",
|
||||
"ubuntu20.04-arm64": "2092"
|
||||
},
|
||||
"browserVersion": "18.2"
|
||||
"browserVersion": "18.4"
|
||||
},
|
||||
"ffmpeg": {
|
||||
"revision": "1011",
|
||||
|
||||
@@ -30,8 +30,8 @@ let
|
||||
stripRoot = false;
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-UNLSiI9jWLev2YwqiXuoHwJfdB4teNhEfQjQRBEo8uY=";
|
||||
aarch64-linux = "sha256-aVGLcJHFER09frJdKsGW/pKPl5MXoXef2hy5WTA8rS4=";
|
||||
x86_64-linux = "sha256-WCn3j9JnKqGJoQ4X2FWdghha/AxusqCYTCL0sEpA2pM=";
|
||||
aarch64-linux = "sha256-IIz4E4ylXU5e4XAyqOI6yXc680Lb5bFze0VRuB8Wwck=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -66,8 +66,8 @@ let
|
||||
stripRoot = false;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-c26ubAgM9gQPaYqobQyS3Y7wvMUmmdpDlrYmZJrUgho=";
|
||||
aarch64-darwin = "sha256-XRFqlhVx+GuDxz/kDP8TtyPQfR0JbFD0qu5OSywGTX8=";
|
||||
x86_64-darwin = "sha256-346DDhORd+wGchEpU3Tf3DSwlo8fejomgSUqmF/HmA4=";
|
||||
aarch64-darwin = "sha256-3WMfwOVlap5HxLzalg8+TTlsyda/HPabJMM0T31UKlE=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
@@ -34,8 +34,8 @@ let
|
||||
stripRoot = false;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-seMHD+TmxrfgsN6sLN2Bp3WgAooDnlSxGN6CPw1Q790=";
|
||||
aarch64-darwin = "sha256-SsIRzxTIuf/mwsYvRM2mv8PzWQAAflxOyoK5TuyhMAU=";
|
||||
x86_64-darwin = "sha256-IJxCYtHTOtBxQdGbiLz+PODQL4rmBn4WXNJ3QNr0D/I=";
|
||||
aarch64-darwin = "sha256-6QP1OY1krhcfMf5rNzbd55W/Wg02LnbqaU7aKWhJ7qM=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
@@ -27,20 +27,20 @@ let
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
|
||||
version = "1.50.1";
|
||||
version = "1.52.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Microsoft";
|
||||
repo = "playwright";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-s4lJRdsA4H+Uf9LjriZ6OimBl5A9Pf4fvhWDw2kOMkg=";
|
||||
hash = "sha256-+2ih1tZHqbNtyabtYi1Sd3f9Qs3Is8zUMNBt6Lo2IKs=";
|
||||
};
|
||||
|
||||
babel-bundle = buildNpmPackage {
|
||||
pname = "babel-bundle";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright/bundles/babel";
|
||||
npmDepsHash = "sha256-HrDTkP2lHl2XKD8aGpmnf6YtSe/w9UePH5W9QfbaoMg=";
|
||||
npmDepsHash = "sha256-sdl+rMCmuOmY1f7oSfGuAAFCiPCFzqkQtFCncL4o5LQ=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -70,7 +70,7 @@ let
|
||||
pname = "utils-bundle-core";
|
||||
inherit version src;
|
||||
sourceRoot = "${src.name}/packages/playwright-core/bundles/utils";
|
||||
npmDepsHash = "sha256-TarWFVp5JFCKZIvBUTohzzsFaLZHV79lN5+G9+rCP8Y=";
|
||||
npmDepsHash = "sha256-3hdOmvs/IGAgW7vhldms9Q9/ZQfbjbc+xP+JEtGJ7g8=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
@@ -92,9 +92,12 @@ let
|
||||
inherit version src;
|
||||
|
||||
sourceRoot = "${src.name}"; # update.sh depends on sourceRoot presence
|
||||
npmDepsHash = "sha256-RoKw3Ie41/4DsjCeqkMhKFyjDPuvMgxajZYZhRdiTuY=";
|
||||
npmDepsHash = "sha256-Os/HvvL+CFFb2sM+EDdxF2hN28Sg7oy3vBBfkIipkqs=";
|
||||
|
||||
nativeBuildInputs = [ cacert ];
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
jq
|
||||
];
|
||||
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = true;
|
||||
|
||||
@@ -127,6 +130,12 @@ let
|
||||
mkdir -p "$out/lib/node_modules/playwright"
|
||||
cp -r packages/playwright/!(bundles|src|node_modules|.*) "$out/lib/node_modules/playwright"
|
||||
|
||||
# for not supported platforms (such as NixOS) playwright assumes that it runs on ubuntu-20.04
|
||||
# that forces it to use overridden webkit revision
|
||||
# let's remove that override to make it use latest revision provided in Nixpkgs
|
||||
# https://github.com/microsoft/playwright/blob/baeb065e9ea84502f347129a0b896a85d2a8dada/packages/playwright-core/src/server/utils/hostPlatform.ts#L111
|
||||
jq '(.browsers[] | select(.name == "webkit") | .revisionOverrides) |= del(."ubuntu20.04-x64", ."ubuntu20.04-arm64")' \
|
||||
packages/playwright-core/browsers.json > browser.json.tmp && mv browser.json.tmp packages/playwright-core/browsers.json
|
||||
mkdir -p "$out/lib/node_modules/playwright-core"
|
||||
cp -r packages/playwright-core/!(bundles|src|bin|.*) "$out/lib/node_modules/playwright-core"
|
||||
|
||||
@@ -197,7 +206,7 @@ let
|
||||
{
|
||||
withChromium ? true,
|
||||
withFirefox ? true,
|
||||
withWebkit ? true,
|
||||
withWebkit ? true, # may require `export PLAYWRIGHT_HOST_PLATFORM_OVERRIDE="ubuntu-24.04"`
|
||||
withFfmpeg ? true,
|
||||
withChromiumHeadlessShell ? true,
|
||||
fontconfig_file ? makeFontsConf {
|
||||
|
||||
@@ -17,8 +17,8 @@ let
|
||||
}.zip";
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-53DXgD/OzGo7fEp/DBX1TiBBpFSHwiluqBji6rFKTtE=";
|
||||
aarch64-linux = "sha256-CBg2PgAXU1ZWUob73riEkQmn/EmIqhvOgBPSAphkAyM=";
|
||||
x86_64-linux = "sha256-tZ5rDLVzNaGILydgGbSOjtgfoRx0DWesZMmW0X8Pphc=";
|
||||
aarch64-linux = "sha256-2NOK02C2APHVh4gVrQygrazGUJzJXH/3uOYDoyIn7fU=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -41,8 +41,8 @@ let
|
||||
stripRoot = false;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-GbrbNMFv1dT8Duo2otoZvmZk4Sgj81aRNwPAGKkRlnI=";
|
||||
aarch64-darwin = "sha256-/e51eJTCqr8zEeWWJNS2UgPT9Y+a33Dj619JkCVVeRs=";
|
||||
x86_64-darwin = "sha256-2j59mGvDiHMwmUQQFRVhToCooBdIGkF5s9iuXrVenHU=";
|
||||
aarch64-darwin = "sha256-L7ffypyrX8qSCXksNxnihEZaV+wChoggGIcCuqosXzA=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
@@ -126,8 +126,8 @@ let
|
||||
stripRoot = false;
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-jw/wQ2Ql7KNpquz5CK+Mo6nPcCbMf8jeSQT64Vt/sLs=";
|
||||
aarch64-linux = "sha256-vKAvl1kMxTE4CsDryseWF5lxf2iYOYkHHXAdPCnfnHk=";
|
||||
x86_64-linux = "sha256-kGTfPFosn8BsBDo9boJWgkPtdAig8+Ffv3Q4eYPy5ls=";
|
||||
aarch64-linux = "sha256-9NFR3j8M9i3Gk/LCwK+LRpKzJsTt3w2VHGmsGtsoKJU=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
@@ -201,8 +201,8 @@ let
|
||||
stripRoot = false;
|
||||
hash =
|
||||
{
|
||||
x86_64-darwin = "sha256-6GpzcA77TthcZEtAC7s3dVpnLk31atw7EPxKUZeC5i4=";
|
||||
aarch64-darwin = "sha256-lDyeehVveciOsm4JZvz7CPphkl/ryRK1rz7DOcEDzYc=";
|
||||
x86_64-darwin = "sha256-yvIscuu+37eFH/lEhTPostoJ5kHmpdkZiRBtKWDlOuw=";
|
||||
aarch64-darwin = "sha256-VtOmp/YJ8oRBZvDg4sNskY7TVQdHglwkAveybY7QYno=";
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user