gnu: spice: Run tests sequentially.
[jackhill/guix/guix.git] / gnu / packages / hurd.scm
index b5da4cb..d6c1fb5 100644 (file)
   (string-append "mirror://gnu/gnumach/gnumach-"
                  version ".tar.gz"))
 
+(define (hurd-source-url version)
+  (string-append "mirror://gnu/hurd/hurd-"
+                 version ".tar.gz"))
+
 (define-public gnumach-headers
   (package
     (name "gnumach-headers")
         "02hygsfpd2dljl5lg1vjjg9pizi9jyxd4aiiqzjshz6jax62jm9f"))))
     (build-system gnu-build-system)
     (arguments
-    `(#:phases (alist-replace
-                'install
-                (lambda _
-                  (zero?
-                   (system* "make" "install-data")))
-                (alist-delete
-                 'build
-                 %standard-phases))
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda _
+             (invoke "make" "install-data")))
+         (delete 'build))
 
       ;; GNU Mach supports only IA32 currently, so cheat so that we can at
       ;; least install its headers.
@@ -113,8 +115,7 @@ communication.")
     (version "0.9")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://gnu/hurd/hurd-"
-                                  version ".tar.gz"))
+              (uri (hurd-source-url version))
               (sha256
                (base32
                 "1nw9gly0n7pyv3cpfm4mmxy4yccrx4g0lyrvd3vk2vil26jpbggw"))))
@@ -122,11 +123,12 @@ communication.")
     (native-inputs
      `(("mig" ,mig)))
     (arguments
-     `(#:phases (alist-replace
-                 'install
-                 (lambda _
-                   (zero? (system* "make" "install-headers" "no_deps=t")))
-                 (alist-delete 'build %standard-phases))
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda _
+             (invoke "make" "install-headers" "no_deps=t")))
+         (delete 'build))
 
        #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants
                            ;; that.
@@ -161,24 +163,22 @@ Library and other user programs.")
     (arguments
      (substitute-keyword-arguments (package-arguments hurd-headers)
        ((#:phases _)
-        '(alist-replace
-          'install
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((out (assoc-ref outputs "out")))
-              ;; We need to copy libihash.a to the output directory manually,
-              ;; since there is no target for that in the makefile.
-              (mkdir-p (string-append out "/include"))
-              (copy-file "libihash/ihash.h"
-                         (string-append out "/include/ihash.h"))
-              (mkdir-p (string-append out "/lib"))
-              (copy-file "libihash/libihash.a"
-                         (string-append out "/lib/libihash.a"))
-              #t))
-          (alist-replace
-           'build
-           (lambda _
-             (zero? (system* "make" "-Clibihash" "libihash.a")))
-           %standard-phases)))))
+        '(modify-phases %standard-phases
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 ;; We need to copy libihash.a to the output directory manually,
+                 ;; since there is no target for that in the makefile.
+                 (mkdir-p (string-append out "/include"))
+                 (copy-file "libihash/ihash.h"
+                            (string-append out "/include/ihash.h"))
+                 (mkdir-p (string-append out "/lib"))
+                 (copy-file "libihash/libihash.a"
+                            (string-append out "/lib/libihash.a"))
+                 #t)))
+           (replace 'build
+             (lambda _
+               (invoke "make" "-Clibihash" "libihash.a")))))))
     (home-page "https://www.gnu.org/software/hurd/hurd.html")
     (synopsis "GNU Hurd libraries")
     (description
@@ -200,7 +200,8 @@ Library for GNU/Hurd.")
                    (match %build-inputs
                      (((names . directories) ...)
                       (union-build (assoc-ref %outputs "out")
-                                   directories))))))
+                                   directories)
+                      #t)))))
     (inputs `(("gnumach-headers" ,gnumach-headers)
               ("hurd-headers" ,hurd-headers)
               ("hurd-minimal" ,hurd-minimal)))
@@ -228,10 +229,9 @@ Hurd-minimal package which are needed for both glibc and GCC.")
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let* ((out  (assoc-ref outputs "out"))
                              (boot (string-append out "/boot")))
-                        (and (zero? (system* "make" "gnumach.gz"))
-                             (begin
-                               (install-file "gnumach.gz" boot)
-                               #t))))))))
+                        (invoke "make" "gnumach.gz")
+                        (install-file "gnumach.gz" boot)
+                        #t))))))
     (native-inputs
      `(("mig" ,mig)
        ("perl" ,perl)))
@@ -242,3 +242,44 @@ Hurd-minimal package which are needed for both glibc and GCC.")
     (description
      "GNU Mach is the microkernel upon which a GNU Hurd system is based.")
     (license gpl2+)))
+
+(define-public hurd
+  (package
+    (name "hurd")
+    (version "0.9")
+    (source (origin
+              (method url-fetch)
+              (uri (hurd-source-url version))
+              (sha256
+               (base32
+                "1nw9gly0n7pyv3cpfm4mmxy4yccrx4g0lyrvd3vk2vil26jpbggw"))
+              (patches (search-patches "hurd-fix-eth-multiplexer-dependency.patch"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+                     (lambda _
+                       ;; Don't change the ownership of any file at this time.
+                       (substitute* '("daemons/Makefile" "utils/Makefile")
+                         (("-o root -m 4755") ""))
+                       #t)))
+       #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+                                              %output "/lib")
+                          "--disable-ncursesw"
+                          "--without-libbz2"
+                          "--without-libz"
+                          "--without-parted")))
+    (build-system gnu-build-system)
+    (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers)))
+    (native-inputs
+     `(("mig" ,mig)
+       ("perl" ,perl)))
+    (supported-systems %hurd-systems)
+    (home-page "https://www.gnu.org/software/hurd/hurd.html")
+    (synopsis "The kernel servers for the GNU operating system")
+    (description
+     "The Hurd is the kernel for the GNU system, a replacement and
+augmentation of standard Unix kernels.  It is a collection of protocols for
+system interaction (file systems, networks, authentication), and servers
+implementing them.")
+    (license gpl2+)))