diff options
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops.cc | 10 |
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; }; \ |