Skip to content

Commit

Permalink
chromiumDev: Fix the configuration phase
Browse files Browse the repository at this point in the history
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]: chromium/chromium@9869e86

(cherry picked from commit 029a5de)
  • Loading branch information
primeos committed Jun 10, 2020
1 parent 123d831 commit 159c6a7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
13 changes: 7 additions & 6 deletions pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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";
Expand Down
9 changes: 9 additions & 0 deletions pkgs/applications/networking/browsers/chromium/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 159c6a7

Please sign in to comment.