Skip to content

Commit

Permalink
playwright-driver: fix browser download on darwin
Browse files Browse the repository at this point in the history
We are currently using an impure method to build a derivation for
playwrights browsers on darwin: We just call `playwright install`
during build-time. But this recently began to fail, with an error that
the azure certificate would be self-signed, while it was not. This is
presumably due to NixOS#257513
where we started to use the systems CA store for nodejs instead of
the bundled one, so we add cacert to fix it.

Maybe the whole impure method of downloading browsers on darwin
should be reconsidered in favor of following the same approach as
on Linux, but that would probably have the drawback that we'd loose
safari as one of the browsers.
  • Loading branch information
phaer authored and Lainera committed Dec 20, 2023
1 parent 2976f55 commit d234482
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/web/playwright/driver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, makeWrapper
, runCommand
, unzip
, cacert
}:
let
inherit (stdenv.hostPlatform) system;
Expand Down Expand Up @@ -86,6 +87,10 @@ let

dontUnpack = true;

nativeBuildInputs = [
cacert
];

installPhase = ''
runHook preInstall
Expand Down

0 comments on commit d234482

Please sign in to comment.