diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2017-07-07 00:54:10 +0200 |
---|---|---|
committer | Herwig Hochleitner <herwig@bendlas.net> | 2017-07-15 13:14:37 +0200 |
commit | cc583b75fb4241cb7b6e005942fc928f64f60a5b (patch) | |
tree | 6c01199367527c6318bf74e3ae63f9da99685aa5 /pkgs/applications/networking/browsers/chromium/common.nix | |
parent | 7383d69514f2ec11f8fab4d7bf04c142a5ab57fd (diff) | |
download | nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.tar nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.tar.gz nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.tar.bz2 nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.tar.lz nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.tar.xz nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.tar.zst nixpkgs-cc583b75fb4241cb7b6e005942fc928f64f60a5b.zip |
chromium: 59.0.3071.109 -> 59.0.3071.115
use several system libraries instead of bundled see http://www.linuxfromscratch.org/blfs/view/cvs/xsoft/chromium.html
Diffstat (limited to 'pkgs/applications/networking/browsers/chromium/common.nix')
-rw-r--r-- | pkgs/applications/networking/browsers/chromium/common.nix | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 43b6da6bf34..11177f3ee48 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -1,4 +1,4 @@ -{ stdenv, ninja, which, nodejs +{ stdenv, ninja, which, nodejs, fetchurl, gnutar # default dependencies , bzip2, flac, speex, libopus @@ -14,6 +14,7 @@ , glib, gtk2, gtk3, dbus_glib , libXScrnSaver, libXcursor, libXtst, mesa , protobuf, speechd, libXdamage, cups +, ffmpeg, harfbuzz, harfbuzz-icu, libxslt, libxml2 # optional dependencies , libgcrypt ? null # gnomeSupport || cupsSupport @@ -36,6 +37,8 @@ buildFun: with stdenv.lib; +# see http://www.linuxfromscratch.org/blfs/view/cvs/xsoft/chromium.html + let # The additional attributes for creating derivations based on the chromium # source tree. @@ -57,7 +60,7 @@ let in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs)); gnSystemLibraries = [ - "flac" "libwebp" "snappy" "yasm" + "ffmpeg" "flac" "harfbuzz-ng" "libwebp" "libxslt" "yasm" "snappy" # "libpng" "libjpeg" ]; opusWithCustomModes = libopus.override { @@ -70,6 +73,7 @@ let libpng libcap xdg_utils yasm minizip libwebp libusb1 re2 zlib + ffmpeg harfbuzz libxslt harfbuzz-icu libxml2 ]; # build paths and release info @@ -78,6 +82,11 @@ let buildPath = "out/${buildType}"; libExecPath = "$out/libexec/${packageName}"; + freetype_source = fetchurl { + url = http://anduin.linuxfromscratch.org/BLFS/other/chromium-freetype.tar.xz; + sha256 = "1vhslc4xg0d6wzlsi99zpah2xzjziglccrxn55k7qna634wyxg77"; + }; + base = rec { name = "${packageName}-${version}"; inherit (upstream-info) version; @@ -88,6 +97,7 @@ let nativeBuildInputs = [ ninja which python2Packages.python perl pkgconfig python2Packages.ply python2Packages.jinja2 nodejs + gnutar ]; buildInputs = defaultDependencies ++ [ @@ -108,6 +118,7 @@ let # To enable ChromeCast, go to chrome://flags and set "Load Media Router Component Extension" to Enabled # Fixes Chromecast: https://bugs.chromium.org/p/chromium/issues/detail?id=734325 ./patches/fix_network_api_crash.patch + ./patches/chromium-59.0.3071.115-system_ffmpeg-1.patch ] ++ optional (versionOlder version "57.0") ./patches/glibc-2.24.patch ++ optional enableWideVine ./patches/widevine.patch; @@ -139,6 +150,22 @@ let # use our own nodejs mkdir -p third_party/node/linux/node-linux-x64/bin ln -s $(which node) third_party/node/linux/node-linux-x64/bin/node + + # use patched freetype + # FIXME https://bugs.chromium.org/p/pdfium/issues/detail?id=733 + # FIXME http://savannah.nongnu.org/bugs/?51156 + tar -xJf ${freetype_source} + + # remove unused third-party + for lib in ${toString gnSystemLibraries}; do + find -type f -path "*third_party/$lib/*" \ + \! -path "*third_party/$lib/chromium/*" \ + \! -path "*third_party/$lib/google/*" \ + \! -path "*base/third_party/icu/*" \ + \! -path "*base/third_party/libevent/*" \ + \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \ + -delete + done ''; gnFlags = mkGnFlags ({ |