diff --git a/pkgs/applications/networking/browsers/chromium/source/build_fixes_46.patch b/pkgs/applications/networking/browsers/chromium/source/build_fixes_46.patch
new file mode 100644
index 00000000000..c0aeb5d3a56
--- /dev/null
+++ b/pkgs/applications/networking/browsers/chromium/source/build_fixes_46.patch
@@ -0,0 +1,14 @@
+diff --git a/chrome/test/data/webui_test_resources.grd b/chrome/test/data/webui_test_resources.grd
+index 6f8530d..f92a76a 100644
+--- a/chrome/test/data/webui_test_resources.grd
++++ b/chrome/test/data/webui_test_resources.grd
+@@ -6,9 +6,4 @@
+
+
+
+-
+-
+-
+-
+-
+
diff --git a/pkgs/applications/networking/browsers/chromium/source/default.nix b/pkgs/applications/networking/browsers/chromium/source/default.nix
index 98445cedfdc..732568291d3 100644
--- a/pkgs/applications/networking/browsers/chromium/source/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/default.nix
@@ -44,7 +44,11 @@ in stdenv.mkDerivation {
done
'';
- patches = singleton ./nix_plugin_paths_44.patch;
+ patches =
+ if versionOlder version "45.0.0.0"
+ then singleton ./nix_plugin_paths_44.patch
+ else singleton ./nix_plugin_paths_46.patch ++
+ optional (!versionOlder version "46.0.0.0") ./build_fixes_46.patch;
patchPhase = let
diffmod = sym: "/^${sym} /{s/^${sym} //;${transform ""};s/^/${sym} /}";
diff --git a/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_46.patch b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_46.patch
new file mode 100644
index 00000000000..7482be7062d
--- /dev/null
+++ b/pkgs/applications/networking/browsers/chromium/source/nix_plugin_paths_46.patch
@@ -0,0 +1,75 @@
+diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
+index 74bf041..5f34198 100644
+--- a/chrome/common/chrome_paths.cc
++++ b/chrome/common/chrome_paths.cc
+@@ -66,21 +66,14 @@ static base::LazyInstance
+ g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
+
+ // Gets the path for internal plugins.
+-bool GetInternalPluginsDirectory(base::FilePath* result) {
+-#if defined(OS_MACOSX) && !defined(OS_IOS)
+- // 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);
+ }
+
+ #if defined(OS_WIN)
+@@ -253,11 +246,11 @@ 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_PEPPER_FLASH_PLUGIN:
+- if (!GetInternalPluginsDirectory(&cur))
++ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
+ return false;
+ cur = cur.Append(kPepperFlashBaseDirectory);
+ break;
+@@ -314,7 +307,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;
+@@ -349,7 +342,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"));
+@@ -366,7 +359,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ // In the component case, this is the source adapter. Otherwise, it is the
+ // actual Pepper module that gets loaded.
+ case chrome::FILE_WIDEVINE_CDM_ADAPTER:
+- if (!GetInternalPluginsDirectory(&cur))
++ if (!GetInternalPluginsDirectory(&cur, "WIDEVINE"))
+ return false;
+ cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
+ break;
diff --git a/pkgs/applications/networking/browsers/chromium/source/sources.nix b/pkgs/applications/networking/browsers/chromium/source/sources.nix
index c3cc9c3ed18..e3c07acd08b 100644
--- a/pkgs/applications/networking/browsers/chromium/source/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/source/sources.nix
@@ -1,16 +1,16 @@
# This file is autogenerated from update.sh in the parent directory.
{
dev = {
- version = "45.0.2454.15";
- sha256 = "1zg562cpn9ddai92jdjg3frhmvbhbkf71ysprwqa3rgbg6w8ipzj";
- sha256bin32 = "1fcwzwb6zq7ld7fs0iws0d9jmxhjhdax4y744dx4d7bc77357x3m";
- sha256bin64 = "0273dy5b1r9s9g8ixrafnxm8jnn4ha36r3b3ckdabm9y4pqwx54s";
+ version = "46.0.2471.2";
+ sha256 = "1gmdcb4sjc2l9y46ybpr64gnzjg3bi93x4f42bssrb3nzhpjpmgg";
+ sha256bin32 = "11rg4rkw89zvvxlpil680n59y49w9msxg4qp93iilq0n7ppk5qx9";
+ sha256bin64 = "1xqibl37mr6xvqqd1ainvkv11shirxb7ay9sfjgq8k72xk7wdx8k";
};
beta = {
- version = "45.0.2454.15";
- sha256 = "1zg562cpn9ddai92jdjg3frhmvbhbkf71ysprwqa3rgbg6w8ipzj";
- sha256bin32 = "1scjirp54z08h36zs9z9yq4pxcximf00krlip9dkvxsxh65qiw5w";
- sha256bin64 = "14l8lka8jci1d90vbz5kpl20mk98n1ak4mw667dkz89cch5gal4s";
+ version = "45.0.2454.26";
+ sha256 = "0ghgvll1q6nw1ds139nmabbilagffyln7k313w1yvn707wp7yg33";
+ sha256bin32 = "0611ad202vck0zi0jcldcr4j81kd9cnabsc9kssc6m46fy5rhhbk";
+ sha256bin64 = "0bwmpl7rq2nj0jf1xqx7n1mvx9kigbvpz2f8v0azwv4nb56p9c2q";
};
stable = {
version = "44.0.2403.130";