LAST FIX
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled

This commit is contained in:
2025-07-03 00:03:50 -06:00
parent 5901c225c1
commit af5dbd1a64

View File

@ -11,10 +11,7 @@ let
curl
];
# Dependencies for Playwright's self-downloaded browsers (for macOS)
playwrightSelfDownloadLibs = with pkgs; [
glibc
libgcc
playwrightCommonLibs = with pkgs; [
glib
nss
nspr
@ -24,6 +21,20 @@ let
at-spi2-core
cups
expat
libxkbcommon
cairo
pango
fontconfig
freetype
harfbuzz
icu
libpng
gnutls
];
playwrightLinuxSpecificLibs = with pkgs; [
glibc
libgcc
xorg.libX11
xorg.libxcb
xorg.libXext
@ -35,31 +46,23 @@ let
xorg.libXi
xorg.libXrender
xorg.libXtst
libxkbcommon
mesa
libglvnd
cairo
pango
fontconfig
freetype
harfbuzz
libdrm
udev
alsa-lib
icu
libdrm
libpng
gnutls
];
# Path string for LD_LIBRARY_PATH, only for self-downloaded Playwright
playwrightSelfDownloadLibs = playwrightCommonLibs ++ (if isLinux then playwrightLinuxSpecificLibs else []);
playwrightLibPath = pkgs.lib.makeBinPath playwrightSelfDownloadLibs;
in
pkgs.mkShell {
buildInputs = commonBuildInputs ++ (
if isDarwin
then playwrightSelfDownloadLibs
else [ pkgs.chromium ]
then playwrightCommonLibs
else [ pkgs.chromium ] ++ playwrightSelfDownloadLibs
);
shellHook = ''
@ -67,9 +70,7 @@ pkgs.mkShell {
echo "Node version: $(node --version)"
echo "pnpm version: $(pnpm --version)"
# Conditional setup for Chromium/Playwright
${if isDarwin then ''
# macOS: Playwright downloads its own browser
echo "Chromium path: Playwright will download its own for macOS"
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=false
@ -84,7 +85,6 @@ pkgs.mkShell {
echo " Playwright browsers already installed (for macOS)."
fi
'' else if isLinux then ''
# Linux: Use Nixpkgs-provided Chromium
echo "Chromium path: ${pkgs.chromium}/bin/chromium"
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH="${pkgs.chromium}/bin/chromium"
@ -100,7 +100,6 @@ pkgs.mkShell {
fi
'';
# Environment variables
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = if isDarwin then "0" else "1";
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH = if isDarwin then null else "${pkgs.chromium}/bin/chromium";
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = if isDarwin then "false" else "true";