Skip to content

Commit

Permalink
build: Use playwright browser from nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
raphiz committed Aug 20, 2024
1 parent 1cc23aa commit 2901ee2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
buildInputs = with pkgs; [nodejs start-server start-server-docker];
shellHook = ''
export REPOSITORY_ROOT=$(pwd)
playwright_chromium_revision="$(${pkgs.jq}/bin/jq --raw-output '.browsers[] | select(.name == "chromium").revision' ${pkgs.playwright-driver}/package/browsers.json)"
export PLAYWRIGHT_CHROME_EXECUTABLE_PATH="${pkgs.playwright-driver.browsers}/chromium-$playwright_chromium_revision/chrome-linux/chrome";
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS
ln -fs "$REPOSITORY_ROOT/bin/pre-commit" "$REPOSITORY_ROOT/.git/hooks/pre-commit"
'';
};

# enable formatting via `nix fmt`
formatter = pkgs.alejandra; # or nixpkgs-fmt;
formatter = pkgs.alejandra;
});
}

0 comments on commit 2901ee2

Please sign in to comment.