mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +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;
|
inherit src version;
|
||||||
# nix will complain and tell you the right value to replace this with
|
# nix will complain and tell you the right value to replace this with
|
||||||
hash = lib.fakeHash;
|
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
|
# if you have build time environment variables add them here
|
||||||
MY_ENV_VAR="my_value";
|
MY_ENV_VAR="my_value";
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ stdenvNoCC.mkDerivation (attrs // {
|
|||||||
|
|
||||||
installPhase = attrs.installPhase or ''
|
installPhase = attrs.installPhase or ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
mix deps.get --only ${mixEnv}
|
mix deps.get ''${mixEnv:+--only $mixEnv}
|
||||||
find "$TEMPDIR/deps" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +
|
find "$TEMPDIR/deps" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +
|
||||||
cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out
|
cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
|
Loading…
Reference in New Issue
Block a user