about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authoremilylange <git@emilylange.de>2024-06-13 01:25:31 +0200
committerYureka <yuka@yuka.dev>2024-06-13 11:35:23 +0200
commitfb9cdbda70e96d8570f351fd385862f50a009717 (patch)
tree9e2c03c02500917720707d256e29e356c1749957 /pkgs
parent268ce0e562875c1e0e846384fcd95b9241bb1214 (diff)
chromium,electron-source: remove no longer needed version conditionals
The minimum versions for both chromium and electron-source are higher
than the version bounds of those conditionals.
As such, they can be safely removed.

This is a no-op.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix28
-rw-r--r--pkgs/development/tools/electron/common.nix4
2 files changed, 7 insertions, 25 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 691a20f92c8d7..3616189374d30 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -284,20 +284,6 @@ let
       # Rebased variant of patch right above to build M126+ with LLVM 17.
       # staging-next will bump LLVM to 18, so we will be able to drop this soon.
       ./patches/chromium-126-llvm-17.patch
-    ] ++ lib.optionals (!chromiumVersionAtLeast "119.0.6024.0") [
-      # Fix build with at-spi2-core ≥ 2.49
-      # This version is still needed for electron.
-      (githubPatch {
-        commit = "fc09363b2278893790d131c72a4ed96ec9837624";
-        hash = "sha256-l60Npgs/+0ozzuKWjwiHUUV6z59ObUjAPTfXN7eXpzw=";
-      })
-    ] ++ lib.optionals (!chromiumVersionAtLeast "121.0.6104.0") [
-      # Fix build with at-spi2-core ≥ 2.49
-      # https://chromium-review.googlesource.com/c/chromium/src/+/5001687
-      (githubPatch {
-        commit = "b9bef8e9555645fc91fab705bec697214a39dbc1";
-        hash = "sha256-CJ1v/qc8+nwaHQR9xsx08EEcuVRbyBfCZCm/G7hRY+4=";
-      })
     ] ++ lib.optionals (versionRange "121" "126") [
       # M121 is the first version to require the new rust toolchain.
       # Partial revert of https://github.com/chromium/chromium/commit/3687976b0c6d36cf4157419a24a39f6770098d61
@@ -476,10 +462,6 @@ let
       use_system_libffi = true;
       # Use nixpkgs Rust compiler instead of the one shipped by Chromium.
       rust_sysroot_absolute = "${buildPackages.rustc}";
-      # Rust is enabled for M121+, see next section:
-      enable_rust = false;
-    } // lib.optionalAttrs (chromiumVersionAtLeast "121") {
-      # M121 the first version to actually require a functioning rust toolchain
       enable_rust = true;
       # While we technically don't need the cache-invalidation rustc_version provides, rustc_version
       # is still used in some scripts (e.g. build/rust/std/find_std_rlibs.py).
@@ -498,10 +480,12 @@ let
     } // lib.optionalAttrs ungoogled (lib.importTOML ./ungoogled-flags.toml)
     // (extraAttrs.gnFlags or {}));
 
-    # We cannot use chromiumVersionAtLeast in mkDerivation's env attrset due
-    # to infinite recursion when chromium.override is used (e.g. electron).
-    # To work aroud this, we use export in the preConfigure phase.
-    preConfigure = lib.optionalString (chromiumVersionAtLeast "121") ''
+    # TODO: Migrate this to env.RUSTC_BOOTSTRAP next mass-rebuild.
+    # Chromium expects nightly/bleeding edge rustc features to be available.
+    # Our rustc in nixpkgs follows stable, but since bootstrapping rustc requires
+    # nightly features too, we can (ab-)use RUSTC_BOOTSTRAP here as well to
+    # enable those features in our stable builds.
+    preConfigure = ''
       export RUSTC_BOOTSTRAP=1
     '';
 
diff --git a/pkgs/development/tools/electron/common.nix b/pkgs/development/tools/electron/common.nix
index 3514d7cdad229..36cecd7ce6a63 100644
--- a/pkgs/development/tools/electron/common.nix
+++ b/pkgs/development/tools/electron/common.nix
@@ -49,7 +49,7 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
 
   src = null;
 
-  patches = base.patches ++ lib.optional (lib.versionAtLeast info.version "29" && lib.versionOlder info.version "30")
+  patches = base.patches ++ lib.optional (lib.versionOlder info.version "30")
     (substituteAll {
       # disable a component that requires CIPD blobs
       name = "disable-screen-ai.patch";
@@ -172,10 +172,8 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
     use_perfetto_client_library = false;
     v8_builtins_profiling_log_file = "";
     enable_dangling_raw_ptr_checks = false;
-  } // lib.optionalAttrs (lib.versionAtLeast info.version "28") {
     dawn_use_built_dxc = false;
     v8_enable_private_mapping_fork_optimization = true;
-  } // lib.optionalAttrs (lib.versionAtLeast info.version "29") {
     v8_expose_public_symbols = true;
   } // {