playwright-driver: fix browser download on darwin

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 https://github.com/NixOS/nixpkgs/pull/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.
This commit is contained in:
phaer 2023-12-15 15:33:26 +01:00
parent 02357adddd
commit bb74ebb72b

View File

@ -11,6 +11,7 @@
, makeWrapper
, runCommand
, unzip
, cacert
}:
let
inherit (stdenv.hostPlatform) system;
@ -86,6 +87,10 @@ let
dontUnpack = true;
nativeBuildInputs = [
cacert
];
installPhase = ''
runHook preInstall