Add a currentOutput attribute to derivations keep track of which output is active

This commit is contained in:
Shea Levy 2011-09-16 11:30:03 +00:00
parent 8f28a3ba25
commit f3e410d4bf

View file

@ -1114,7 +1114,10 @@ void EvalState::createBaseEnv()
let outPath = builtins.getAttr (output + \"Path\") strict; in { \ let outPath = builtins.getAttr (output + \"Path\") strict; in { \
name = output; \ name = output; \
value = attrs // { \ value = attrs // { \
drvPath = strict.drvPath; inherit outPath; type = \"derivation\"; \ drvPath = strict.drvPath; \
inherit outPath; \
type = \"derivation\"; \
currentOutput = output; \
} // outputsAttrs // { all = allList; }; \ } // outputsAttrs // { all = allList; }; \
}; \ }; \
outputsList = if attrs ? outputs then \ outputsList = if attrs ? outputs then \