This package is a union of the Mach and Hurd headers and the Hurd-minimal
package which are needed for both glibc and gcc. It will make our lifes easier
when handling inputs.
From 39bd88957a4f16426458dcb1215d89b39b0ac474 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis...@gmail.com>
Date: Fri, 31 Jul 2015 15:26:17 +0300
Subject: [PATCH 1/3] gnu: hurd: Add kernel-headers package.

* gnu/packages/hurd.scm (kernel-headers): Add kernel-headers package.
---
 gnu/packages/hurd.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index ae84362..c99f81a 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -183,3 +183,45 @@ Library and other user programs.")
      "This package provides libihash, needed to build the GNU C 
 Library for GNU/Hurd.")
     (license gpl2+)))
+
+(define-public kernel-headers
+  (package
+    ;; This package is a union of the Mach and Hurd headers and the
+    ;; Hurd-minimal package which are needed for both glibc and gcc.
+    (name "kernel-headers")
+    (version "0")
+    (source #f)
+    (build-system gnu-build-system)
+    (propagated-inputs
+     `(("gnumach-headers" ,gnumach-headers)
+       ("hurd-headers" ,hurd-headers)
+       ("hurd-minimal" ,hurd-minimal)))
+    (arguments
+     `(#:phases (alist-delete
+                 'unpack
+                 (alist-delete
+                  'configure
+                  (alist-delete
+                   'build
+                   (alist-replace
+                    'install
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out  (assoc-ref outputs "out"))
+                             (incdir (string-append out "/include"))
+                             (libdir (string-append out "/lib"))
+                             (mach (assoc-ref inputs "gnumach-headers"))
+                             (hurd (assoc-ref inputs "hurd-headers"))
+                             (hurd-minimal (assoc-ref inputs "hurd-minimal")))
+                        (mkdir-p incdir)
+                        (mkdir-p libdir)
+                        (copy-recursively (string-append mach "/include") incdir)
+                        (copy-recursively (string-append hurd "/include") incdir)
+                        (copy-recursively (string-append hurd-minimal "/lib") libdir)
+                        #t))
+                    %standard-phases))))
+
+         #:tests? #f))
+    (home-page #f)
+    (synopsis #f)
+    (description #f)
+    (license gpl2+)))
-- 
2.4.6

Reply via email to