gnu: shepherd@1.0: Don't inherit package arguments.

Followup to e1038aee6d.

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 <ludo@gnu.org>
Merges: #4672
This commit is contained in:
Yelninei 2025-12-05 08:27:35 +00:00 committed by Ludovic Courtès
parent f55793c575
commit b00a27c427
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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"