mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
beamPackages.mixRelease: Make determinism toggleable
This commit is contained in:
parent
c865c66216
commit
2d5053fca3
@ -6,6 +6,10 @@
|
||||
, buildInputs ? [ ]
|
||||
, nativeBuildInputs ? [ ]
|
||||
, 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
|
||||
, beamDeps ? [ ]
|
||||
, propagatedBuildInputs ? [ ]
|
||||
, postPatch ? ""
|
||||
@ -35,7 +39,7 @@ let
|
||||
|
||||
ERL_COMPILER_OPTIONS =
|
||||
let
|
||||
options = [ "deterministic" ] ++ erlangCompilerOptions;
|
||||
options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ "deterministic" ];
|
||||
in
|
||||
"[${lib.concatStringsSep "," options}]";
|
||||
|
||||
|
@ -33,6 +33,11 @@
|
||||
# See https://www.erlang.org/doc/man/compile
|
||||
, 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
|
||||
|
||||
# Mix dependencies provided as a fixed output derivation
|
||||
, mixFodDeps ? null
|
||||
|
||||
@ -100,7 +105,7 @@ stdenv.mkDerivation (overridable // {
|
||||
|
||||
ERL_COMPILER_OPTIONS =
|
||||
let
|
||||
options = [ "deterministic" ] ++ erlangCompilerOptions;
|
||||
options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ "deterministic" ];
|
||||
in
|
||||
"[${lib.concatStringsSep "," options}]";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user