mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 14:57:49 +00:00
beam/buildMix: add appConfigPath arg
This is added for Mobilizon to be able to let it's dependencies read it's config directory
This commit is contained in:
parent
808cfccb66
commit
e5b6a21a70
@ -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:
|
||||
|
||||
@ -46,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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user