summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/build-managers/rebar3/global-plugins.patch')
-rw-r--r--pkgs/development/tools/build-managers/rebar3/global-plugins.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/rebar3/global-plugins.patch b/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
new file mode 100644
index 00000000000..9a8bb48f988
--- /dev/null
+++ b/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
@@ -0,0 +1,14 @@
+diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl
+index f2d22233..bee2cf18 100644
+--- a/src/rebar_plugins.erl
++++ b/src/rebar_plugins.erl
+@@ -30,7 +30,8 @@ project_plugins_install(State) ->
+ top_level_install(State) ->
+     Profiles = rebar_state:current_profiles(State),
+     lists:foldl(fun(Profile, StateAcc) ->
+-                        Plugins = rebar_state:get(State, {plugins, Profile}, []),
++                        Plugins = rebar_state:get(State, {plugins, Profile}, [])
++                            ++ [list_to_atom(P) || P <- string:lexemes(os:getenv("REBAR_GLOBAL_PLUGINS", ""), " ")],
+                         handle_plugins(Profile, Plugins, StateAcc)
+                 end, State, Profiles).
+