Skip to content

Commit

Permalink
Merge #318857: electron: fix build
Browse files Browse the repository at this point in the history
...into staging-next
  • Loading branch information
vcunat committed Jun 11, 2024
2 parents 6dc9cc4 + 9a95b60 commit 3274e72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
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
13 changes: 4 additions & 9 deletions pkgs/applications/networking/browsers/chromium/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ newScope, config, stdenv, fetchurl, makeWrapper
{ newScope, config, stdenv, makeWrapper
, buildPackages
, ed, gnugrep, coreutils, xdg-utils
, glib, gtk3, gtk4, gnome, gsettings-desktop-schemas, gn, fetchgit
, libva, pipewire, wayland
, gcc, nspr, nss, runCommand
, runCommand
, lib, libkrb5
, widevine-cdm
, electron-source # for warnObsoleteVersionConditional
Expand All @@ -18,17 +18,12 @@
, cupsSupport ? true
, pulseSupport ? config.pulseaudio or stdenv.isLinux
, commandLineArgs ? ""
, pkgsBuildTarget
, pkgsBuildBuild
, pkgs
}:

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 +43,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

0 comments on commit 3274e72

Please sign in to comment.