From f3e410d4bffc109718d8a108258710a543ecfca6 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Sep 2011 11:30:03 +0000 Subject: [PATCH] Add a currentOutput attribute to derivations keep track of which output is active --- src/libexpr/primops.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 4d64bf32a..121dbca9b 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 \