Files
atridotdad/shell.nix
Atridad Lahiji cf88aa388e
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m11s
Updated shell.nix
2025-07-02 01:40:03 -06:00

38 lines
1.1 KiB
Nix

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_24
nodePackages.pnpm
git
curl
];
shellHook = ''
echo "🚀 atridotdad development environment loaded!"
echo "Node version: $(node --version)"
echo "pnpm version: $(pnpm --version)"
# Always allow Playwright/Puppeteer to download their own browsers
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=false
if [ ! -d "node_modules" ]; then
echo "📦 Installing pnpm dependencies..."
pnpm install
fi
# Check if Playwright browsers are installed and install them if not
PLAYWRIGHT_BROWSERS_PATH="$HOME/.cache/ms-playwright"
if [ ! -d "$PLAYWRIGHT_BROWSERS_PATH" ] || [ -z "$(ls -A "$PLAYWRIGHT_BROWSERS_PATH")" ]; then
echo "🌐 Installing Playwright browsers..."
pnpm exec playwright install --with-deps # --with-deps ensures all necessary drivers/libraries are also fetched
else
echo " Playwright browsers already installed."
fi
'';
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "0";
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "false";
}