Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron-source.electron_{27,28}: remove instead of marking them as EOL, remove no longer needed version conditionals #319415

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand All @@ -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
'';

Expand Down
5 changes: 1 addition & 4 deletions pkgs/development/tools/electron/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
} // {

Expand Down Expand Up @@ -234,7 +232,6 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
meta = with lib; {
description = "Cross platform desktop application shell";
homepage = "https://github.com/electron/electron";
knownVulnerabilities = optional (versionOlder info.version "29") "Electron version ${version} is EOL";
platforms = lib.platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ yayayayaka teutat3s ];
Expand Down
Loading
Loading