1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

* Support singleton values and nested lists again in `args', but print

a warning.
This commit is contained in:
Eelco Dolstra 2006-08-29 15:40:49 +00:00
parent 2132d9ddeb
commit 547b119f25
2 changed files with 9 additions and 8 deletions

View file

@ -269,7 +269,11 @@ static Expr primDerivationStrict(EvalState & state, const ATermVector & args)
if (key == "args") {
ATermList es;
value = evalExpr(state, value);
if (!matchList(value, es)) throw Error(format("`args' should be a list %1%") % value);
if (!matchList(value, es)) {
static bool haveWarned = false;
warnOnce(haveWarned, "the `args' attribute should evaluate to a list");
es = flattenList(state, value);
}
for (ATermIterator i(es); i; ++i) {
string s;
toString(state, *i, context, s);