From 8e459d919dbce7c6d45d90ef9a9385133cfae15e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Apr 2004 09:37:37 +0000 Subject: [PATCH] * Recurse into attribute sets and lists when getting derivations from an expression. --- src/nix-env/main.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index 51bf7ffc3..ed00fc206 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -89,6 +89,8 @@ bool parseDerivations(EvalState & state, Expr e, DrvInfos & drvs) debug(format("evaluating attribute `%1%'") % *i); if (parseDerivation(state, drvMap.get(*i), drv)) drvs[drv.drvPath] = drv; + else + parseDerivations(state, drvMap.get(*i), drvs); } } @@ -97,6 +99,8 @@ bool parseDerivations(EvalState & state, Expr e, DrvInfos & drvs) debug(format("evaluating list element")); if (parseDerivation(state, *i, drv)) drvs[drv.drvPath] = drv; + else + parseDerivations(state, *i, drvs); } }