diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-19 11:33:48 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-04-19 12:44:38 -0400 |
commit | 20decfd30261bd46d2bf78209cb2bdd144fcd0b4 (patch) | |
tree | cfeebbade5d503baea69af2a66b88e0df5ff47eb /src/libstore/derivations.cc | |
parent | 76baaeb341cf395c61877e6d598c290835529ca0 (diff) |
Gate `dynamic-derivations` with drv `fromJSON` too
Don't want `nix derivation add` to be a way to sneak by experimental
feature checks!
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r-- | src/libstore/derivations.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 9f529c753..564c12f9e 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -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) }; }; |