aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlois Wohlschlager <alois1@gmx-topmail.de>2024-09-02 20:17:34 +0200
committerAlois Wohlschlager <alois1@gmx-topmail.de>2024-10-15 19:55:50 +0200
commitece99fee23d53185436a91f4cdd5cf5ad9652384 (patch)
treeaa73d13c76d95f14e324b407a01f5d8d06b19048
parent4dbbd721eb9db75d4968a624b8cb9e75e979a144 (diff)
libstore/build: only send overridden settings to the build hook
The build hook is still running locally, so it will run with the same default settings. Hence, just as with the daemon, it is enough to send it only the overridden settings. This will prevent warnings like warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled when the user didn't actually set those settings. This is inspired by and an alternative to [0]. [0] https://github.com/NixOS/nix/pull/10049 Change-Id: I77ea62cd017614b16b55979dd30e75f09f860d21
-rw-r--r--src/libstore/build/hook-instance.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build/hook-instance.cc b/src/libstore/build/hook-instance.cc
index 521f34917..9f76eca4d 100644
--- a/src/libstore/build/hook-instance.cc
+++ b/src/libstore/build/hook-instance.cc
@@ -74,7 +74,7 @@ HookInstance::HookInstance()
sink = FdSink(toHook.get());
std::map<std::string, Config::SettingInfo> settings;
- globalConfig.getSettings(settings);
+ globalConfig.getSettings(settings, true);
for (auto & setting : settings)
sink << 1 << setting.first << setting.second.value;
sink << 0;