diff options
author | Shea Levy <shea@shealevy.com> | 2011-09-16T11·30+0000 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2011-09-16T11·30+0000 |
commit | f3e410d4bffc109718d8a108258710a543ecfca6 (patch) | |
tree | 9dfccc491ce06f663451c55d9e1675a9f26607d6 | |
parent | 8f28a3ba25dd0dad6411a039bc01ad87c61a6e59 (diff) |
Add a currentOutput attribute to derivations keep track of which output is active
-rw-r--r-- | src/libexpr/primops.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 4d64bf32a676..121dbca9b36a 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1114,7 +1114,10 @@ void EvalState::createBaseEnv() let outPath = builtins.getAttr (output + \"Path\") strict; in { \ name = output; \ value = attrs // { \ - drvPath = strict.drvPath; inherit outPath; type = \"derivation\"; \ + drvPath = strict.drvPath; \ + inherit outPath; \ + type = \"derivation\"; \ + currentOutput = output; \ } // outputsAttrs // { all = allList; }; \ }; \ outputsList = if attrs ? outputs then \ |