diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 9fbc8959ad26..5db308d5ad32 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -57,7 +57,7 @@ let
use_system_libevent = true;
use_system_libexpat = true;
use_system_libjpeg = true;
- use_system_libpng = versionOlder upstream-info.version "51.0.0.0";
+ use_system_libpng = false;
use_system_libwebp = true;
use_system_libxml = true;
use_system_opus = true;
@@ -123,15 +123,11 @@ let
++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
++ optional enableSELinux libselinux
++ optionals cupsSupport [ libgcrypt cups ]
- ++ optional pulseSupport libpulseaudio
- ++ optional (versionOlder version "51.0.0.0") libexif;
+ ++ optional pulseSupport libpulseaudio;
patches = [
- ./patches/build_fixes_46.patch
./patches/widevine.patch
- (if versionOlder version "50.0.0.0"
- then ./patches/nix_plugin_paths_46.patch
- else ./patches/nix_plugin_paths_50.patch)
+ ./patches/nix_plugin_paths_50.patch
];
postPatch = ''
@@ -141,18 +137,12 @@ let
-e "/python_arch/s/: *'[^']*'/: '""'/" \
build/common.gypi chrome/chrome_tests.gypi
- ${optionalString (versionOlder version "51.0.0.0") ''
- sed -i -e '/module_path *=.*libexif.so/ {
- s|= [^;]*|= base::FilePath().AppendASCII("${libexif}/lib/libexif.so")|
- }' chrome/utility/media_galleries/image_metadata_extractor.cc
- ''}
-
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${libudev.out}/lib/\1!' \
device/udev_linux/udev?_loader.cc
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
gpu/config/gpu_info_collector_linux.cc
- '' + optionalString (!versionOlder version "51.0.0.0") ''
+
sed -i -re 's/([^:])\<(isnan *\()/\1std::\2/g' \
chrome/browser/ui/webui/engagement/site_engagement_ui.cc
'';
@@ -185,9 +175,6 @@ let
google_api_key = "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI";
google_default_client_id = "404761575300.apps.googleusercontent.com";
google_default_client_secret = "9rIFQjfnkykEmqb6FfjJQD1D";
-
- } // optionalAttrs (versionOlder version "51.0.0.0") {
- use_system_libexif = true;
} // optionalAttrs proprietaryCodecs {
# enable support for the H.264 codec
proprietary_codecs = true;
diff --git a/pkgs/applications/networking/browsers/chromium/patches/build_fixes_46.patch b/pkgs/applications/networking/browsers/chromium/patches/build_fixes_46.patch
deleted file mode 100644
index c0aeb5d3a56c..000000000000
--- a/pkgs/applications/networking/browsers/chromium/patches/build_fixes_46.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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/patches/nix_plugin_paths_46.patch b/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_46.patch
deleted file mode 100644
index 7482be7062d0..000000000000
--- a/pkgs/applications/networking/browsers/chromium/patches/nix_plugin_paths_46.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-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;