gnu: chicken: Fix CVE-2016-{6830,6831}.
[jackhill/guix/guix.git] / gnu / packages / hurd.scm
CommitLineData
0193c004 1;;; GNU Guix --- Functional package management for GNU
38efbcbb 2;;; Copyright © 2014, 2015, 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
0193c004
MR
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages hurd)
20 #:use-module (guix licenses)
21 #:use-module (guix download)
22 #:use-module (guix packages)
21a8fe1b 23 #:use-module (gnu packages)
e1ecd50e 24 #:use-module (guix utils)
396b3c8b 25 #:use-module (guix build-system gnu)
38efbcbb 26 #:use-module (guix build-system trivial)
396b3c8b 27 #:use-module (gnu packages flex)
dc91c10f
MR
28 #:use-module (gnu packages bison)
29 #:use-module (gnu packages perl)
21a8fe1b
MR
30 #:use-module (gnu packages base)
31 #:use-module (guix git-download))
0193c004
MR
32
33(define-public gnumach-headers
34 (package
35 (name "gnumach-headers")
d950f038 36 (version "1.8")
0193c004
MR
37 (source
38 (origin
39 (method url-fetch)
40 (uri (string-append "mirror://gnu/gnumach/gnumach-"
41 version ".tar.gz"))
42 (sha256
43 (base32
d950f038 44 "02hygsfpd2dljl5lg1vjjg9pizi9jyxd4aiiqzjshz6jax62jm9f"))))
0193c004
MR
45 (build-system gnu-build-system)
46 (arguments
47 `(#:phases (alist-replace
48 'install
49 (lambda _
50 (zero?
51 (system* "make" "install-data")))
52 (alist-delete
53 'build
54 %standard-phases))
55
56 ;; GNU Mach supports only IA32 currently, so cheat so that we can at
57 ;; least install its headers.
26a28c8a
MR
58 ,@(if (%current-target-system)
59 '()
60 ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
61 ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
62 '(#:configure-flags '("--build=i586-pc-gnu")))
0193c004
MR
63
64 #:tests? #f))
65 (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
66 (synopsis "GNU Mach kernel headers")
67 (description
68 "Headers of the GNU Mach kernel.")
69 (license gpl2+)))
396b3c8b
MR
70
71(define-public mig
72 (package
73 (name "mig")
9c9402be 74 (version "1.8")
396b3c8b
MR
75 (source
76 (origin
77 (method url-fetch)
78 (uri (string-append "mirror://gnu/mig/mig-"
79 version ".tar.gz"))
80 (sha256
81 (base32
9c9402be 82 "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
396b3c8b 83 (build-system gnu-build-system)
a7ecc92d
MR
84 ;; Flex is needed both at build and run time.
85 (inputs `(("gnumach-headers" ,gnumach-headers)
86 ("flex" ,flex)))
396b3c8b
MR
87 (native-inputs
88 `(("flex" ,flex)
89 ("bison" ,bison)))
90 (arguments `(#:tests? #f))
91 (home-page "http://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
92 (synopsis "Mach 3.0 interface generator for the Hurd")
93 (description
94 "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
95MIG, as maintained by the GNU Hurd developers for the GNU project.
96You need this tool to compile the GNU Mach and GNU Hurd distributions,
35b9e423 97and to compile the GNU C library for the Hurd. Also, you will need it
396b3c8b
MR
98for other software in the GNU system that uses Mach-based inter-process
99communication.")
100 (license gpl2+)))
dc91c10f
MR
101
102(define-public hurd-headers
103 (package
104 (name "hurd-headers")
be6a70ed 105 (version "0.9")
dc91c10f
MR
106 (source (origin
107 (method url-fetch)
108 (uri (string-append "mirror://gnu/hurd/hurd-"
109 version ".tar.gz"))
110 (sha256
111 (base32
be6a70ed 112 "1nw9gly0n7pyv3cpfm4mmxy4yccrx4g0lyrvd3vk2vil26jpbggw"))))
dc91c10f
MR
113 (build-system gnu-build-system)
114 (native-inputs
90b5d00b 115 `(("mig" ,mig)))
dc91c10f
MR
116 (arguments
117 `(#:phases (alist-replace
118 'install
119 (lambda _
120 (zero? (system* "make" "install-headers" "no_deps=t")))
121 (alist-delete 'build %standard-phases))
122
123 #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants
124 ;; that.
6648cf63
MR
125 ,@(if (%current-target-system)
126 '()
127 '("--host=i586-pc-gnu"))
dc91c10f
MR
128
129 ;; Reduce set of dependencies.
e1ecd50e
MR
130 "--without-parted"
131 "--disable-ncursesw"
132 "--disable-test"
133 "--without-libbz2"
134 "--without-libz"
135 ;; Skip the clnt_create check because it expects
136 ;; a working glibc causing a circular dependency.
137 "ac_cv_search_clnt_create=no")
dc91c10f
MR
138
139 #:tests? #f))
140 (home-page "http://www.gnu.org/software/hurd/hurd.html")
141 (synopsis "GNU Hurd headers")
142 (description
143 "This package provides C headers of the GNU Hurd, used to build the GNU C
144Library and other user programs.")
145 (license gpl2+)))
21a8fe1b
MR
146
147(define-public hurd-minimal
148 (package (inherit hurd-headers)
149 (name "hurd-minimal")
150 (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers)))
151 (native-inputs
90b5d00b 152 `(("mig" ,mig)))
21a8fe1b 153 (arguments
e1ecd50e
MR
154 (substitute-keyword-arguments (package-arguments hurd-headers)
155 ((#:phases _)
156 '(alist-replace
157 'install
158 (lambda* (#:key outputs #:allow-other-keys)
159 (let ((out (assoc-ref outputs "out")))
160 ;; We need to copy libihash.a to the output directory manually,
161 ;; since there is no target for that in the makefile.
162 (mkdir-p (string-append out "/include"))
163 (copy-file "libihash/ihash.h"
164 (string-append out "/include/ihash.h"))
165 (mkdir-p (string-append out "/lib"))
166 (copy-file "libihash/libihash.a"
167 (string-append out "/lib/libihash.a"))
168 #t))
169 (alist-replace
170 'build
171 (lambda _
172 (zero? (system* "make" "-Clibihash" "libihash.a")))
173 %standard-phases)))))
21a8fe1b
MR
174 (home-page "http://www.gnu.org/software/hurd/hurd.html")
175 (synopsis "GNU Hurd libraries")
176 (description
a124bbd2 177 "This package provides libihash, needed to build the GNU C
21a8fe1b
MR
178Library for GNU/Hurd.")
179 (license gpl2+)))
38efbcbb
MR
180
181(define-public hurd-core-headers
182 (package
183 (name "hurd-core-headers")
184 (version (package-version hurd-headers))
185 (source #f)
186 (build-system trivial-build-system)
187 (arguments
188 '(#:modules ((guix build union))
189 #:builder (begin
190 (use-modules (ice-9 match)
191 (guix build union))
192 (match %build-inputs
193 (((names . directories) ...)
194 (union-build (assoc-ref %outputs "out")
195 directories))))))
196 (inputs `(("gnumach-headers" ,gnumach-headers)
197 ("hurd-headers" ,hurd-headers)
198 ("hurd-minimal" ,hurd-minimal)))
199 (synopsis "Union of the Hurd headers and libraries")
200 (description
201 "This package contains the union of the Mach and Hurd headers and the
202Hurd-minimal package which are needed for both glibc and GCC.")
203 (home-page (package-home-page hurd-headers))
204 (license (package-license hurd-headers))))