beam/fetchMixDeps: disable --only flag when mixEnv is empty

* mixEnv being empty will include all dependencies.
This commit is contained in:
superherointj 2023-02-13 16:57:36 -03:00 committed by Yt
parent 792824d769
commit a7fb18c804
2 changed files with 2 additions and 1 deletions

View file

@ -171,6 +171,7 @@ let
inherit src version;
# nix will complain and tell you the right value to replace this with
hash = lib.fakeHash;
mixEnv = ""; # default is "prod", when empty includes all dependencies, such as "dev", "test".
# if you have build time environment variables add them here
MY_ENV_VAR="my_value";
};

View file

@ -45,7 +45,7 @@ stdenvNoCC.mkDerivation (attrs // {
installPhase = attrs.installPhase or ''
runHook preInstall
mix deps.get --only ${mixEnv}
mix deps.get ''${mixEnv:+--only $mixEnv}
find "$TEMPDIR/deps" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +
cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out
runHook postInstall