Merge pull request #22568 from abbradar/chromium-updates
Chromium updates
This commit is contained in:
commit
ec2c9d57b5
@ -1,4 +1,4 @@
|
||||
{ stdenv, gn, ninja, which
|
||||
{ stdenv, ninja, which
|
||||
|
||||
# default dependencies
|
||||
, bzip2, flac, speex, libopus
|
||||
@ -20,7 +20,6 @@
|
||||
, libexif ? null # only needed for Chromium before version 51
|
||||
|
||||
# package customization
|
||||
, enableSELinux ? false, libselinux ? null
|
||||
, enableNaCl ? false
|
||||
, enableHotwording ? false
|
||||
, enableWideVine ? false
|
||||
@ -86,7 +85,10 @@ let
|
||||
|
||||
src = upstream-info.main;
|
||||
|
||||
nativeBuildInputs = [ gn which python2Packages.python perl pkgconfig ];
|
||||
nativeBuildInputs = [
|
||||
ninja which python2Packages.python perl pkgconfig
|
||||
python2Packages.ply python2Packages.jinja2
|
||||
];
|
||||
|
||||
buildInputs = defaultDependencies ++ [
|
||||
nspr nss systemd
|
||||
@ -95,18 +97,16 @@ let
|
||||
glib gtk2 dbus_glib
|
||||
libXScrnSaver libXcursor libXtst mesa
|
||||
pciutils protobuf speechd libXdamage
|
||||
python2Packages.ply python2Packages.jinja2
|
||||
] ++ optional gnomeKeyringSupport libgnome_keyring3
|
||||
++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
|
||||
++ optional enableSELinux libselinux
|
||||
++ optionals cupsSupport [ libgcrypt cups ]
|
||||
++ optional pulseSupport libpulseaudio
|
||||
++ optional (versionAtLeast version "56.0.0.0") gtk3;
|
||||
|
||||
patches = [
|
||||
./patches/glibc-2.24.patch
|
||||
./patches/nix_plugin_paths_52.patch
|
||||
] ++ optional enableWideVine ./patches/widevine.patch;
|
||||
] ++ optional (versionOlder version "57.0") ./patches/glibc-2.24.patch
|
||||
++ optional enableWideVine ./patches/widevine.patch;
|
||||
|
||||
postPatch = ''
|
||||
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
|
||||
@ -137,8 +137,8 @@ let
|
||||
|
||||
gnFlags = mkGnFlags ({
|
||||
linux_use_bundled_binutils = false;
|
||||
linux_use_bundled_gold = false;
|
||||
linux_use_gold_flags = true;
|
||||
use_gold = true;
|
||||
gold_path = "${stdenv.cc}/bin";
|
||||
is_debug = false;
|
||||
|
||||
proprietary_codecs = false;
|
||||
@ -149,7 +149,6 @@ let
|
||||
enable_nacl = enableNaCl;
|
||||
enable_hotwording = enableHotwording;
|
||||
enable_widevine = enableWideVine;
|
||||
selinux = enableSELinux;
|
||||
use_cups = cupsSupport;
|
||||
} // {
|
||||
treat_warnings_as_errors = false;
|
||||
@ -173,16 +172,24 @@ let
|
||||
} // (extraAttrs.gnFlags or {}));
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
# Build gn
|
||||
python tools/gn/bootstrap/bootstrap.py -v -s --no-clean
|
||||
PATH="$PWD/out/Release:$PATH"
|
||||
|
||||
# This is to ensure expansion of $out.
|
||||
libExecPath="${libExecPath}"
|
||||
python build/linux/unbundle/replace_gn_files.py \
|
||||
--system-libraries ${toString gnSystemLibraries}
|
||||
gn gen --args=${escapeShellArg gnFlags} out/Release
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = let
|
||||
buildCommand = target: ''
|
||||
"${ninja}/bin/ninja" -C "${buildPath}" \
|
||||
ninja -C "${buildPath}" \
|
||||
-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES \
|
||||
"${target}"
|
||||
'' + optionalString (target == "mksnapshot" || target == "chrome") ''
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
# package customization
|
||||
, channel ? "stable"
|
||||
, enableSELinux ? false
|
||||
, enableNaCl ? false
|
||||
, enableHotwording ? false
|
||||
, gnomeSupport ? false, gnome ? null
|
||||
@ -22,7 +21,7 @@ let
|
||||
upstream-info = (callPackage ./update.nix {}).getChannel channel;
|
||||
|
||||
mkChromiumDerivation = callPackage ./common.nix {
|
||||
inherit enableSELinux enableNaCl enableHotwording gnomeSupport gnome
|
||||
inherit enableNaCl enableHotwording gnomeSupport gnome
|
||||
gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport
|
||||
enableWideVine;
|
||||
};
|
||||
@ -108,7 +107,7 @@ in stdenv.mkDerivation {
|
||||
cp -v "${desktopItem}/share/applications/"* "$out/share/applications"
|
||||
'';
|
||||
|
||||
inherit (chromium.browser) meta packageName;
|
||||
inherit (chromium.browser) meta packageName version;
|
||||
|
||||
passthru = {
|
||||
inherit (chromium) upstream-info browser;
|
||||
|
@ -1,14 +1,14 @@
|
||||
# This file is autogenerated from update.sh in the same directory.
|
||||
{
|
||||
beta = {
|
||||
sha256 = "0f1w9cba99s9hy6fdqkr39yhkay4kid72vdrgs4as5lwdci8xc6g";
|
||||
sha256bin64 = "13hfkkgqywjapz01q3cy0i3ick1s24qhpl40by21c38nwbqplivw";
|
||||
version = "56.0.2924.76";
|
||||
sha256 = "0mwwscybips1kazl0rva3jdswfzfb7yp90ggqgk27z2ndp0qj8b3";
|
||||
sha256bin64 = "17n0jcysxi99v8hwlg7f69nrs2y5z87644145a8r53l809hkvkrk";
|
||||
version = "57.0.2987.21";
|
||||
};
|
||||
dev = {
|
||||
sha256 = "0vw9l66412b9zd8v5l0i518mvfwf313gvh1ywxkf48lpjpi03qwh";
|
||||
sha256bin64 = "1iagza9qjlr61149g6cmiak82898xrrhvk516xrssap2qkb6kyzp";
|
||||
version = "57.0.2987.19";
|
||||
sha256 = "18gsj415cdlllp95q8pv1s3hhjg8cmjb6kwrvbr5mjdvsvj0ianf";
|
||||
sha256bin64 = "0z58rwz00bq61d24h8jynhzxanbh0m9wi04jbczci3681b4zyiyh";
|
||||
version = "58.0.3000.4";
|
||||
};
|
||||
stable = {
|
||||
sha256 = "1q2kg85pd6lv036w7lsss5mhiiva9rx4f0410sbn9bnazhghib4s";
|
||||
|
@ -1,80 +0,0 @@
|
||||
{ stdenv, fetchgit, fetchurl, python2, ninja, libevent, xdg-user-dirs }:
|
||||
|
||||
let
|
||||
date = "20161008";
|
||||
|
||||
sourceTree = {
|
||||
"src/base" = {
|
||||
rev = "e71a514e60b085cc92bf6ef951ec329f52c79f9f";
|
||||
sha256 = "0zycbssmd2za0zij8czcs1fr66fi12f1g5ysc8fzkf8khbs5h6a9";
|
||||
};
|
||||
"src/build" = {
|
||||
rev = "17093d45bf738e9ae4b6294492860ee65218a657";
|
||||
sha256 = "0i9py78c3f46sc789qvdhmgjgyrghysbqjgr67iypwphw52jv2dz";
|
||||
};
|
||||
"src/tools/gn" = {
|
||||
rev = "9ff32cf3f1f4ad0212ac674b6303e7aa68f44f3f";
|
||||
sha256 = "14jr45k5fgcqk9d18fd77sijlqavvnv0knndh74zyb0b60464hz1";
|
||||
};
|
||||
"testing/gtest" = {
|
||||
rev = "585ec31ea716f08233a815e680fc0d4699843938";
|
||||
sha256 = "0csn1cza66851nmxxiw42smsm3422mx67vcyykwn0a71lcjng6rc";
|
||||
};
|
||||
};
|
||||
|
||||
mkDepend = path: attrs: fetchgit {
|
||||
url = "https://chromium.googlesource.com/chromium/${path}";
|
||||
inherit (attrs) rev sha256;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "gn-${version}";
|
||||
version = "0.0.0.${date}";
|
||||
|
||||
unpackPhase = ''
|
||||
${with stdenv.lib; concatStrings (mapAttrsToList (path: sha256: ''
|
||||
dest=source/${escapeShellArg (removePrefix "src/" path)}
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
cp --no-preserve=all -rT ${escapeShellArg (mkDepend path sha256)} "$dest"
|
||||
'') sourceTree)}
|
||||
( mkdir -p source/third_party
|
||||
cd source/third_party
|
||||
unpackFile ${xdg-user-dirs.src}
|
||||
mv * xdg_user
|
||||
)
|
||||
'';
|
||||
|
||||
sourceRoot = "source";
|
||||
|
||||
postPatch = ''
|
||||
# GN's bootstrap script relies on shebangs (which are relying on FHS paths),
|
||||
# except when on Windows. So instead of patchShebang-ing it, let's just
|
||||
# force the same behaviour as on Windows.
|
||||
sed -i -e '/^def *check_call/,/^[^ ]/ {
|
||||
s/is_win/True/
|
||||
}' tools/gn/bootstrap/bootstrap.py
|
||||
|
||||
# Patch out Chromium-bundled libevent and xdg_user_dirs
|
||||
sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \
|
||||
tools/gn/bootstrap/bootstrap.py
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = "-levent";
|
||||
|
||||
nativeBuildInputs = [ python2 ninja ];
|
||||
buildInputs = [ libevent ];
|
||||
|
||||
buildPhase = ''
|
||||
python2 tools/gn/bootstrap/bootstrap.py -v -s --no-clean
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -vD out_bootstrap/gn "$out/bin/gn"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A meta-build system that generates NinjaBuild files";
|
||||
homepage = "https://chromium.googlesource.com/chromium/src/tools/gn/";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
};
|
||||
}
|
@ -6413,8 +6413,6 @@ with pkgs;
|
||||
|
||||
global = callPackage ../development/tools/misc/global { };
|
||||
|
||||
gn = callPackage ../development/tools/build-managers/gn { };
|
||||
|
||||
gnome_doc_utils = callPackage ../development/tools/documentation/gnome-doc-utils {};
|
||||
|
||||
gnum4 = callPackage ../development/tools/misc/gnum4 { };
|
||||
|
Loading…
Reference in New Issue
Block a user