diff options
author | Shea Levy <shea@shealevy.com> | 2011-11-06 07:18:19 +0000 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2011-11-06 07:18:19 +0000 |
commit | 3c3107da86ff71a08ce44027ee5899acf486796a (patch) | |
tree | c6dcf35ba40df4c6b300b01cfef7ee62d4b9e676 /src/libexpr/primops.cc | |
parent | 2ab29be70c99483dbd8cf12eece4d553c7f953f3 (diff) |
There's no need to mess with drvPath at all
Diffstat (limited to 'src/libexpr/primops.cc')
-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 09a653002..b11562baa 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; }; \ |