mirror of
https://github.com/NixOS/nix
synced 2025-07-01 12:37:59 +02:00
Gate dynamic-derivations
with drv fromJSON
too
Don't want `nix derivation add` to be a way to sneak by experimental feature checks!
This commit is contained in:
parent
76baaeb341
commit
20decfd302
2 changed files with 11 additions and 1 deletions
|
@ -1005,6 +1005,8 @@ DerivationOutput DerivationOutput::fromJSON(
|
|||
// remaining to parse, will be mutated by parsers
|
||||
std::string_view s = hashAlgo;
|
||||
ContentAddressMethod method = ContentAddressMethod::parsePrefix(s);
|
||||
if (method == TextIngestionMethod {})
|
||||
xpSettings.require(Xp::DynamicDerivations);
|
||||
auto hashType = parseHashType(s);
|
||||
return { std::move(method), std::move(hashType) };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue