about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2011-09-16T11·30+0000
committerShea Levy <shea@shealevy.com>2011-09-16T11·30+0000
commitf3e410d4bffc109718d8a108258710a543ecfca6 (patch)
tree9dfccc491ce06f663451c55d9e1675a9f26607d6 /src/libexpr/primops.cc
parent8f28a3ba25dd0dad6411a039bc01ad87c61a6e59 (diff)
Add a currentOutput attribute to derivations keep track of which output is active
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc5
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 \