summary refs log tree commit diff
path: root/gnu/packages/hurd.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/hurd.scm')
-rw-r--r--gnu/packages/hurd.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index dd2d0f1b95..f0c4451e80 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -131,11 +131,21 @@ GNU/Hurd."
     (build-system gnu-build-system)
     ;; Flex is needed both at build and run time.
     (inputs `(("gnumach-headers" ,gnumach-headers)
-              ("flex" ,flex)))
+              ("flex" ,flex)
+              ("perl" ,perl)))
     (native-inputs
      `(("flex" ,flex)
        ("bison" ,bison)))
-    (arguments `(#:tests? #f))
+    (arguments `(#:tests? #f
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-after 'install 'patch-non-shebang-references
+                     (lambda* (#:key build inputs outputs #:allow-other-keys)
+                       (let ((perl (assoc-ref inputs "perl"))
+                             (out  (assoc-ref outputs "out")))
+                         (substitute* (string-append out "/bin/mig")
+                           (("perl ") (string-append perl "/bin/perl ")))
+                         #t))))))
     (home-page "https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
     (synopsis "Mach 3.0 interface generator for the Hurd")
     (description