From 3c3107da86ff71a08ce44027ee5899acf486796a Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 6 Nov 2011 07:18:19 +0000 Subject: [PATCH] There's no need to mess with drvPath at all --- src/libexpr/primops.cc | 10 ++++------ 1 file 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("=" + drvPath)); foreach (DerivationOutputs::iterator, i, drv.outputs) { - mkString(*state.allocAttr(v, state.symbols.create(i->first + "DrvPath")), drvPath, singleton("=" + drvPath)); /* The output path of an output X is ‘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; }; \