Skip to content

Commit

Permalink
Add headless Chromium installation to the browsers for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pietdevries94 committed Dec 12, 2024
1 parent 1c1971c commit e9b8178
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions playwright-driver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ EOF
makeWrapper ${chromium}/bin/chromium $out/chromium-$CHROMIUM_REVISION/chrome-linux/chrome \
--set SSL_CERT_FILE /etc/ssl/certs/ca-bundle.crt \
--set FONTCONFIG_FILE ${fontconfig}
# We also need to install the headless shell version of Chromium
CHROMIUM_HEADLESS_SHELL_REVISION=$(jq -r '.browsers[] | select(.name == "chromium-headless-shell").revision' $BROWSERS_JSON)
mkdir -p $out/chromium-headless-shell-$CHROMIUM_HEADLESS_SHELL_REVISION/chrome-linux
# See here for the Chrome options:
# https://github.com/NixOS/nixpkgs/issues/136207#issuecomment-908637738
makeWrapper ${chromium}/bin/chromium $out/chromium_headless_shell-$CHROMIUM_REVISION/chrome-linux/headless_shell \
--set SSL_CERT_FILE /etc/ssl/certs/ca-bundle.crt \
--set FONTCONFIG_FILE ${fontconfig}
'' + ''
FFMPEG_REVISION=$(jq -r '.browsers[] | select(.name == "ffmpeg").revision' $BROWSERS_JSON)
mkdir -p $out/ffmpeg-$FFMPEG_REVISION
Expand Down

0 comments on commit e9b8178

Please sign in to comment.