summary refs log tree commit diff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-03-04 17:40:44 +0100
committerLudovic Courtès <ludo@gnu.org>2023-03-04 18:46:37 +0100
commita6194d1f35ec8ac9b58f4d05affa5aabf1ca7014 (patch)
tree0f3fcbdd428dc12738933956732748188cccbbcc /gnu/packages/cross-base.scm
parent3442edac8950ccfc243c1b400b9cd15f8840e55d (diff)
downloadguix-a6194d1f35ec8ac9b58f4d05affa5aabf1ca7014.tar.gz
gnu: cross-base: Inherit arguments from 'mig'.
That way, 'xmig' inherits the 'avoid-perl-dependency' build phase.

* gnu/packages/hurd.scm (mig)[arguments]: In 'avoid-perl-dependency',
use 'find-files' to locate the "mig" executable(s).
* gnu/packages/cross-base.scm (cross-kernel-headers*)[xmig]: Use
'substitute-keyword-arguments'.
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm27
1 files changed, 14 insertions, 13 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index fbedf6e833..2959616af6 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -415,19 +415,20 @@ target that libc."
       (inherit mig)
       (name (string-append "mig-cross"))
       (arguments
-       (list #:modules '((guix build gnu-build-system)
-                         (guix build utils)
-                         (srfi srfi-26))
-             #:phases
-             #~(modify-phases %standard-phases
-                 (add-before 'configure 'set-cross-headers-path
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     (let* ((mach #+(this-package-input xgnumach-headers-name))
-                            (cpath (string-append mach "/include")))
-                       (for-each (cut setenv <> cpath)
-                                 '#$%gcc-cross-include-paths)))))
-             #:configure-flags #~(list #$(string-append "--target=" target))
-             #:tests? #f))
+       (substitute-keyword-arguments (package-arguments mig)
+         ((#:configure-flags flags #~'())
+          #~(list #$(string-append "--target=" target)))
+         ((#:tests? _ #f)
+          #f)
+         ((#:phases phases #~%standard-phases)
+          #~(modify-phases #$phases
+              (add-before 'configure 'set-cross-headers-path
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let* ((mach #+(this-package-input xgnumach-headers-name))
+                         (cpath (string-append mach "/include")))
+                    (for-each (lambda (variable)
+                                (setenv variable cpath))
+                              '#$%gcc-cross-include-paths))))))))
       (propagated-inputs (list xgnumach-headers))
       (native-inputs
        (modify-inputs (package-native-inputs mig)