From ece99fee23d53185436a91f4cdd5cf5ad9652384 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Mon, 2 Sep 2024 20:17:34 +0200 Subject: 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 --- src/libstore/build/hook-instance.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/build/hook-instance.cc') 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 settings; - globalConfig.getSettings(settings); + globalConfig.getSettings(settings, true); for (auto & setting : settings) sink << 1 << setting.first << setting.second.value; sink << 0; -- cgit v1.2.3