Skip to content

Commit

Permalink
chromiumDev: Override gn to fix the configuration phase
Browse files Browse the repository at this point in the history
The configuration phase was failing due to:
```
configuring
ERROR at //BUILD.gn:1376:5: Unknown function.
    filter_exclude([ "$root_build_dir/foo" ],
    ^-------------
```

(cherry picked from commit ad3220f)
  • Loading branch information
primeos authored and stigok committed Jun 12, 2020
1 parent f0c60be commit 7b41822
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, llvmPackages, gn, ninja, which, nodejs, fetchpatch, gnutar
{ stdenv, llvmPackages, gnChromium, ninja, which, nodejs, fetchpatch, gnutar

# default dependencies
, bzip2, flac, speex, libopus
Expand Down Expand Up @@ -281,7 +281,7 @@ let
libExecPath="${libExecPath}"
python build/linux/unbundle/replace_gn_files.py \
--system-libraries ${toString gnSystemLibraries}
${gn}/bin/gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt
${gnChromium}/bin/gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt
# Fail if `gn gen` contains a WARNING.
grep -o WARNING gn-gen-outputs.txt && echo "Found gn WARNING, exiting nix build" && exit 1
Expand Down
17 changes: 14 additions & 3 deletions pkgs/applications/networking/browsers/chromium/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ newScope, config, stdenv, llvmPackages_9, llvmPackages_10
, makeWrapper, ed
, glib, gtk3, gnome3, gsettings-desktop-schemas
, glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit
, libva ? null
, gcc, nspr, nss, patchelfUnstable, runCommand
, lib
Expand Down Expand Up @@ -32,9 +32,20 @@ let

upstream-info = (callPackage ./update.nix {}).getChannel channel;

mkChromiumDerivation = callPackage ./common.nix {
mkChromiumDerivation = callPackage ./common.nix ({
inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useVaapi useOzone;
};
gnChromium = gn;
} // lib.optionalAttrs (channel == "dev") {
# TODO: Remove after we can update gn for the stable channel (backward incompatible changes):
gnChromium = gn.overrideAttrs (oldAttrs: {
version = "2020-03-23";
src = fetchgit {
url = "https://gn.googlesource.com/gn";
rev = "5ed3c9cc67b090d5e311e4bd2aba072173e82db9";
sha256 = "00y2d35wvqmx9glaqhfb62wdgbfpwr77v0934nnvh9ks71vnsjqy";
};
});
});

browser = callPackage ./browser.nix { inherit channel enableWideVine; };

Expand Down

0 comments on commit 7b41822

Please sign in to comment.