about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2011-11-06T07·18+0000
committerShea Levy <shea@shealevy.com>2011-11-06T07·18+0000
commit3c3107da86ff71a08ce44027ee5899acf486796a (patch)
treec6dcf35ba40df4c6b300b01cfef7ee62d4b9e676 /src
parent2ab29be70c99483dbd8cf12eece4d553c7f953f3 (diff)
There's no need to mess with drvPath at all
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 09a653002f44..b11562baa436 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -470,8 +470,8 @@ static void prim_derivationStrict(EvalState & state, Value * * args, Value & v)
     drvHashes[drvPath] = hashDerivationModulo(*store, drv);
 
     state.mkAttrs(v, 1 + drv.outputs.size());
+    mkString(*state.allocAttr(v, state.sDrvPath), drvPath, singleton<PathSet>("=" + drvPath));
     foreach (DerivationOutputs::iterator, i, drv.outputs) {
-        mkString(*state.allocAttr(v, state.symbols.create(i->first + "DrvPath")), drvPath, singleton<PathSet>("=" + drvPath));
         /* The output path of an output X is ‘<X>Path’,
            e.g. ‘outPath’. */
         mkString(*state.allocAttr(v, state.symbols.create(i->first + "Path")),
@@ -1126,13 +1126,11 @@ void EvalState::createBaseEnv()
         attrValues = attrs: \
           map (name: builtins.getAttr name attrs) (builtins.attrNames attrs); \
         outputToAttrListElement = output: \
-          let \
-            outPath = builtins.getAttr (output + \"Path\") strict; \
-            drvPath = builtins.getAttr (output + \"DrvPath\") strict; \
-          in { \
+          { \
             name = output; \
             value = attrs // { \
-              inherit outPath drvPath; \
+              outPath = builtins.getAttr (output + \"Path\") strict; \
+              drvPath = strict.drvPath; \
               type = \"derivation\"; \
               currentOutput = output; \
             } // outputsAttrs // { all = allList; }; \