about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-04-21T09·37+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-04-21T09·37+0000
commit8e459d919dbce7c6d45d90ef9a9385133cfae15e (patch)
treec551ff2264fb47e5f7dd8f32dd3bbf8f53f91eac /src
parent7cce0c34e1821b08c066a25e2cffcf0910d1f145 (diff)
* Recurse into attribute sets and lists when getting derivations from
  an expression.

Diffstat (limited to 'src')
-rw-r--r--src/nix-env/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 51bf7ffc3bb0..ed00fc206d97 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);
         }
     }