diff options
Diffstat (limited to 'nixpkgs/pkgs/development/beam-modules/build-mix.nix')
-rw-r--r-- | nixpkgs/pkgs/development/beam-modules/build-mix.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/beam-modules/build-mix.nix b/nixpkgs/pkgs/development/beam-modules/build-mix.nix index 081d4988bace..f74da7b7827d 100644 --- a/nixpkgs/pkgs/development/beam-modules/build-mix.nix +++ b/nixpkgs/pkgs/development/beam-modules/build-mix.nix @@ -12,6 +12,9 @@ , meta ? { } , enableDebugInfo ? false , mixEnv ? "prod" +# A config directory that is considered for all the dependencies of an app, typically in $src/config/ +# This was initially added, as some of Mobilizon's dependencies need to access the config at build time. +, appConfigPath ? null , ... }@attrs: @@ -28,6 +31,7 @@ let MIX_ENV = mixEnv; MIX_DEBUG = if enableDebugInfo then 1 else 0; HEX_OFFLINE = 1; + LC_ALL = "C.UTF-8"; # add to ERL_LIBS so other modules can find at runtime. # http://erlang.org/doc/man/code.html#code-path @@ -45,6 +49,14 @@ let runHook preConfigure ${./mix-configure-hook.sh} + ${lib.optionalString (!isNull appConfigPath) + # Due to https://hexdocs.pm/elixir/main/Config.html the config directory + # of a library seems to be not considered, as config is always + # application specific. So we can safely delete it. + '' + rm -rf config + cp -r ${appConfigPath} config + ''} runHook postConfigure ''; |