diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-08-23 16:20:14 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-08-23 16:20:14 +0000 |
commit | 9638f3f3930bffab8a547ec59502ae72e203d9ff (patch) | |
tree | 1eff6f713e9ff4e90e04e098b158f110b7adc696 /src/libexpr/attr-path.cc | |
parent | b19cebc513c2d513ee1f91b5ce12f30c5dd095f2 (diff) | |
download | guix-9638f3f3930bffab8a547ec59502ae72e203d9ff.tar.gz |
* Pass the autoArgs to findAlongAttrPath so that "nix-instantiate
foo.nix -A attr --arg name value" will work if (name, value) is needed in the evaluation leading up to "attr".
Diffstat (limited to 'src/libexpr/attr-path.cc')
-rw-r--r-- | src/libexpr/attr-path.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc index 63bb1e5540..7228adf95d 100644 --- a/src/libexpr/attr-path.cc +++ b/src/libexpr/attr-path.cc @@ -12,7 +12,8 @@ bool isAttrs(EvalState & state, Expr e, ATermMap & attrs) } -Expr findAlongAttrPath(EvalState & state, const string & attrPath, Expr e) +Expr findAlongAttrPath(EvalState & state, const string & attrPath, + const ATermMap & autoArgs, Expr e) { Strings tokens = tokenizeString(attrPath, "."); @@ -33,7 +34,7 @@ Expr findAlongAttrPath(EvalState & state, const string & attrPath, Expr e) if (string2Int(attr, attrIndex)) apType = apIndex; /* Evaluate the expression. */ - e = evalExpr(state, autoCallFunction(evalExpr(state, e), ATermMap(1))); + e = evalExpr(state, autoCallFunction(evalExpr(state, e), autoArgs)); /* It should evaluate to either an attribute set or an expression, according to what is specified in the |