build-erlang-mk: add support for buildFlags
This commit is contained in:
parent
79b9007c94
commit
5a558ea4d9
1 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
, configurePhase ? null
|
, configurePhase ? null
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
, enableDebugInfo ? false
|
, enableDebugInfo ? false
|
||||||
|
, buildFlags ? []
|
||||||
, ... }@attrs:
|
, ... }@attrs:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
@ -42,6 +43,10 @@ let
|
||||||
buildInputs = [ erlang perl which gitMinimal wget ];
|
buildInputs = [ erlang perl which gitMinimal wget ];
|
||||||
propagatedBuildInputs = beamDeps;
|
propagatedBuildInputs = beamDeps;
|
||||||
|
|
||||||
|
buildFlags = [ "SKIP_DEPS=1" ]
|
||||||
|
++ lib.optional (enableDebugInfo || erlang.debugInfo) ''ERL_OPTS="$ERL_OPTS +debug_info"''
|
||||||
|
++ buildFlags;
|
||||||
|
|
||||||
configurePhase = if configurePhase == null
|
configurePhase = if configurePhase == null
|
||||||
then ''
|
then ''
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
|
@ -58,7 +63,7 @@ let
|
||||||
then ''
|
then ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
make SKIP_DEPS=1 ERL_OPTS="$ERL_OPTS ${debugInfoFlag}"
|
make $buildFlags "''${buildFlagsArray[@]}"
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue