erlang support: overridable allow installPhase

This commit allows the installPhase of buildRebar3 to be overridden by
the user.
This commit is contained in:
Eric Merritt 2016-01-10 18:39:37 -08:00
parent 6a493a2b43
commit acf4bfd585
1 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@
, buildInputs ? [], erlangDeps ? [], pluginDeps ? [] , buildInputs ? [], erlangDeps ? [], pluginDeps ? []
, postPatch ? "" , postPatch ? ""
, compilePorts ? false , compilePorts ? false
, installPhase ? null
, meta ? {} , meta ? {}
, ... }@attrs: , ... }@attrs:
@ -56,7 +57,8 @@ let
runHook postBuild runHook postBuild
''; '';
installPhase = '' installPhase = if installPhase == null
then ''
runHook preInstall runHook preInstall
mkdir -p "$out/lib/erlang/lib/${name}-${version}" mkdir -p "$out/lib/erlang/lib/${name}-${version}"
for reldir in src ebin priv include; do for reldir in src ebin priv include; do
@ -66,7 +68,8 @@ let
success=1 success=1
done done
runHook postInstall runHook postInstall
''; ''
else installPhase;
meta = { meta = {
inherit (erlang.meta) platforms; inherit (erlang.meta) platforms;