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

[staging-next] electron: fix build #318857

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
10 changes: 4 additions & 6 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
, buildPackages
, buildPlatform
, pkgsBuildBuild
, pkgsBuildTarget
# Channel data:
, channel, upstream-info
# Helper functions:
Expand All @@ -13,7 +12,6 @@
, ninja, pkg-config
, python3, perl
, which
, llvmPackages_attrName
, libuuid
, overrideCC
# postPatch:
Expand Down Expand Up @@ -132,7 +130,7 @@ let
# https://github.com/NixOS/nixpkgs/issues/142901
buildPlatformLlvmStdenv =
let
llvmPackages = pkgsBuildBuild.${llvmPackages_attrName};
llvmPackages = pkgsBuildBuild.rustc.llvmPackages;
in
overrideCC llvmPackages.stdenv
(llvmPackages.stdenv.cc.override {
Expand Down Expand Up @@ -165,7 +163,7 @@ let
ninja pkg-config
python3WithPackages perl
which
buildPackages.${llvmPackages_attrName}.bintools
buildPackages.rustc.llvmPackages.bintools
bison gperf
];

Expand Down Expand Up @@ -382,8 +380,8 @@ let
llvmCcAndBintools = symlinkJoin {
name = "llvmCcAndBintools";
paths = [
pkgsBuildTarget.${llvmPackages_attrName}.llvm
pkgsBuildTarget.${llvmPackages_attrName}.stdenv.cc
buildPackages.rustc.llvmPackages.llvm
buildPackages.rustc.llvmPackages.stdenv.cc
];
};

Expand Down
8 changes: 2 additions & 6 deletions pkgs/applications/networking/browsers/chromium/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
}:

let
# Sometimes we access `llvmPackages` via `pkgs`, and other times
# via `pkgsFooBar`, so a string (attrname) is the only way to have
# a single point of control over the LLVM version used.
llvmPackages_attrName = "llvmPackages_17";
stdenv = pkgs.${llvmPackages_attrName}.stdenv;
stdenv = pkgs.rustc.llvmPackages.stdenv;

# Helper functions for changes that depend on specific versions:
warnObsoleteVersionConditional = min-version: result:
Expand All @@ -48,7 +44,7 @@ let
callPackage = newScope chromium;

chromium = rec {
inherit stdenv llvmPackages_attrName upstream-info;
inherit stdenv upstream-info;

mkChromiumDerivation = callPackage ./common.nix ({
inherit channel chromiumVersionAtLeast versionRange;
Expand Down