summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-08-01 09:34:23 +0200
committerGitHub <noreply@github.com>2021-08-01 09:34:23 +0200
commit895e904770a286cce49d0128d0a2ad9c4d0b502e (patch)
tree5891f0948828154557839ee466e08126f5b4e969 /pkgs
parent8a0739ba6d3b0f026cc636c4e624e811590b22a1 (diff)
parent555c3afaf2b17af6ad06ae82b545ca06e252bcd1 (diff)
downloadnixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.tar
nixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.tar.gz
nixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.tar.bz2
nixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.tar.lz
nixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.tar.xz
nixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.tar.zst
nixpkgs-895e904770a286cce49d0128d0a2ad9c4d0b502e.zip
Merge pull request #132282 from primeos/chromium
chromium: Restructure gnFlags
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix50
1 files changed, 27 insertions, 23 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 377835489a2..15d415fdd54 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -259,25 +259,12 @@ let
     '';
 
     gnFlags = mkGnFlags ({
+      # Main build and toolchain settings:
       is_official_build = true;
       custom_toolchain = "//build/toolchain/linux/unbundle:default";
       host_toolchain = "//build/toolchain/linux/unbundle:default";
-      system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
-
       use_sysroot = false;
-      use_gnome_keyring = gnomeKeyringSupport;
-      use_gio = gnomeSupport;
-      # ninja: error: '../../native_client/toolchain/linux_x86/pnacl_newlib/bin/x86_64-nacl-objcopy',
-      # needed by 'nacl_irt_x86_64.nexe', missing and no known rule to make it
-      enable_nacl = false;
-      # Enabling the Widevine component here doesn't affect whether we can
-      # redistribute the chromium package; the Widevine component is either
-      # added later in the wrapped -wv build or downloaded from Google.
-      enable_widevine = true;
-      use_cups = cupsSupport;
-      # Provides the enable-webrtc-pipewire-capturer flag to support Wayland screen capture.
-      rtc_use_pipewire = true;
-
+      system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
       treat_warnings_as_errors = false;
       clang_use_chrome_plugins = false;
       blink_symbol_level = 0;
@@ -288,6 +275,31 @@ let
       # Note: The API key is for NixOS/nixpkgs use ONLY.
       # For your own distribution, please get your own set of keys.
       google_api_key = "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI";
+
+      # Optional features:
+      use_cups = cupsSupport;
+      use_gio = gnomeSupport;
+      use_gnome_keyring = gnomeKeyringSupport;
+
+      # Feature overrides:
+      # Native Client support was deprecated in 2020 and support will end in June 2021:
+      enable_nacl = false;
+      # Enabling the Widevine component here doesn't affect whether we can
+      # redistribute the chromium package; the Widevine component is either
+      # added later in the wrapped -wv build or downloaded from Google:
+      enable_widevine = true;
+      # Provides the enable-webrtc-pipewire-capturer flag to support Wayland screen capture:
+      rtc_use_pipewire = true;
+
+      # TODOs:
+      # Disable PGO (defaults to 2 since M89) because it fails without additional changes:
+      # error: Could not read profile ../../chrome/build/pgo_profiles/chrome-linux-master-1610647094-405a32bcf15e5a84949640f99f84a5b9f61e2f2e.profdata: Unsupported instrumentation profile format version
+      chrome_pgo_phase = 0; # TODO
+      # Disable build with TFLite library because it fails without additional changes:
+      # ninja: error: '../../chrome/test/data/simple_test.tflite', needed by 'test_data/simple_test.tflite', missing and no known rule to make it
+      # Note: chrome/test/data/simple_test.tflite is in the Git repository but not in chromium-90.0.4400.8.tar.xz
+      # See also chrome/services/machine_learning/README.md
+      build_with_tflite_lib = false; # TODO
     } // optionalAttrs proprietaryCodecs {
       # enable support for the H.264 codec
       proprietary_codecs = true;
@@ -296,14 +308,6 @@ let
     } // optionalAttrs pulseSupport {
       use_pulseaudio = true;
       link_pulseaudio = true;
-      # Disable PGO (defaults to 2 since M89) because it fails without additional changes:
-      # error: Could not read profile ../../chrome/build/pgo_profiles/chrome-linux-master-1610647094-405a32bcf15e5a84949640f99f84a5b9f61e2f2e.profdata: Unsupported instrumentation profile format version
-      chrome_pgo_phase = 0;
-      # Disable build with TFLite library because it fails without additional changes:
-      # ninja: error: '../../chrome/test/data/simple_test.tflite', needed by 'test_data/simple_test.tflite', missing and no known rule to make it
-      # Note: chrome/test/data/simple_test.tflite is in the Git repository but not in chromium-90.0.4400.8.tar.xz
-      # See also chrome/services/machine_learning/README.md
-      build_with_tflite_lib = false;
     } // optionalAttrs ungoogled {
       chrome_pgo_phase = 0;
       enable_hangout_services_extension = false;