From bb74ebb72bb621a03313107f1d32401493b3c438 Mon Sep 17 00:00:00 2001 From: phaer Date: Fri, 15 Dec 2023 15:33:26 +0100 Subject: [PATCH] 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. --- pkgs/development/web/playwright/driver.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/web/playwright/driver.nix b/pkgs/development/web/playwright/driver.nix index 2ced22b559a0..7f755eda21ce 100644 --- a/pkgs/development/web/playwright/driver.nix +++ b/pkgs/development/web/playwright/driver.nix @@ -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