diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9d2095d612c7d19090b8a323b9ff0f388457b60..19a88a138734b888488ededdbd7c5ce227a15aa0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,24 +27,19 @@ variables: sudo apt update sudo apt full-upgrade -y sudo apt install -y \ - gnupg \ zstd - curl -f -L --retry 5 https://packages.mozilla.org/apt/repo-signing-key.gpg | sudo tee /usr/share/keyrings/packages.mozilla.org.asc + curl -f -L https://packages.mozilla.org/apt/repo-signing-key.gpg | sudo tee /usr/share/keyrings/packages.mozilla.org.asc echo "deb [signed-by=/usr/share/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee /etc/apt/sources.list.d/mozilla.list - echo ' - Package: * - Pin: origin packages.mozilla.org - Pin-Priority: 1000 - ' | sudo tee /etc/apt/preferences.d/mozilla - curl -f -L --retry 5 https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg - echo "deb [signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list + curl -f -L https://dl.google.com/linux/linux_signing_key.pub | sudo tee /usr/share/keyrings/google.asc + echo "deb [signed-by=/usr/share/keyrings/google.asc] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list sudo apt update sudo apt install -y \ - firefox \ google-chrome-stable + sudo apt install -y --target-release=mozilla \ + firefox - sudo chown ghc:ghc -R . - | PREFIX=/tmp/.ghc-wasm ./setup.sh diff --git a/README.md b/README.md index f02bbcac3c9965ffd3f05ea818a53f3d3785f393..16a09520d79f1fe7d070cb85637f9d023e434300 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ $ curl https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta/-/raw/master/bootst $ source ~/.ghc-wasm/env $ ghcup config add-release-channel https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta/-/raw/master/ghcup-wasm-0.0.9.yaml $ ghcup install ghc wasm32-wasi-9.12 -- $CONFIGURE_ARGS -$ cabal --with-compiler=wasm32-wasi-ghc-9.12 --with-hc-pkg=wasm32-wasi-ghc-pkg-9.12 --with-hsc2hs=wasm32-wasi-hsc2hs-9.12 build +$ cabal --with-compiler=wasm32-wasi-ghc-9.12 --with-hc-pkg=wasm32-wasi-ghc-pkg-9.12 --with-hsc2hs=wasm32-wasi-hsc2hs-9.12 --with-haddock=wasm32-wasi-haddock-9.12 build ``` In case you encounter any issue with `ghcup` based installation, diff --git a/package-lock.json b/package-lock.json index 3df7602dbb7bc59314af29d304ddfcde7c8e2c26..502b6ac5cd4a46aa7126a6d1cf45735fc7aa52a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,14 +5,14 @@ "packages": { "": { "dependencies": { - "puppeteer-core": "^24.8.1", + "puppeteer-core": "^24.8.2", "ws": "^8.18.2" } }, "node_modules/@puppeteer/browsers": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.3.tgz", - "integrity": "sha512-iPpnFpX25gKIVsHsqVjHV+/GzW36xPgsscWkCnrrETndcdxNsXLdCrTwhkCJNR/FGWr122dJUBeyV4niz/j3TA==", + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.4.tgz", + "integrity": "sha512-9DxbZx+XGMNdjBynIs4BRSz+M3iRDeB7qRcAr6UORFLphCIM2x3DXgOucvADiifcqCE4XePFUKcnaAMyGbrDlQ==", "license": "Apache-2.0", "dependencies": { "debug": "^4.4.0", @@ -37,9 +37,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.12.tgz", - "integrity": "sha512-K0fpC/ZVeb8G9rm7bH7vI0KAec4XHEhBam616nVJCV51bKzJ6oA3luG4WdKoaztxe70QaNjS/xBmcDLmr4PiGw==", + "version": "22.15.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz", + "integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==", "license": "MIT", "optional": true, "dependencies": { @@ -613,12 +613,12 @@ } }, "node_modules/puppeteer-core": { - "version": "24.8.1", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.8.1.tgz", - "integrity": "sha512-UP/VIxVk/Akrgql3a55ZAIuAIx7+yQevz6qEXFUtSTIynEcgsCJ6tlRdi7uKAAlovmNQG4iNMzq9f8WxZLnGGg==", + "version": "24.8.2", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.8.2.tgz", + "integrity": "sha512-wNw5cRZOHiFibWc0vdYCYO92QuKTbJ8frXiUfOq/UGJWMqhPoBThTKkV+dJ99YyWfzJ2CfQQ4T1nhhR0h8FlVw==", "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.10.3", + "@puppeteer/browsers": "2.10.4", "chromium-bidi": "5.1.0", "debug": "^4.4.0", "devtools-protocol": "0.0.1439962", diff --git a/package.json b/package.json index 66d6f54f79713cdabed6eec667bb7bcb56ae10f3..a584ab292832de5d009c85ffc106728ec132f4c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "puppeteer-core": "^24.8.1", + "puppeteer-core": "^24.8.2", "ws": "^8.18.2" } } diff --git a/pkgs/npm-deps.nix b/pkgs/npm-deps.nix index c2698fbf467629c833ab1bb4251da48ad1e5f9e6..fb04dae180684cf453bece44a6cf6a6484c73643 100644 --- a/pkgs/npm-deps.nix +++ b/pkgs/npm-deps.nix @@ -12,7 +12,7 @@ buildNpmPackage { "package.json" "package-lock.json" ]; - npmDepsHash = "sha512-vyVsKiTqi9CQpXTYI/9Mght9Tg0HszVSOng8jGX4joz1YmAqbmQNRpQDV70ScDhD/KW8KI1xdEVU3RXzOCQNnw=="; + npmDepsHash = "sha512-dIrmbHAo0D+aWqgxdXP6IHTRM7ZsTnTPdo8Yns+W7n3zkIxEfqEDotsYALrlKK7Jta8yFu89yyBoJ8ZS7ldNzA=="; dontNpmBuild = true; dontNpmInstall = true; diff --git a/setup.sh b/setup.sh index 5810adca0b30f52a4fb1b0791931e2f666329eef..d4c3de5f947d4379fbdca4f9992730fe6a5b1af1 100755 --- a/setup.sh +++ b/setup.sh @@ -111,10 +111,11 @@ mkdir -p "$PREFIX/nodejs" curl -f -L --retry 5 "$(jq -r ".\"$NODEJS\".url" "$REPO"/autogen.json)" -o nodejs.tar.xz tar xJf nodejs.tar.xz -C "$PREFIX/nodejs" --no-same-owner --strip-components=1 "$PREFIX/nodejs/bin/node" "$PREFIX/nodejs/bin/npm" install -g --prefix "$PREFIX/nodejs" \ - puppeteer-core@^24.8.1 \ - ws@^8.18.2 \ - playwright@^1.52.0 + puppeteer-core@^24.8.2 \ + ws@^8.18.2 if [[ -n "${PLAYWRIGHT:-}" ]]; then + "$PREFIX/nodejs/bin/node" "$PREFIX/nodejs/bin/npm" install -g --prefix "$PREFIX/nodejs" \ + playwright PATH=$PREFIX/nodejs/bin:$PATH playwright install --with-deps fi @@ -221,14 +222,26 @@ tar xJf cabal.tar.xz --no-same-owner -C "$PREFIX/cabal/bin" 'cabal' mkdir -p "$PREFIX/wasm32-wasi-cabal/bin" echo "#!/bin/sh" >> "$PREFIX/wasm32-wasi-cabal/bin/wasm32-wasi-cabal" echo 'PREFIX=$(realpath "$(dirname "$0")"/../..)' >> "$PREFIX/wasm32-wasi-cabal/bin/wasm32-wasi-cabal" -echo \ - 'CABAL_DIR=$PREFIX/.cabal' \ - 'exec' \ - '$PREFIX/cabal/bin/cabal' \ - '--with-compiler=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-ghc' \ - '--with-hc-pkg=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-ghc-pkg' \ - '--with-hsc2hs=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-hsc2hs' \ - '${1+"$@"}' >> "$PREFIX/wasm32-wasi-cabal/bin/wasm32-wasi-cabal" +if [[ "$FLAVOUR" != 9.6 ]] && [[ "$FLAVOUR" != 9.8 ]]; then + echo \ + 'CABAL_DIR=$PREFIX/.cabal' \ + 'exec' \ + '$PREFIX/cabal/bin/cabal' \ + '--with-compiler=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-ghc' \ + '--with-hc-pkg=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-ghc-pkg' \ + '--with-hsc2hs=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-hsc2hs' \ + '--with-haddock=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-haddock' \ + '${1+"$@"}' >> "$PREFIX/wasm32-wasi-cabal/bin/wasm32-wasi-cabal" +else + echo \ + 'CABAL_DIR=$PREFIX/.cabal' \ + 'exec' \ + '$PREFIX/cabal/bin/cabal' \ + '--with-compiler=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-ghc' \ + '--with-hc-pkg=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-ghc-pkg' \ + '--with-hsc2hs=$PREFIX/wasm32-wasi-ghc/bin/wasm32-wasi-hsc2hs' \ + '${1+"$@"}' >> "$PREFIX/wasm32-wasi-cabal/bin/wasm32-wasi-cabal" +fi chmod 755 "$PREFIX/wasm32-wasi-cabal/bin/wasm32-wasi-cabal" mkdir "$PREFIX/.cabal" diff --git a/tests/ghci.sh b/tests/ghci.sh index 22993bef1b62b8970d8851289f4b36e5b61adbbe..1468b9807d25a9a110f02f1820d097f04e9f325b 100755 --- a/tests/ghci.sh +++ b/tests/ghci.sh @@ -6,13 +6,13 @@ GHCI_SCRIPT='foreign import javascript "new Promise(res => setTimeout(res, 1024, echo -e "$GHCI_SCRIPT" | wasm32-wasi-ghc --interactive -package ghc -package Cabal -FIREFOX_PATH=$(type -P firefox || echo "") +FIREFOX_PATH=$(type -P firefox-esr || type -P firefox || type -P firefox-beta || type -P firefox-devedition || type -P firefox-nightly || echo "") if [[ $FIREFOX_PATH != "" ]]; then echo -e "$GHCI_SCRIPT" | wasm32-wasi-ghc --interactive -fghci-browser -fghci-browser-puppeteer-launch-opts="{\"browser\":\"firefox\",\"executablePath\":\"$FIREFOX_PATH\"}" fi -CHROME_PATH=$(type -P google-chrome-stable || type -P chromium || type -P chromium-browser || echo "") +CHROME_PATH=$(type -P google-chrome-stable || type -P google-chrome-beta || type -P google-chrome-unstable || type -P google-chrome-canary || type -P chromium || type -P chromium-browser || echo "") if [[ $CHROME_PATH != "" ]]; then echo -e "$GHCI_SCRIPT" | wasm32-wasi-ghc --interactive -fghci-browser -fghci-browser-puppeteer-launch-opts="{\"browser\":\"chrome\",\"protocol\":\"webDriverBiDi\",\"executablePath\":\"$CHROME_PATH\",\"args\":[\"--no-sandbox\"]}"