aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r--src/libexpr/get-drvs.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc
index ba9fbcd6d..bd0ec4781 100644
--- a/src/libexpr/get-drvs.cc
+++ b/src/libexpr/get-drvs.cc
@@ -60,6 +60,16 @@ MetaInfo DrvInfo::queryMetaInfo(EvalState & state) const
}
+void DrvInfo::setMetaInfo(const MetaInfo & meta)
+{
+ ATermMap metaAttrs;
+ for (MetaInfo::const_iterator i = meta.begin(); i != meta.end(); ++i)
+ metaAttrs.set(toATerm(i->first),
+ makeAttrRHS(makeStr(i->second), makeNoPos()));
+ attrs->set(toATerm("meta"), makeAttrs(metaAttrs));
+}
+
+
/* Cache for already evaluated derivations. Usually putting ATerms in
a STL container is unsafe (they're not scanning for GC roots), but
here it doesn't matter; everything in this set is reachable from