diff options
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r-- | src/libexpr/get-drvs.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index bd0ec4781cfe..daa987fe713b 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; |