This patch disallows attributes named 'all' for the same reason that we don't want outputs named 'all'.
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 686eedf..1445d75 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -302,6 +302,11 @@ static void prim_derivationStrict(EvalState & state, Value 
* * args, Value & v)
             else if (outputs.find(key) != outputs.end())
                 throw EvalError(format("attribute name `%1%' is also a 
derivation output name") % key);
 
+            /* Attributes can't be named 'all' to avoid conflict
+               with the method for accessing all outputs of a derivation */
+            else if (key == "all")
+                throw EvalError("invalid attribute name `all'");
+
             /* All other attributes are passed to the builder through
                the environment. */
             else {
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to