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.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc
index bd0ec4781..daa987fe7 100644
--- a/src/libexpr/get-drvs.cc
+++ b/src/libexpr/get-drvs.cc
@@ -60,6 +60,15 @@ MetaInfo DrvInfo::queryMetaInfo(EvalState & state) const
}
+string DrvInfo::queryMetaInfo(EvalState & state, const string & name) const
+{
+ /* !!! evaluates all meta attributes => inefficient */
+ MetaInfo meta = queryMetaInfo(state);
+ MetaInfo::iterator i = meta.find(name);
+ return i == meta.end() ? "" : i->second;
+}
+
+
void DrvInfo::setMetaInfo(const MetaInfo & meta)
{
ATermMap metaAttrs;