···21 buildPhase ? null,
22 configurePhase ? null,
23 meta ? { },
24- enableDebugInfo ? false,
000025 ...
26}@attrs:
2728let
29- debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";
30-31 rebar3 = rebar3WithPlugins {
32 plugins = buildPlugins;
33 };
···66 propagatedBuildInputs = lib.unique beamDeps;
6768 inherit src;
0000006970 # stripping does not have any effect on beam files
71 # it is however needed for dependencies with NIFs
···21 buildPhase ? null,
22 configurePhase ? null,
23 meta ? { },
24+ erlangCompilerOptions ? [ ],
25+ # Deterministic Erlang builds remove full system paths from debug information
26+ # among other things to keep builds more reproducible. See their docs for more:
27+ # https://www.erlang.org/doc/man/compile
28+ erlangDeterministicBuilds ? true,
29 ...
30}@attrs:
3132let
0033 rebar3 = rebar3WithPlugins {
34 plugins = buildPlugins;
35 };
···68 propagatedBuildInputs = lib.unique beamDeps;
6970 inherit src;
71+72+ ERL_COMPILER_OPTIONS =
73+ let
74+ options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ "deterministic" ];
75+ in
76+ "[${lib.concatStringsSep "," options}]";
7778 # stripping does not have any effect on beam files
79 # it is however needed for dependencies with NIFs