Commit 174479d0 authored by Matthieu C.'s avatar Matthieu C. Committed by Matthieu Coudron
Browse files

playwright-driver.browsers: expose raw fontconfig file

parent cc9debb4
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
{
  runCommand,
  makeWrapper,
  makeFontsConf,
  fontconfig_file,
  chromium,
  ...
}:
let
  fontconfig = makeFontsConf {
    fontDirectories = [ ];
  };
in
runCommand "playwright-chromium"
  {
    nativeBuildInputs = [
@@ -25,5 +20,5 @@ runCommand "playwright-chromium"
    # as headless nixos test vms.
    makeWrapper ${chromium}/bin/chromium $out/chrome-linux/chrome \
      --set-default SSL_CERT_FILE /etc/ssl/certs/ca-bundle.crt \
      --set-default FONTCONFIG_FILE ${fontconfig}
      --set-default FONTCONFIG_FILE ${fontconfig_file}
  ''
+15 −6
Original line number Diff line number Diff line
@@ -217,12 +217,15 @@ let
    meta.platforms = lib.platforms.darwin;
  };

  browsers-linux =
  browsers-linux = lib.makeOverridable (
    {
      withChromium ? true,
      withFirefox ? true,
      withWebkit ? true,
      withFfmpeg ? true,
      fontconfig_file ? makeFontsConf {
        fontDirectories = [ ];
      },
    }:
    let
      browsers =
@@ -242,13 +245,19 @@ let
            # TODO check platform for revisionOverrides
            "${name}-${value.revision}"
            (
              callPackage ./${name}.nix {
              callPackage ./${name}.nix (
                {
                  inherit suffix system throwSystem;
                  inherit (value) revision;
                }
                // lib.optionalAttrs (name == "chromium") {
                  inherit fontconfig_file;
                }
              )
            )
        ) browsers
      )
    )
  );
in
{