fetchMixDeps, mixRelease: move env variables into env (#489754)
This commit is contained in:
@@ -53,17 +53,20 @@ stdenvNoCC.mkDerivation (
|
||||
git
|
||||
];
|
||||
|
||||
MIX_ENV = mixEnv;
|
||||
MIX_TARGET = mixTarget;
|
||||
MIX_DEBUG = if debug then 1 else 0;
|
||||
DEBUG = if debug then 1 else 0; # for rebar3
|
||||
# the api with `mix local.rebar rebar path` makes a copy of the binary
|
||||
MIX_REBAR = "${rebar}/bin/rebar";
|
||||
MIX_REBAR3 = "${rebar3}/bin/rebar3";
|
||||
# there is a persistent download failure with absinthe 1.6.3
|
||||
# those defaults reduce the failure rate
|
||||
HEX_HTTP_CONCURRENCY = 1;
|
||||
HEX_HTTP_TIMEOUT = 120;
|
||||
env = {
|
||||
MIX_ENV = mixEnv;
|
||||
MIX_TARGET = mixTarget;
|
||||
MIX_DEBUG = if debug then 1 else 0;
|
||||
DEBUG = if debug then 1 else 0; # for rebar3
|
||||
# the api with `mix local.rebar rebar path` makes a copy of the binary
|
||||
MIX_REBAR = "${rebar}/bin/rebar";
|
||||
MIX_REBAR3 = "${rebar3}/bin/rebar3";
|
||||
# there is a persistent download failure with absinthe 1.6.3
|
||||
# those defaults reduce the failure rate
|
||||
HEX_HTTP_CONCURRENCY = 1;
|
||||
HEX_HTTP_TIMEOUT = 120;
|
||||
}
|
||||
// (attrs.env or { });
|
||||
|
||||
configurePhase =
|
||||
attrs.configurePhase or ''
|
||||
|
||||
@@ -123,28 +123,31 @@ stdenv.mkDerivation (
|
||||
|
||||
buildInputs = buildInputs ++ lib.optionals (escriptBinName != null) [ erlang ];
|
||||
|
||||
MIX_ENV = mixEnv;
|
||||
MIX_TARGET = mixTarget;
|
||||
MIX_BUILD_PREFIX = (if mixTarget == "host" then "" else "${mixTarget}_") + "${mixEnv}";
|
||||
MIX_DEBUG = if enableDebugInfo then 1 else 0;
|
||||
HEX_OFFLINE = 1;
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
DEBUG = if enableDebugInfo then 1 else 0; # for Rebar3 compilation
|
||||
# The API with `mix local.rebar rebar path` makes a copy of the binary
|
||||
# some older dependencies still use rebar.
|
||||
MIX_REBAR = "${rebar}/bin/rebar";
|
||||
MIX_REBAR3 = "${rebar3}/bin/rebar3";
|
||||
env = {
|
||||
MIX_ENV = mixEnv;
|
||||
MIX_TARGET = mixTarget;
|
||||
MIX_BUILD_PREFIX = (if mixTarget == "host" then "" else "${mixTarget}_") + "${mixEnv}";
|
||||
MIX_DEBUG = if enableDebugInfo then 1 else 0;
|
||||
HEX_OFFLINE = 1;
|
||||
|
||||
ERL_COMPILER_OPTIONS =
|
||||
let
|
||||
options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ "deterministic" ];
|
||||
in
|
||||
"[${lib.concatStringsSep "," options}]";
|
||||
DEBUG = if enableDebugInfo then 1 else 0; # for Rebar3 compilation
|
||||
# The API with `mix local.rebar rebar path` makes a copy of the binary
|
||||
# some older dependencies still use rebar.
|
||||
MIX_REBAR = "${rebar}/bin/rebar";
|
||||
MIX_REBAR3 = "${rebar3}/bin/rebar3";
|
||||
|
||||
LANG = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "C";
|
||||
LC_CTYPE = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "UTF-8";
|
||||
ERL_COMPILER_OPTIONS =
|
||||
let
|
||||
options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ "deterministic" ];
|
||||
in
|
||||
"[${lib.concatStringsSep "," options}]";
|
||||
|
||||
LANG = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "C";
|
||||
LC_CTYPE = if stdenv.hostPlatform.isLinux then "C.UTF-8" else "UTF-8";
|
||||
}
|
||||
// (attrs.env or { });
|
||||
|
||||
postUnpack = ''
|
||||
# Mix and Hex
|
||||
|
||||
Reference in New Issue
Block a user