~ruther/guix-local

b00a27c42742037ba66759bfaad89c001c46d8b3 — Yelninei 2 months ago f55793c
gnu: shepherd@1.0: Don't inherit package arguments.

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 <ludo@gnu.org>
Merges: #4672
1 files changed, 29 insertions(+), 9 deletions(-)

M gnu/packages/admin.scm
M gnu/packages/admin.scm => gnu/packages/admin.scm +29 -9
@@ 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"