aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-19 11:26:34 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-19 11:32:14 -0400
commit76baaeb341cf395c61877e6d598c290835529ca0 (patch)
treedddc7a7f8beec203acc77361538e76f819bd770e /src/libstore/derivations.cc
parent668377f217c0fa4053d746f7094dfe887e07887c (diff)
parentd3e2394e9106416e57cd0da10facd8db00e622e6 (diff)
Merge remote-tracking branch 'upstream/master' into ca-drv-exotic
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 1f5f78964..9f529c753 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -991,7 +991,8 @@ nlohmann::json DerivationOutput::toJSON(
DerivationOutput DerivationOutput::fromJSON(
const Store & store, std::string_view drvName, std::string_view outputName,
- const nlohmann::json & _json)
+ const nlohmann::json & _json,
+ const ExperimentalFeatureSettings & xpSettings)
{
std::set<std::string_view> keys;
auto json = (std::map<std::string, nlohmann::json>) _json;
@@ -1028,6 +1029,7 @@ DerivationOutput DerivationOutput::fromJSON(
}
else if (keys == (std::set<std::string_view> { "hashAlgo" })) {
+ xpSettings.require(Xp::CaDerivations);
auto [method, hashType] = methodAlgo();
return DerivationOutput::CAFloating {
.method = std::move(method),
@@ -1040,6 +1042,7 @@ DerivationOutput DerivationOutput::fromJSON(
}
else if (keys == (std::set<std::string_view> { "hashAlgo", "impure" })) {
+ xpSettings.require(Xp::ImpureDerivations);
auto [method, hashType] = methodAlgo();
return DerivationOutput::Impure {
.method = std::move(method),