diff options
author | Marius Bakke <marius@gnu.org> | 2020-10-23 10:17:21 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-11-05 02:20:24 +0100 |
commit | 867e3830e6a3ee92317379e33d80c58a57107af4 (patch) | |
tree | a176c19d63d48e668fb01a17409631260fbd9584 /gnu/packages/patches | |
parent | f7d0a63ddabe864e26bbff8e633371e6ae856845 (diff) | |
download | guix-867e3830e6a3ee92317379e33d80c58a57107af4.tar.gz |
gnu: ungoogled-chromium: Add search path for installed extensions.
* gnu/packages/patches/ungoogled-chromium-extension-search-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/chromium.scm (%guix-patches): New variable. (ungoogled-chromium-snippet): Apply %GUIX-PATCHES. (ungoogled-chromium)[arguments]: Don't hard-code extensions directory. [native-search-paths]: New field.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ungoogled-chromium-extension-search-path.patch | 28 |
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 |