From 3442edac8950ccfc243c1b400b9cd15f8840e55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 4 Mar 2023 16:44:53 +0100 Subject: [PATCH] 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. --- gnu/packages/cross-base.scm | 51 +++++++++++++++++++------------------ 1 file 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 +;;; Copyright © 2013-2018, 2020, 2023 Ludovic Courtès ;;; Copyright © 2014, 2015, 2018 Mark H Weaver ;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis @@ -38,6 +38,7 @@ (define-module (gnu packages cross-base) #: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 @@ (define xlinux-headers ("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