mirror of
https://github.com/NixOS/nix
synced 2025-07-02 17:41:48 +02:00
Merge remote-tracking branch 'upstream/master' into ca-drv-exotic
This commit is contained in:
commit
76baaeb341
10 changed files with 87 additions and 29 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue