From 66fa24c69d306b923fd8eb9772f0e7c12f24d10a Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Mon, 24 Nov 2025 13:12:36 +0000 Subject: [PATCH] (zilch magic): Copy settings from primary daemon connections This ensures the CA build logic won't substitute if the main daemon link wouldn't either. Change-Id: I3ac2fd91bc2158e750d9ace5890d47866a6a6964 --- core/src/magic.sld | 2 +- core/src/nix/daemon.sld | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/magic.sld b/core/src/magic.sld index a96b234..f3d4589 100644 --- a/core/src/magic.sld +++ b/core/src/magic.sld @@ -533,7 +533,7 @@ (cons (thread-start! (make-thread - (lambda () (define thread-conn (daemon-connect)) (call/cc (lambda (cc) (builder cc thread-conn))) (daemon-close thread-conn)) + (lambda () (define thread-conn (daemon-connect)) (daemon-link-copy-settings thread-conn (*daemon*)) (call/cc (lambda (cc) (builder cc thread-conn))) (daemon-close thread-conn)) (string-append "ca-builder-" (number->string i)))) builder-threads))) diff --git a/core/src/nix/daemon.sld b/core/src/nix/daemon.sld index 25c8601..a2c000e 100644 --- a/core/src/nix/daemon.sld +++ b/core/src/nix/daemon.sld @@ -22,6 +22,7 @@ *logger* + daemon-link-copy-settings daemon-wop-handshake daemon-wop-set-options daemon-wop-add-text-to-store daemon-wop-build-paths daemon-wop-query-derivation-output-map @@ -211,6 +212,11 @@ (daemon-read-log-events link) (daemon-wop-set-options link)) + ;; Copy the daemon settings from `from` into `into`. + (define (daemon-link-copy-settings into from) + (define settings (daemon-link-settings from)) + (daemon-wop-set-options into (daemon-link-settings-verbosity settings) (daemon-link-settings-max-build-jobs settings) (daemon-link-settings-use-substitutes settings))) + ;; Sets some of the daemon's settings. ;; ;; - `verbosity` is the verbosity (amount of `-v` arguments in Nix)