summary refs log tree commit diff
path: root/pkgs/development/erlang-modules/build-rebar3.nix
diff options
context:
space:
mode:
authorGleb Peregud <gleber.p@gmail.com>2016-01-17 21:00:12 +0100
committerGleb Peregud <gleber.p@gmail.com>2016-01-17 21:59:27 +0100
commited4373e8b7f4572556596954ec4c3819c521b77e (patch)
treee52b6d26d56fa959f9920dacbe354a1106402d0c /pkgs/development/erlang-modules/build-rebar3.nix
parent75284b09e16f3168abc5273a9ed28d1fb4b33adf (diff)
downloadnixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.tar
nixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.tar.gz
nixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.tar.bz2
nixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.tar.lz
nixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.tar.xz
nixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.tar.zst
nixpkgs-ed4373e8b7f4572556596954ec4c3819c521b77e.zip
Pass buildPlugins to rebar3-nix-bootstrap.
To successfully build rebar packages, it needs to be provided with
rebar3 plugins used to build it. This change passes them to env
variable. From there rebar3-nix-bootstrap takes them and symlinks into
_build/default/plugins.
Diffstat (limited to 'pkgs/development/erlang-modules/build-rebar3.nix')
-rw-r--r--pkgs/development/erlang-modules/build-rebar3.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/development/erlang-modules/build-rebar3.nix b/pkgs/development/erlang-modules/build-rebar3.nix
index 6ad82b62158..8033d6c838e 100644
--- a/pkgs/development/erlang-modules/build-rebar3.nix
+++ b/pkgs/development/erlang-modules/build-rebar3.nix
@@ -4,7 +4,7 @@
 { name, version
 , src
 , setupHook ? null
-, buildInputs ? [], erlangDeps ? [], pluginDeps ? []
+, buildInputs ? [], erlangDeps ? [], buildPlugins ? []
 , postPatch ? ""
 , compilePorts ? false
 , installPhase ? null
@@ -14,8 +14,7 @@
 with stdenv.lib;
 
 let
-  plugins = pluginDeps ++ (if compilePorts then [pc] else []);
-
+  ownPlugins = buildPlugins ++ (if compilePorts then [pc] else []);
 
   shell = drv: stdenv.mkDerivation {
           name = "interactive-shell-${drv.name}";
@@ -28,7 +27,11 @@ let
     inherit version;
 
     buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
-    propagatedBuildInputs = erlangDeps ++ plugins;
+    propagatedBuildInputs = unique (erlangDeps ++ ownPlugins);
+
+    # The following are used by rebar3-nix-bootstrap
+    inherit compilePorts;
+    buildPlugins = ownPlugins;
 
     inherit src;