From 8419e265f3ec000017d40b321f22c3cb6f6a6753 Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Thu, 15 Sep 2022 22:27:45 +0200 Subject: [PATCH] beam-modules/rebar3WithPlugins: Allow overriding the rebar3 package used --- pkgs/development/tools/build-managers/rebar3/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/rebar3/default.nix b/pkgs/development/tools/build-managers/rebar3/default.nix index c7b6f72ac8ec..5791ed830a6f 100644 --- a/pkgs/development/tools/build-managers/rebar3/default.nix +++ b/pkgs/development/tools/build-managers/rebar3/default.nix @@ -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);