Merge pull request #194269 from imsl/rebar3WithPlugins-allow-override-rebar3

beam-modules/rebar3WithPlugins: Allow overriding the rebar3 package used
This commit is contained in:
Rickard Nilsson 2022-12-25 11:21:56 +01:00 committed by GitHub
commit bd374e4b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,11 @@ let
fi
'';
};
rebar3WithPlugins = { plugins ? [ ], globalPlugins ? [ ] }:
# Alias rebar3 so we can use it as default parameter below
_rebar3 = rebar3;
rebar3WithPlugins = { plugins ? [ ], globalPlugins ? [ ], rebar3 ? _rebar3 }:
let
pluginLibDirs = map (p: "${p}/lib/erlang/lib") (lib.unique (plugins ++ globalPlugins));
globalPluginNames = lib.unique (map (p: p.packageName) globalPlugins);