mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
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'.
This commit is contained in:
parent
3442edac89
commit
a6194d1f35
2 changed files with 19 additions and 17 deletions
|
@ -415,19 +415,20 @@ (define xmig
|
|||
(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)
|
||||
|
|
|
@ -130,10 +130,11 @@ (define-public mig
|
|||
#~(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")
|
||||
|
|
Loading…
Reference in a new issue