summary refs log tree commit diff
path: root/gnu/packages/hurd.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/hurd.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/hurd.scm')
-rw-r--r--gnu/packages/hurd.scm9
1 files changed, 5 insertions, 4 deletions
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")