I forgot to send the updated patch so here it is. As I told Mark in the irc
this union package is a way to make the job of choosing which
headers to use each time, easier.
With this patch, we can have a procedure, as in
https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00001.html to choose
what to use each time, as Ludo suggested in the irc.

Manolis
From d60bac39582ff7be0217b2336e6d547829d0114b Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis...@gmail.com>
Date: Fri, 31 Jul 2015 15:26:17 +0300
Subject: [PATCH] gnu: hurd: Add hurd-kernel-headers package.

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

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index ae84362..8f32c9b 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -23,6 +23,7 @@
   #:use-module (gnu packages)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages perl)
@@ -183,3 +184,28 @@ Library and other user programs.")
      "This package provides libihash, needed to build the GNU C 
 Library for GNU/Hurd.")
     (license gpl2+)))
+
+(define-public hurd-kernel-headers
+  (package
+    (name "hurd-kernel-headers")
+    (version (package-version hurd-headers))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     '(#:modules ((guix build union))
+       #:builder (begin
+                   (use-modules (ice-9 match)
+                                (guix build union))
+                   (match %build-inputs
+                     (((names . directories) ...)
+                      (union-build (assoc-ref %outputs "out")
+                                   directories))))))
+    (inputs `(("gnumach-headers" ,gnumach-headers)
+              ("hurd-headers" ,hurd-headers)
+              ("hurd-minimal" ,hurd-minimal)))
+    (synopsis "Union of the Hurd headers and libs")
+    (description
+     "A union of the Mach and Hurd headers and the Hurd-minimal package
+which are needed for both glibc and gcc")
+    (home-page (package-home-page hurd-headers))
+    (license (package-license hurd-headers))))
-- 
2.5.0

Reply via email to