diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-05-30 11:59:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 11:59:14 +0200 |
commit | ecae62020b64914d9859a71ce197d03688c6133c (patch) | |
tree | e8f69cc208aa24122ff33c80071b1543fee49c1d | |
parent | a35e041ce2358f99a50e01220a2c1091123f6e35 (diff) | |
parent | e4aebccf209c12714f5547ec5acf08b1fd7f51cc (diff) |
Merge pull request #8406 from NixOS/fix-ca-attrs-false
Restore Nix 2.3 behaviour for {__impure,__contentAddressed} = false
-rw-r--r-- | src/libexpr/primops.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index cfae1e5f8..341962dc9 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1152,16 +1152,14 @@ drvName, Bindings * attrs, Value & v) if (i->value->type() == nNull) continue; } - if (i->name == state.sContentAddressed) { - contentAddressed = state.forceBool(*i->value, noPos, context_below); - if (contentAddressed) - experimentalFeatureSettings.require(Xp::CaDerivations); + if (i->name == state.sContentAddressed && state.forceBool(*i->value, noPos, context_below)) { + contentAddressed = true; + experimentalFeatureSettings.require(Xp::CaDerivations); } - else if (i->name == state.sImpure) { - isImpure = state.forceBool(*i->value, noPos, context_below); - if (isImpure) - experimentalFeatureSettings.require(Xp::ImpureDerivations); + else if (i->name == state.sImpure && state.forceBool(*i->value, noPos, context_below)) { + isImpure = true; + experimentalFeatureSettings.require(Xp::ImpureDerivations); } /* The `args' attribute is special: it supplies the |