From b00a27c42742037ba66759bfaad89c001c46d8b3 Mon Sep 17 00:00:00 2001 From: Yelninei Date: Fri, 5 Dec 2025 08:27:35 +0000 Subject: [PATCH] gnu: shepherd@1.0: Don't inherit package arguments. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to e1038aee6da92263f0c3d2fdb91d46ee5b63d2ec. Previously when cross compiling the fibers directory was reset to fibers 1.3 because evaluating the arguments of shepherd@0.10 with '(package-arguments shepherd-0.10)' kept the reference to the fibers input of shepherd@0.10. Work around this by not using 'substitute-keyword-arguments' and replacing 'this-package-input' with 'search-input-file'. * gnu/packages/admin.scm (shepherd-1.0)[arguments]: Replace 'substitute-keyword-arguments' with explicit arguments. Use search-input-file in 'set-fibers-directory phase to search for the cross fibers. Change-Id: Ia1061d8cea531569385f4a0136cfd22f27ce5a0e Signed-off-by: Ludovic Courtès Merges: #4672 --- gnu/packages/admin.scm | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 93c3f166a0a..86d54aa3343 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -605,15 +605,35 @@ interface and is based on GNU Guile.") (base32 "1mh080060lnycys8yq6kkiy363wif8dsip3nyklgd3a1r22wb274")))) (arguments - (substitute-keyword-arguments (package-arguments shepherd-0.10) - ((#:configure-flags flags #~'()) - #~(list "--localstatedir=/var" - - ;; Gzip and zstd are used by the log rotation service. - (string-append "--with-gzip=" #$(this-package-input "gzip") - "/bin/gzip") - (string-append "--with-zstd=" #$(this-package-input "zstd") - "/bin/zstd"))))) + (list + #:configure-flags + #~(list "--localstatedir=/var" + ;; Gzip and zstd are used by the log rotation service. + (string-append "--with-gzip=" #$(this-package-input "gzip") + "/bin/gzip") + (string-append "--with-zstd=" #$(this-package-input "zstd") + "/bin/zstd")) + #:make-flags #~'("GUILE_AUTO_COMPILE=0") + #:phases (if (%current-target-system) + #~(modify-phases %standard-phases + (add-before 'configure 'set-fibers-directory + (lambda* (#:key inputs #:allow-other-keys) + ;; When cross-compiling, refer to the target + ;; Fibers, not the native one. + (let ((fibers + (search-input-file + inputs + "share/guile/site/3.0/fibers.scm")) + (fibers-go + (search-input-file + inputs + "lib/guile/3.0/site-ccache/fibers.go"))) + (substitute* '("herd.in" "shepherd.in") + (("%FIBERS_SOURCE_DIRECTORY%") + (dirname fibers)) + (("%FIBERS_OBJECT_DIRECTORY%") + (dirname fibers-go))))))) + #~%standard-phases))) (native-inputs (modify-inputs (package-native-inputs shepherd-0.10) (replace "guile-fibers"