summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-03-04 16:44:53 +0100
committerLudovic Courtès <ludo@gnu.org>2023-03-04 18:46:37 +0100
commit3442edac8950ccfc243c1b400b9cd15f8840e55d (patch)
treeb46e840a9ba7b8b7f33c1d1c3f8a6d8a560aaed8 /gnu
parent0b4837a95b255ba18e01b2155ded2c7718bd9181 (diff)
downloadguix-3442edac8950ccfc243c1b400b9cd15f8840e55d.tar.gz
gnu: cross-base: Remove input labels for GNU Mach and MiG.
* gnu/packages/cross-base.scm (cross-kernel-headers*)[xgnumach-headers]
[xmig]: Remove input labels; use gexps and 'modify-inputs'.
[xgnumach-headers-name]: New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cross-base.scm51
1 files changed, 26 insertions, 25 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 59548bac3e..fbedf6e833 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2018, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
@@ -38,6 +38,7 @@
   #:use-module (guix i18n)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix gexp)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match)
@@ -398,39 +399,39 @@ target that libc."
                        ("cross-binutils" ,xbinutils)
                        ,@(package-native-inputs linux-headers)))))
 
+  (define xgnumach-headers-name
+    (string-append (package-name gnumach-headers) "-cross-" target))
+
   (define xgnumach-headers
     (package
       (inherit gnumach-headers)
-      (name (string-append (package-name gnumach-headers)
-                           "-cross-" target))
-
-      (native-inputs `(("cross-gcc" ,xgcc)
-                       ("cross-binutils" ,xbinutils)
-                       ,@(package-native-inputs gnumach-headers)))))
+      (name xgnumach-headers-name)
+      (native-inputs
+       (modify-inputs (package-native-inputs gnumach-headers)
+         (prepend xgcc xbinutils)))))
 
   (define xmig
     (package
       (inherit mig)
       (name (string-append "mig-cross"))
       (arguments
-       `(#: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 (assoc-ref inputs "cross-gnumach-headers"))
-                               (cpath (string-append mach "/include")))
-                          (for-each (cut setenv <> cpath)
-                                    ',%gcc-cross-include-paths)
-                          #t))))
-         #:configure-flags (list ,(string-append "--target=" target))
-         #:tests? #f))
-
-      (propagated-inputs `(("cross-gnumach-headers" ,xgnumach-headers)))
-      (native-inputs `(("cross-gcc" ,xgcc)
-                       ("cross-binutils" ,xbinutils)
-                       ,@(package-native-inputs mig)))))
+       (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))
+      (propagated-inputs (list xgnumach-headers))
+      (native-inputs
+       (modify-inputs (package-native-inputs mig)
+         (prepend xgcc xbinutils)))))
 
   (define xhurd-headers
     (package