summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-11-07 21:33:32 +0100
committerMarius Bakke <marius@gnu.org>2020-11-07 21:33:32 +0100
commit32787d652460871a79f99b63230f92759e2e0de2 (patch)
treece883cac0d602b10b7c005755d035a08197e73a9 /gnu/packages/patches/ungoogled-chromium-extension-search-path.patch
parent052939c2f6e36de00a5e756ea29a4cc96884a55d (diff)
parentc2396ceb6eb30ac87755eb8b39583403b35fbd12 (diff)
downloadguix-patches-32787d652460871a79f99b63230f92759e2e0de2.tar
guix-patches-32787d652460871a79f99b63230f92759e2e0de2.tar.gz
Merge branch 'master' into staging
Conflicts: gnu/local.mk gnu/packages/gdb.scm gnu/packages/lisp-xyz.scm gnu/packages/web-browsers.scm
Diffstat (limited to 'gnu/packages/patches/ungoogled-chromium-extension-search-path.patch')
-rw-r--r--gnu/packages/patches/ungoogled-chromium-extension-search-path.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch b/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch
new file mode 100644
index 0000000000..5ce219ccc7
--- /dev/null
+++ b/gnu/packages/patches/ungoogled-chromium-extension-search-path.patch
@@ -0,0 +1,28 @@
+Look for extensions in $CHROMIUM_EXTENSION_DIRECTORY instead of
+/usr/share/chromium/extensions.
+
+--- a/chrome/common/chrome_paths.cc
++++ b/chrome/common/chrome_paths.cc
+@@ -4,6 +4,7 @@
+
+ #include "chrome/common/chrome_paths.h"
+
++#include "base/environment.h"
+ #include "base/files/file_util.h"
+ #include "base/logging.h"
+ #include "base/native_library.h"
+@@ -511,7 +512,13 @@
+ #endif
+ #if defined(OS_LINUX) || defined(OS_CHROMEOS)
+ case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
+- cur = base::FilePath(kFilepathSinglePrefExtensions);
++ std::unique_ptr<base::Environment> environment(base::Environment::Create());
++ std::string extension_dir;
++ if (environment->GetVar("CHROMIUM_EXTENSION_DIRECTORY", &extension_dir)) {
++ cur = base::FilePath(extension_dir);
++ } else {
++ cur = base::FilePath(kFilepathSinglePrefExtensions);
++ }
+ break;
+ }
+ #endif