beamPackages.mixRelease: deterministic erlang builds
This commit is contained in:
parent
87e5690bba
commit
4600a9d607
@ -25,6 +25,12 @@
|
|||||||
, mixEnv ? "prod"
|
, mixEnv ? "prod"
|
||||||
, compileFlags ? [ ]
|
, compileFlags ? [ ]
|
||||||
|
|
||||||
|
# Options to be passed to the Erlang compiler. As documented in the reference
|
||||||
|
# manual, these must be valid Erlang terms. They will be turned into an
|
||||||
|
# erlang list and set as the ERL_COMPILER_OPTIONS environment variable.
|
||||||
|
# See https://www.erlang.org/doc/man/compile
|
||||||
|
, erlangCompilerOptions ? [ ]
|
||||||
|
|
||||||
# Mix dependencies provided as a fixed output derivation
|
# Mix dependencies provided as a fixed output derivation
|
||||||
, mixFodDeps ? null
|
, mixFodDeps ? null
|
||||||
|
|
||||||
@ -63,7 +69,7 @@
|
|||||||
}@attrs:
|
}@attrs:
|
||||||
let
|
let
|
||||||
# Remove non standard attributes that cannot be coerced to strings
|
# Remove non standard attributes that cannot be coerced to strings
|
||||||
overridable = builtins.removeAttrs attrs [ "compileFlags" "mixNixDeps" ];
|
overridable = builtins.removeAttrs attrs [ "compileFlags" "erlangCompilerOptions" "mixNixDeps" ];
|
||||||
in
|
in
|
||||||
assert mixNixDeps != { } -> mixFodDeps == null;
|
assert mixNixDeps != { } -> mixFodDeps == null;
|
||||||
assert stripDebug -> !enableDebugInfo;
|
assert stripDebug -> !enableDebugInfo;
|
||||||
@ -89,6 +95,8 @@ stdenv.mkDerivation (overridable // {
|
|||||||
MIX_REBAR = "${rebar}/bin/rebar";
|
MIX_REBAR = "${rebar}/bin/rebar";
|
||||||
MIX_REBAR3 = "${rebar3}/bin/rebar3";
|
MIX_REBAR3 = "${rebar3}/bin/rebar3";
|
||||||
|
|
||||||
|
ERL_COMPILER_OPTIONS = "[${lib.strings.concatStringsSep "," ([ "deterministic" ] ++ erlangCompilerOptions)}]";
|
||||||
|
|
||||||
LC_ALL = "C.UTF-8";
|
LC_ALL = "C.UTF-8";
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user