depot/pkgs/desktops/pantheon/apps/switchboard/plugs-path-env.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

21 lines
751 B
Diff

diff --git a/lib/PlugsManager.vala b/lib/PlugsManager.vala
index 8b21e7b..bc36321 100644
--- a/lib/PlugsManager.vala
+++ b/lib/PlugsManager.vala
@@ -36,7 +36,15 @@ public class Switchboard.PlugsManager : GLib.Object {
private PlugsManager () {
plugs = new Gee.LinkedList<Switchboard.Plug> ();
- var base_folder = File.new_for_path (Build.PLUGS_DIR);
+
+ var plugs_path = Environment.get_variable("SWITCHBOARD_PLUGS_PATH");
+ if (plugs_path != null) {
+ debug ("SWITCHBOARD_PLUGS_PATH set to %s", plugs_path);
+ } else {
+ critical ("SWITCHBOARD_PLUGS_PATH not set");
+ }
+
+ var base_folder = File.new_for_path (plugs_path);
find_plugins (base_folder);
}