diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 831a93734248a..9f7583b1ef5cf 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -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 @@ -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 diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index b3ca9a79ad300..564e50b867096 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -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 @@ -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; };