From 71f3c46cf65c0638946c9bb57c36a2b5f177a672 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 3 Jan 2012 15:27:18 +0000 Subject: [PATCH] * Drop the inefficient "Path" suffix in output attribute names. --- corepkgs/derivation.nix | 8 ++++---- src/libexpr/primops.cc | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/corepkgs/derivation.nix b/corepkgs/derivation.nix index 0e16ad6f..d5044a83 100644 --- a/corepkgs/derivation.nix +++ b/corepkgs/derivation.nix @@ -7,13 +7,13 @@ let attrValues = attrs: map (name: builtins.getAttr name attrs) (builtins.attrNames attrs); - outputToAttrListElement = output: - { name = output; + outputToAttrListElement = outputName: + { name = outputName; value = attrs // { - outPath = builtins.getAttr (output + "Path") strict; + outPath = builtins.getAttr outputName strict; drvPath = strict.drvPath; type = "derivation"; - currentOutput = output; + currentOutput = outputName; } // outputsAttrs // { all = allList; }; }; diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 02c444cd..21c9fb35 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -451,9 +451,7 @@ static void prim_derivationStrict(EvalState & state, Value * * args, Value & v) state.mkAttrs(v, 1 + drv.outputs.size()); mkString(*state.allocAttr(v, state.sDrvPath), drvPath, singleton("=" + drvPath)); foreach (DerivationOutputs::iterator, i, drv.outputs) { - /* The output path of an output X is ‘Path’, - e.g. ‘outPath’. */ - mkString(*state.allocAttr(v, state.symbols.create(i->first + "Path")), + mkString(*state.allocAttr(v, state.symbols.create(i->first)), i->second.path, singleton("!" + i->first + "!" + drvPath)); } v.attrs->sort();