mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
playwright: 1.32.1 -> 1.34.3
This commit is contained in:
parent
4792ee0b1a
commit
82f8be70cd
@ -15,7 +15,8 @@ let
|
|||||||
in
|
in
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "playwright";
|
pname = "playwright";
|
||||||
version = "1.32.1";
|
# run ./pkgs/development/python-modules/playwright/update.sh to update
|
||||||
|
version = "1.34.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ buildPythonPackage rec {
|
|||||||
owner = "microsoft";
|
owner = "microsoft";
|
||||||
repo = "playwright-python";
|
repo = "playwright-python";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-rguobFaepTOL2duHRdFV5o2JSsBlYiA7rY3/RyHvoMc=";
|
hash = "sha256-GIxMVuSSJsRDsHDOPnJsDsTcghGYtIFpRS5u7HJd+zY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i bash -p curl gnused nix-prefetch common-updater-scripts
|
#!nix-shell -i bash -p curl gnused nix-prefetch common-updater-scripts node2nix
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
root="$(dirname "$(readlink -f "$0")")"
|
root="$(dirname "$(readlink -f "$0")")"
|
||||||
|
driver_file="$root/../../web/playwright/driver.nix"
|
||||||
|
playwright_test="$root/../../web/playwright-test"
|
||||||
|
|
||||||
version=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s https://api.github.com/repos/microsoft/playwright-python/releases/latest | jq -r '.tag_name | sub("^v"; "")')
|
version=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s https://api.github.com/repos/microsoft/playwright-python/releases/latest | jq -r '.tag_name | sub("^v"; "")')
|
||||||
|
|
||||||
@ -13,11 +15,11 @@ setup_py_url="https://github.com/microsoft/playwright-python/raw/v${version}/set
|
|||||||
driver_version=$(curl -Ls "$setup_py_url" | grep '^driver_version =' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
|
driver_version=$(curl -Ls "$setup_py_url" | grep '^driver_version =' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
|
||||||
fetch_driver_arch() {
|
fetch_driver_arch() {
|
||||||
nix-prefetch-url "https://playwright.azureedge.net/builds/driver/playwright-${version}-${1}.zip"
|
nix-prefetch-url "https://playwright.azureedge.net/builds/driver/playwright-${driver_version}-${1}.zip"
|
||||||
}
|
}
|
||||||
|
|
||||||
replace_sha() {
|
replace_sha() {
|
||||||
sed -i "s|$1 = \".\{44,52\}\"|$1 = \"$2\"|" "$root/default.nix"
|
sed -i "s|$1 = \".\{44,52\}\"|$1 = \"$2\"|" "$driver_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Replace SHAs for the driver downloads
|
# Replace SHAs for the driver downloads
|
||||||
@ -27,5 +29,7 @@ replace_sha "aarch64-linux" "$(fetch_driver_arch "linux-arm64")"
|
|||||||
replace_sha "aarch64-darwin" "$(fetch_driver_arch "mac-arm64")"
|
replace_sha "aarch64-darwin" "$(fetch_driver_arch "mac-arm64")"
|
||||||
|
|
||||||
# Update the version stamps
|
# Update the version stamps
|
||||||
sed -i "s/driverVersion = \"[^\$]*\"/driverVersion = \"$driver_version\"/" "$root/default.nix"
|
sed -i "s/version =\s*\"[^\$]*\"/version = \"$driver_version\"/" "$driver_file"
|
||||||
|
sed -i "s/\"@playwright\/test\": \"[^\$]*\"/\"@playwright\/test\": \"$driver_version\"/" "$playwright_test/node-packages.json"
|
||||||
|
(cd "$playwright_test"; node2nix -i node-packages.json)
|
||||||
update-source-version playwright "$version" --rev="v$version"
|
update-source-version playwright "$version" --rev="v$version"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{pkgs ? import <nixpkgs> {
|
{pkgs ? import <nixpkgs> {
|
||||||
inherit system;
|
inherit system;
|
||||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}:
|
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_14"}:
|
||||||
|
|
||||||
let
|
let
|
||||||
nodeEnv = import ./node-env.nix {
|
nodeEnv = import ./node-env.nix {
|
||||||
|
@ -530,12 +530,15 @@ let
|
|||||||
then
|
then
|
||||||
ln -s $out/lib/node_modules/.bin $out/bin
|
ln -s $out/lib/node_modules/.bin $out/bin
|
||||||
|
|
||||||
# Patch the shebang lines of all the executables
|
# Fixup all executables
|
||||||
ls $out/bin/* | while read i
|
ls $out/bin/* | while read i
|
||||||
do
|
do
|
||||||
file="$(readlink -f "$i")"
|
file="$(readlink -f "$i")"
|
||||||
chmod u+rwx "$file"
|
chmod u+rwx "$file"
|
||||||
patchShebangs "$file"
|
if isScript "$file"
|
||||||
|
then
|
||||||
|
sed -i 's/\r$//' "$file" # convert crlf to lf
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[
|
[
|
||||||
{"@playwright/test": "1.31.1"}
|
{"@playwright/test": "1.34.3"}
|
||||||
]
|
]
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
sources = {
|
sources = {
|
||||||
"@types/node-18.15.11" = {
|
"@types/node-20.2.5" = {
|
||||||
name = "_at_types_slash_node";
|
name = "_at_types_slash_node";
|
||||||
packageName = "@types/node";
|
packageName = "@types/node";
|
||||||
version = "18.15.11";
|
version = "20.2.5";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz";
|
url = "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz";
|
||||||
sha512 = "E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==";
|
sha512 = "JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"fsevents-2.3.2" = {
|
"fsevents-2.3.2" = {
|
||||||
@ -22,30 +22,30 @@ let
|
|||||||
sha512 = "xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==";
|
sha512 = "xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"playwright-core-1.31.1" = {
|
"playwright-core-1.34.3" = {
|
||||||
name = "playwright-core";
|
name = "playwright-core";
|
||||||
packageName = "playwright-core";
|
packageName = "playwright-core";
|
||||||
version = "1.31.1";
|
version = "1.34.3";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/playwright-core/-/playwright-core-1.31.1.tgz";
|
url = "https://registry.npmjs.org/playwright-core/-/playwright-core-1.34.3.tgz";
|
||||||
sha512 = "JTyX4kV3/LXsvpHkLzL2I36aCdml4zeE35x+G5aPc4bkLsiRiQshU5lWeVpHFAuC8xAcbI6FDcw/8z3q2xtJSQ==";
|
sha512 = "2pWd6G7OHKemc5x1r1rp8aQcpvDh7goMBZlJv6Co5vCNLVcQJdhxRL09SGaY6HcyHH9aT4tiynZabMofVasBYw==";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"@playwright/test-1.31.1" = nodeEnv.buildNodePackage {
|
"@playwright/test-1.34.3" = nodeEnv.buildNodePackage {
|
||||||
name = "_at_playwright_slash_test";
|
name = "_at_playwright_slash_test";
|
||||||
packageName = "@playwright/test";
|
packageName = "@playwright/test";
|
||||||
version = "1.31.1";
|
version = "1.34.3";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://registry.npmjs.org/@playwright/test/-/test-1.31.1.tgz";
|
url = "https://registry.npmjs.org/@playwright/test/-/test-1.34.3.tgz";
|
||||||
sha512 = "IsytVZ+0QLDh1Hj83XatGp/GsI1CDJWbyDaBGbainsh0p2zC7F4toUocqowmjS6sQff2NGT3D9WbDj/3K2CJiA==";
|
sha512 = "zPLef6w9P6T/iT6XDYG3mvGOqOyb6eHaV9XtkunYs0+OzxBtrPAAaHotc0X+PJ00WPPnLfFBTl7mf45Mn8DBmw==";
|
||||||
};
|
};
|
||||||
dependencies = [
|
dependencies = [
|
||||||
sources."@types/node-18.15.11"
|
sources."@types/node-20.2.5"
|
||||||
sources."fsevents-2.3.2"
|
sources."fsevents-2.3.2"
|
||||||
sources."playwright-core-1.31.1"
|
sources."playwright-core-1.34.3"
|
||||||
];
|
];
|
||||||
buildInputs = globalBuildInputs;
|
buildInputs = globalBuildInputs;
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -29,15 +29,16 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
pname = "playwright-driver";
|
pname = "playwright-driver";
|
||||||
version = "1.31.1";
|
# run ./pkgs/development/python-modules/playwright/update.sh to update
|
||||||
|
version = "1.34.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://playwright.azureedge.net/builds/driver/${filename}";
|
url = "https://playwright.azureedge.net/builds/driver/${filename}";
|
||||||
sha256 = {
|
sha256 = {
|
||||||
x86_64-linux = "1wg49kfs8fflmx8g01bkckbjkghhwy7c44akckjf7dp4lbh1z8fd";
|
x86_64-linux = "1xh05v3yqa8gkwayhl4nffgjcnlakpyyi17hwzh0wqzrbwwn0cs8";
|
||||||
aarch64-linux = "0f09a0cxqxihy8lmbjzii80jkpf3n5xlvhjpgdkwmrr3wh0nnixj";
|
aarch64-linux = "18jxbmhiqda5pzrv6b3n7xi14xg4zvlh6sn7hc3b3hckl77vl933";
|
||||||
x86_64-darwin = "1zd0dz8jazymcpa1im5yzxb7rwl6wn4xz19lpz83bnpd1njq01b3";
|
x86_64-darwin = "0fy5nxbvp1kxplavj832gxiznjqpvl0ww869hsfj0h1fibhly7cy";
|
||||||
aarch64-darwin = "0hcn80zm9aki8hzsf1cljzcmi4iaw7fascs8ajj0qcwqkkm4jnw0";
|
aarch64-darwin = "11msl4pnmr8cmlw32xq2qvfz3g3fy0azvq134a47c0fnpj2gd5zl";
|
||||||
}.${system} or throwSystem;
|
}.${system} or throwSystem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user