beamPackages: turn on debug_info for beam packages

This allows you to turn on debug infor for all the beam packages in the
system with a single change at the top level. This is required for
debugging and dialyzer work. It also allows you to switch it on on a
package by package basis.
This commit is contained in:
Eric Merritt
2016-06-15 07:20:01 -07:00
committed by Eric Merritt
parent de40133673
commit b1cd08246f
8 changed files with 74 additions and 17 deletions
+6 -2
View File
@@ -1,4 +1,4 @@
{ stdenv, writeText, elixir, erlang, hexRegistrySnapshot, hex }:
{ stdenv, writeText, elixir, erlang, hexRegistrySnapshot, hex, lib }:
{ name
, version
@@ -12,11 +12,15 @@
, buildPhase ? null
, configurePhase ? null
, meta ? {}
, enableDebugInfo ? false
, ... }@attrs:
with stdenv.lib;
let
debugInfoFlag = lib.optionalString (enableDebugInfo || elixir.debugInfo) "--debug-info";
shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}";
buildInputs = [ drv ];
@@ -58,7 +62,7 @@ let
export HEX_HOME=`pwd`
export MIX_ENV=prod
MIX_ENV=prod mix compile --debug-info --no-deps-check
MIX_ENV=prod mix compile ${debugInfoFlag} --no-deps-check
runHook postBuild
''