mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Forbid drvPath in strictDerivation outputs attribute
builtins.strictDerivation returns an attribute set with drvPath and output paths. For some reason, current implementation forbids drv instead of drvPath.
This commit is contained in:
parent
fcbc36cf78
commit
081faeda8c
2 changed files with 145 additions and 65 deletions
|
@ -1184,11 +1184,11 @@ static void derivationStrictInternal(
|
|||
.debugThrow();
|
||||
/* !!! Check whether j is a valid attribute
|
||||
name. */
|
||||
/* Derivations cannot be named ‘drv’, because
|
||||
then we'd have an attribute ‘drvPath’ in
|
||||
the resulting set. */
|
||||
if (j == "drv")
|
||||
state.error<EvalError>("invalid derivation output name 'drv'")
|
||||
/* Derivations cannot be named ‘drvPath’, because
|
||||
we already have an attribute ‘drvPath’ in
|
||||
the resulting set (see state.sDrvPath). */
|
||||
if (j == "drvPath")
|
||||
state.error<EvalError>("invalid derivation output name 'drvPath'")
|
||||
.atPos(v)
|
||||
.debugThrow();
|
||||
outputs.insert(j);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue