mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
beam/fetchMixDeps: disable --only flag when mixEnv is empty
* mixEnv being empty will include all dependencies.
This commit is contained in:
parent
792824d769
commit
a7fb18c804
@ -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";
|
||||
};
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user