Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions pkgs/development/beam-modules/build-rebar3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
buildPhase ? null,
configurePhase ? null,
meta ? { },
enableDebugInfo ? false,
erlangCompilerOptions ? [ ],
# Deterministic Erlang builds remove full system paths from debug information
# among other things to keep builds more reproducible. See their docs for more:
# https://www.erlang.org/doc/man/compile
erlangDeterministicBuilds ? true,
...
}@attrs:

let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";

rebar3 = rebar3WithPlugins {
plugins = buildPlugins;
};
Expand Down Expand Up @@ -67,6 +69,12 @@ let

inherit src;

ERL_COMPILER_OPTIONS =
let
options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ "deterministic" ];
in
"[${lib.concatStringsSep "," options}]";

# stripping does not have any effect on beam files
# it is however needed for dependencies with NIFs
# false is the default but we keep this for readability
Expand Down
Loading