diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-26 17:39:09 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-11-26 17:41:10 +0100 |
commit | 408a7bfac1f4282ff6647696dfbc7988eed3a2ca (patch) | |
tree | af5c0c212e1a718240d855ef22930b7c1503d0cd /src/libexpr/get-drvs.cc | |
parent | 8d8d47abd2a66898aa5d8999fcd75b29991e529d (diff) |
nix-instantiate: Fix read-only evaluation
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r-- | src/libexpr/get-drvs.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index f9e7dc6db..2ee55bdca 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -28,6 +28,17 @@ string DrvInfo::queryOutPath(EvalState & state) const } +string DrvInfo::queryOutputName(EvalState & state) const +{ + if (outputName == "" && attrs) { + Bindings::iterator i = attrs->find(state.sOutputName); + PathSet context; + (string &) outputName = i != attrs->end() ? state.coerceToString(*i->value, context) : ""; + } + return outputName; +} + + MetaInfo DrvInfo::queryMetaInfo(EvalState & state) const { if (metaInfoRead) return meta; |