[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/07: gnu: cross-base: Inherit arguments from 'mig'.
From: |
guix-commits |
Subject: |
04/07: gnu: cross-base: Inherit arguments from 'mig'. |
Date: |
Sat, 4 Mar 2023 12:48:06 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit a6194d1f35ec8ac9b58f4d05affa5aabf1ca7014
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Mar 4 17:40:44 2023 +0100
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'.
---
gnu/packages/cross-base.scm | 27 ++++++++++++++-------------
gnu/packages/hurd.scm | 9 +++++----
2 files changed, 19 insertions(+), 17 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)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index f4de5dc6c2..7f02e6141d 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -130,10 +130,11 @@ GNU/Hurd."
#~(modify-phases %standard-phases
(add-after 'install 'avoid-perl-dependency
(lambda* (#:key build inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ;; By default 'mig' uses Perl to compute
- ;; 'libexecdir_rel'. Avoid it.
- (substitute* (string-append out "/bin/mig")
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ ;; By default 'mig' (or 'TARGET-mig') uses Perl to
+ ;; compute 'libexecdir_rel'. Avoid it.
+ (substitute* (find-files bin "mig$")
(("^libexecdir_rel=.*")
"libexecdir_rel=../libexec\n"))))))))
(home-page
"https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
- branch master updated (ec9192933c -> 6c68abcc66), guix-commits, 2023/03/04
- 01/07: gnu: mig: Use gexps., guix-commits, 2023/03/04
- 04/07: gnu: cross-base: Inherit arguments from 'mig'.,
guix-commits <=
- 02/07: gnu: mig: Remove dependency on Perl., guix-commits, 2023/03/04
- 03/07: gnu: cross-base: Remove input labels for GNU Mach and MiG., guix-commits, 2023/03/04
- 05/07: gnu: Remove and deprecate tidy for tidy-html, guix-commits, 2023/03/04
- 06/07: gnu: gambit-c: Update gambit-c to 4.9.4., guix-commits, 2023/03/04
- 07/07: gnu: Add guile-gemini., guix-commits, 2023/03/04