mirror of
https://github.com/NixOS/nix.git
synced 2025-11-10 04:26:01 +01:00
Move enabled experimental feature to libutil struct
This is needed in subsequent commits to allow the settings and CLI args infrastructure itself to read this setting.
This commit is contained in:
parent
1b6c96bbcb
commit
296831f641
28 changed files with 113 additions and 70 deletions
|
|
@ -445,10 +445,10 @@ StringSet StoreConfig::getDefaultSystemFeatures()
|
|||
{
|
||||
auto res = settings.systemFeatures.get();
|
||||
|
||||
if (settings.isExperimentalFeatureEnabled(Xp::CaDerivations))
|
||||
if (experimentalFeatureSettings.isEnabled(Xp::CaDerivations))
|
||||
res.insert("ca-derivations");
|
||||
|
||||
if (settings.isExperimentalFeatureEnabled(Xp::RecursiveNix))
|
||||
if (experimentalFeatureSettings.isEnabled(Xp::RecursiveNix))
|
||||
res.insert("recursive-nix");
|
||||
|
||||
return res;
|
||||
|
|
@ -1017,7 +1017,7 @@ std::map<StorePath, StorePath> copyPaths(
|
|||
for (auto & path : paths) {
|
||||
storePaths.insert(path.path());
|
||||
if (auto realisation = std::get_if<Realisation>(&path.raw)) {
|
||||
settings.requireExperimentalFeature(Xp::CaDerivations);
|
||||
experimentalFeatureSettings.require(Xp::CaDerivations);
|
||||
toplevelRealisations.insert(*realisation);
|
||||
}
|
||||
}
|
||||
|
|
@ -1250,7 +1250,7 @@ std::optional<StorePath> Store::getBuildDerivationPath(const StorePath & path)
|
|||
}
|
||||
}
|
||||
|
||||
if (!settings.isExperimentalFeatureEnabled(Xp::CaDerivations) || !isValidPath(path))
|
||||
if (!experimentalFeatureSettings.isEnabled(Xp::CaDerivations) || !isValidPath(path))
|
||||
return path;
|
||||
|
||||
auto drv = readDerivation(path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue