summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/chromium/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/browsers/chromium/default.nix')
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix36
1 files changed, 18 insertions, 18 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index 33f9283b47ad..acfb43e7caaa 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -5,6 +5,7 @@
 , libevent, expat, libjpeg
 , libpng, libxml2, libxslt
 , xdg_utils, yasm, zlib
+, libusb1, libexif
 
 , python, perl, pkgconfig
 , nspr, udev, krb5
@@ -55,21 +56,23 @@ let
     use_system_flac = true;
     use_system_libevent = true;
     use_system_libexpat = true;
+    use_system_libexif = true;
     use_system_libjpeg = true;
     use_system_libpng = true;
+    use_system_libusb = true;
     use_system_libxml = true;
     use_system_speex = true;
     use_system_ssl = cfg.openssl;
     use_system_stlport = true;
     use_system_xdg_utils = true;
     use_system_yasm = true;
-    use_system_zlib = true;
+    use_system_zlib = false; # http://crbug.com/143623
 
     use_system_harfbuzz = false;
     use_system_icu = false;
-    use_system_libwebp = false; # See chromium issue #133161
+    use_system_libwebp = false; # http://crbug.com/133161
     use_system_skia = false;
-    use_system_sqlite = false; # See chromium issue #22208
+    use_system_sqlite = false; # http://crbug.com/22208
     use_system_v8 = false;
   };
 
@@ -78,23 +81,20 @@ let
     libevent expat libjpeg
     libpng libxml2 libxslt
     xdg_utils yasm zlib
+    libusb1 libexif
   ];
 
-  seccompPatch = let
-    pre22 = versionOlder sourceInfo.version "22.0.0.0";
-  in if pre22 then ./enable_seccomp.patch else ./enable_seccomp22.patch;
+  maybeSeccompPatch = let
+    pre23 = versionOlder sourceInfo.version "23.0.0.0";
+  in optional pre23 ./enable_seccomp.patch;
 
-  # XXX: this reverts r151720 to prevent http://crbug.com/143623
-  maybeRevertZlibChanges = let
-    below22 = versionOlder sourceInfo.version "22.0.0.0";
+  maybeBpfTemporaryFix = let
     patch = fetchurl {
-      name = "revert-r151720";
-      url = "http://git.chromium.org/gitweb/?p=chromium.git;a=commitdiff_plain;"
-          + "hp=4419ec6414b33b6b19bb2e380b4998ed5193ecab;"
-          + "h=0fabb4fda7059a8757422e8a44e70deeab28e698";
-      sha256 = "0n0d6mkg89g8q63cifapzpg9dxfs2n6xvk4k13szhymvf67b77pf";
+      url = "https://chromiumcodereview.appspot.com/download/issue11073003_6001_7001.diff";
+      sha256 = "bf61871cdaa8fea27ce15482a17048f67b426a55813c3832f9bd39ec47a9eb06";
     };
-  in optional (!below22) patch;
+    needPatch = !versionOlder sourceInfo.version "23.0.1271.0";
+  in optional needPatch patch;
 
 in stdenv.mkDerivation rec {
   name = "${packageName}-${version}";
@@ -127,10 +127,10 @@ in stdenv.mkDerivation rec {
 
   prePatch = "patchShebangs .";
 
-  patches = optional (!cfg.selinux) seccompPatch
-         ++ optional cfg.cups ./cups_allow_deprecated.patch
+  patches = optional cfg.cups ./cups_allow_deprecated.patch
          ++ optional cfg.pulseaudio ./pulseaudio_array_bounds.patch
-         ++ maybeRevertZlibChanges;
+         ++ maybeSeccompPatch
+         ++ maybeBpfTemporaryFix;
 
   postPatch = optionalString cfg.openssl ''
     cat $opensslPatches | patch -p1 -d third_party/openssl/openssl