From 159c6a731665a237a7688351a1c6eac3ac5be7da Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 6 Jun 2020 18:43:04 +0200 Subject: [PATCH] chromiumDev: Fix the configuration phase Relevant changes in M85: - Upstream switched from YASM to NASM [0]. - third_party/binutils was removed [1]. Note: The gn and dev channel updates are optional. cc #89615. [0]: https://bugs.chromium.org/p/chromium/issues/detail?id=766721 [1]: https://github.com/chromium/chromium/commit/9869e86fd9079a6ab4ea23aa03d724580678b356 (cherry picked from commit 029a5de08390bb03c3f44230b064fd1850c6658a) --- .../networking/browsers/chromium/common.nix | 13 +++++++------ .../networking/browsers/chromium/default.nix | 9 +++++++++ .../networking/browsers/chromium/upstream-info.nix | 6 +++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 9f7583b1ef5cf..62f6b4f1d2c51 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -4,7 +4,7 @@ , bzip2, flac, speex, libopus , libevent, expat, libjpeg, snappy , libpng, libcap -, xdg_utils, yasm, minizip, libwebp +, xdg_utils, yasm, nasm, minizip, libwebp , libusb1, pciutils, nss, re2, zlib , python2Packages, perl, pkgconfig @@ -67,14 +67,14 @@ let in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs)); gnSystemLibraries = [ - "flac" "libwebp" "libxslt" "yasm" "opus" "snappy" "libpng" + "flac" "libwebp" "libxslt" "opus" "snappy" "libpng" # "zlib" # version 77 reports unresolved dependency on //third_party/zlib:zlib_config # "libjpeg" # fails with multiple undefined references to chromium_jpeg_* # "re2" # fails with linker errors # "ffmpeg" # https://crbug.com/731766 # "harfbuzz-ng" # in versions over 63 harfbuzz and freetype are being built together # so we can't build with one from system and other from source - ]; + ] ++ optional (upstream-info.channel != "dev") "yasm"; opusWithCustomModes = libopus.override { withCustomModes = true; @@ -84,12 +84,12 @@ let bzip2 flac speex opusWithCustomModes libevent expat libjpeg snappy libpng libcap - xdg_utils yasm minizip libwebp + xdg_utils minizip libwebp libusb1 re2 zlib ffmpeg libxslt libxml2 # harfbuzz # in versions over 63 harfbuzz and freetype are being built together # so we can't build with one from system and other from source - ]; + ] ++ (if upstream-info.channel == "dev" then [ nasm ] else [ yasm ]); # build paths and release info packageName = extraAttrs.packageName or extraAttrs.name; @@ -219,8 +219,9 @@ let ln -s ${llvmPackages.llvm}/bin/llvm-ar third_party/llvm-build/Release+Asserts/bin/llvm-ar ''; - gnFlags = mkGnFlags ({ + gnFlags = mkGnFlags (optionalAttrs (upstream-info.channel != "dev") { linux_use_bundled_binutils = false; + } // { use_lld = false; use_gold = true; gold_path = "${stdenv.cc}/bin"; diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 9e505f472f093..8a34e6f69536b 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -41,6 +41,15 @@ let sha256 = "00y2d35wvqmx9glaqhfb62wdgbfpwr77v0934nnvh9ks71vnsjqy"; }; }); + } // lib.optionalAttrs (channel == "dev") { + gnChromium = gn.overrideAttrs (oldAttrs: { + version = "2020-05-19"; + src = fetchgit { + url = "https://gn.googlesource.com/gn"; + rev = "d0a6f072070988e7b038496c4e7d6c562b649732"; + sha256 = "0197msabskgfbxvhzq73gc3wlr3n9cr4bzrhy5z5irbvy05lxk17"; + }; + }); }); browser = callPackage ./browser.nix { inherit channel enableWideVine; }; diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index 943b5ed34d6c4..ced9c2454b55c 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -6,9 +6,9 @@ version = "84.0.4147.38"; }; dev = { - sha256 = "04jbh8bsvqkm8mdsgyv0465fq5lhz0nn0mcs07kj5hnmzx1g2f3a"; - sha256bin64 = "0d9knpqbps06wgfgp2s7z693dqiip0m771mv3j2856h5v9rv210l"; - version = "85.0.4158.4"; + sha256 = "07h3i4ab7yj05ndrqchzf3f9wr809qb3dj2gfc1653mkjmba8h07"; + sha256bin64 = "10jdq5mr7qby0m26l5lbsqcbh9bhjdpmpbkkcvv9wm2259rwjxr5"; + version = "85.0.4164.2"; }; stable = { sha256 = "10vg0fmwlkzpnixhhhcwccxshqdfq7rh0ribij7wgkw42bv0bi0j";