about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-05-28 19:08:15 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-05-28 19:15:39 +0200
commit79d18eb6045b33e081fbce4b66374ea75dfeeb5f (patch)
tree5a48e17938f24ed2743f634fa8f9b05a33e7aa36 /pkgs/applications
parentc7a3645e7bfe8bd6db7d3d9a320c2f07ea582347 (diff)
downloadnixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.tar
nixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.tar.gz
nixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.tar.bz2
nixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.tar.lz
nixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.tar.xz
nixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.tar.zst
nixlib-79d18eb6045b33e081fbce4b66374ea75dfeeb5f.zip
chromium: Update dev channel to v52.0.2743.10
With this update we need to rebase the nix_plugin_paths patch, which was
done by @srp and I took it from his comment at:

https://github.com/NixOS/nixpkgs/pull/15762#issuecomment-222230677

Other than that, using libjpeg from nixpkgs fails to link:

https://headcounter.org/hydra/build/1114273

Rather than just using versionAtLeast to check for >= version 52, we're
matching on the explicit version number. That way we can make sure that
we (try to) build with system libjpeg again so we can keep it out of the
overall Chromium build time.

Built and tested using the VM tests on my Hydra at:

https://headcounter.org/hydra/eval/322006

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix10
-rw-r--r--pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_52.patch70
-rw-r--r--pkgs/applications/networking/browsers/chromium/upstream-info.nix6
3 files changed, 81 insertions, 5 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 5db308d5ad32..4f4fbb8d3bf3 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -56,7 +56,8 @@ let
     use_system_flac = true;
     use_system_libevent = true;
     use_system_libexpat = true;
-    use_system_libjpeg = true;
+    # XXX: System libjpeg fails to link for version 52.0.2743.10
+    use_system_libjpeg = upstream-info.version != "52.0.2743.10";
     use_system_libpng = false;
     use_system_libwebp = true;
     use_system_libxml = true;
@@ -127,7 +128,9 @@ let
 
     patches = [
       ./patches/widevine.patch
-      ./patches/nix_plugin_paths_50.patch
+      (if versionOlder version "52.0.0.0"
+       then ./patches/nix_plugin_paths_50.patch
+       else ./patches/nix_plugin_paths_52.patch)
     ];
 
     postPatch = ''
@@ -145,6 +148,9 @@ let
 
       sed -i -re 's/([^:])\<(isnan *\()/\1std::\2/g' \
         chrome/browser/ui/webui/engagement/site_engagement_ui.cc
+    '' + optionalString (versionAtLeast version "52.0.0.0") ''
+      sed -i -re 's/([^:])\<(isnan *\()/\1std::\2/g' \
+        third_party/pdfium/xfa/fxbarcode/utils.h
     '';
 
     gypFlags = mkGypFlags (gypFlagsUseSystemLibs // {
diff --git a/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_52.patch b/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_52.patch
new file mode 100644
index 000000000000..fc1b609479b2
--- /dev/null
+++ b/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_52.patch
@@ -0,0 +1,70 @@
+diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
+index f4e119d..d9775bd 100644
+--- a/chrome/common/chrome_paths.cc
++++ b/chrome/common/chrome_paths.cc
+@@ -68,21 +68,14 @@ static base::LazyInstance<base::FilePath>
+     g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
+ 
+ // Gets the path for internal plugins.
+-bool GetInternalPluginsDirectory(base::FilePath* result) {
+-#if defined(OS_MACOSX)
+-  // If called from Chrome, get internal plugins from a subdirectory of the
+-  // framework.
+-  if (base::mac::AmIBundled()) {
+-    *result = chrome::GetFrameworkBundlePath();
+-    DCHECK(!result->empty());
+-    *result = result->Append("Internet Plug-Ins");
+-    return true;
+-  }
+-  // In tests, just look in the module directory (below).
+-#endif
+-
+-  // The rest of the world expects plugins in the module directory.
+-  return PathService::Get(base::DIR_MODULE, result);
++bool GetInternalPluginsDirectory(base::FilePath* result,
++                                 const std::string& ident) {
++  std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
++  const char* value = getenv(full_env.c_str());
++  if (value == NULL)
++      return PathService::Get(base::DIR_MODULE, result);
++  else
++      *result = base::FilePath(value);
+ }
+ 
+ // Gets the path for bundled implementations of components. Note that these
+@@ -272,7 +265,7 @@ bool PathProvider(int key, base::FilePath* result) {
+       create_dir = true;
+       break;
+     case chrome::DIR_INTERNAL_PLUGINS:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "ALL"))
+         return false;
+       break;
+     case chrome::DIR_COMPONENTS:
+@@ -280,7 +273,7 @@ bool PathProvider(int key, base::FilePath* result) {
+         return false;
+       break;
+     case chrome::DIR_PEPPER_FLASH_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
+         return false;
+       cur = cur.Append(kPepperFlashBaseDirectory);
+       break;
+@@ -323,7 +316,7 @@ bool PathProvider(int key, base::FilePath* result) {
+     // We currently need a path here to look up whether the plugin is disabled
+     // and what its permissions are.
+     case chrome::FILE_NACL_PLUGIN:
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "NACL"))
+         return false;
+       cur = cur.Append(kInternalNaClPluginFileName);
+       break;
+@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
+         cur = cur.DirName();
+       }
+ #else
+-      if (!GetInternalPluginsDirectory(&cur))
++      if (!GetInternalPluginsDirectory(&cur, "PNACL"))
+         return false;
+ #endif
+       cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix
index 7f3572021b8c..073d75745021 100644
--- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix
+++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix
@@ -6,9 +6,9 @@
     version = "51.0.2704.63";
   };
   dev = {
-    sha256 = "0czp4p434yqr5rv3w2vypkyis13x8lc4xph8yh84r9big1ga6fqs";
-    sha256bin64 = "0hahamx9k14czswqdh8iwh69lsml0acca5kxvp2kw471g3s55n78";
-    version = "52.0.2729.3";
+    sha256 = "1bbwbn0svgr2pfkza8pdq61bjzlj50axdm5bqqxi51hab51fc9ww";
+    sha256bin64 = "1s02q72b84g9p5i7y1hh1c67qjb92934dqqwd7w6j0jz8ix71nzc";
+    version = "52.0.2743.10";
   };
   stable = {
     sha256 = "1sgfwh2b0aw6l5v4ggk7frcy306x3ygxk81p3h6zdy5s1rpf8hxj";