mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
867e3830e6
* 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.
28 lines
911 B
Diff
28 lines
911 B
Diff
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
|