From f3e410d4bffc109718d8a108258710a543ecfca6 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 16 Sep 2011 11:30:03 +0000 Subject: 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(-) (limited to 'src/libexpr') 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 \ -- cgit 1.4.1