This patch causes an error when a derivation has an output named 'all'.
Eventually, we will want to be able to refer to all of the outputs of a
derivation with ${packageName.all}, so we don't want any outputs named
'all' to avoid conflict.
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 9d226a3..b093e7f 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -321,11 +321,13 @@ static void prim_derivationStrict(EvalState & state,
Value * * args, Value & v)
throw EvalError(format("duplicate derivation
output `%1%'") % *j);
/* !!! Check whether *j is a valid attribute
name. */
- /* Derivations cannot be named âdrvâ, because
+ /* Outputs cannot be named âdrvâ, because
then we'd have an attribute âdrvPathâ in
- the resulting set. */
- if (*j == "drv")
- throw EvalError(format("invalid derivation output
name `drv'") % *j);
+ the resulting set. Outputs cannot be
+ named 'all' because we need a way to refer
+ to all of the outputs of a derivation */
+ if (*j == "drv" || *j == "all")
+ throw EvalError(format("invalid derivation output
name `%1%'") % *j);
outputs.insert(*j);
}
if (outputs.empty())
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev