Commit | Line | Data |
---|---|---|
0193c004 MR |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> | |
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) | |
bc046a94 | 23 | #:use-module (gnu packages) |
396b3c8b MR |
24 | #:use-module (guix build-system gnu) |
25 | #:use-module (gnu packages flex) | |
dc91c10f MR |
26 | #:use-module (gnu packages bison) |
27 | #:use-module (gnu packages perl) | |
bc046a94 MR |
28 | #:use-module (gnu packages autotools) |
29 | #:use-module (gnu packages base) | |
30 | #:use-module (guix git-download)) | |
0193c004 MR |
31 | |
32 | (define-public gnumach-headers | |
33 | (package | |
34 | (name "gnumach-headers") | |
35 | (version "1.4") | |
36 | (source | |
37 | (origin | |
38 | (method url-fetch) | |
39 | (uri (string-append "mirror://gnu/gnumach/gnumach-" | |
40 | version ".tar.gz")) | |
41 | (sha256 | |
42 | (base32 | |
43 | "0r371wsm7imx356p0xsls5hifb1gf9y90rm1phr0qkahbmfk9hlv")))) | |
44 | (build-system gnu-build-system) | |
45 | (arguments | |
46 | `(#:phases (alist-replace | |
47 | 'install | |
48 | (lambda _ | |
49 | (zero? | |
50 | (system* "make" "install-data"))) | |
51 | (alist-delete | |
52 | 'build | |
53 | %standard-phases)) | |
54 | ||
55 | ;; GNU Mach supports only IA32 currently, so cheat so that we can at | |
56 | ;; least install its headers. | |
57 | #:configure-flags '("--build=i686-pc-gnu") | |
58 | ||
59 | #:tests? #f)) | |
60 | (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html") | |
61 | (synopsis "GNU Mach kernel headers") | |
62 | (description | |
63 | "Headers of the GNU Mach kernel.") | |
64 | (license gpl2+))) | |
396b3c8b MR |
65 | |
66 | (define-public mig | |
67 | (package | |
68 | (name "mig") | |
69 | (version "1.4") | |
70 | (source | |
71 | (origin | |
72 | (method url-fetch) | |
73 | (uri (string-append "mirror://gnu/mig/mig-" | |
74 | version ".tar.gz")) | |
75 | (sha256 | |
76 | (base32 | |
77 | "1jgzggnbp22sa8z5dilm43zy12vlf1pjxfb3kh13xrfhcay0l97b")))) | |
78 | (build-system gnu-build-system) | |
79 | (inputs `(("gnumach-headers" ,gnumach-headers))) | |
80 | (native-inputs | |
81 | `(("flex" ,flex) | |
82 | ("bison" ,bison))) | |
83 | (arguments `(#:tests? #f)) | |
84 | (home-page "http://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html") | |
85 | (synopsis "Mach 3.0 interface generator for the Hurd") | |
86 | (description | |
87 | "GNU MIG is the GNU distribution of the Mach 3.0 interface generator | |
88 | MIG, as maintained by the GNU Hurd developers for the GNU project. | |
89 | You need this tool to compile the GNU Mach and GNU Hurd distributions, | |
90 | and to compile the GNU C library for the Hurd. Also,you will need it | |
91 | for other software in the GNU system that uses Mach-based inter-process | |
92 | communication.") | |
93 | (license gpl2+))) | |
dc91c10f MR |
94 | |
95 | (define-public hurd-headers | |
96 | (package | |
97 | (name "hurd-headers") | |
98 | (version "0.5") | |
99 | (source (origin | |
100 | (method url-fetch) | |
101 | (uri (string-append "mirror://gnu/hurd/hurd-" | |
102 | version ".tar.gz")) | |
103 | (sha256 | |
104 | (base32 | |
105 | "0lvkz3r0ngb4bsn2hzdc9vjpyrfa3ls36jivrvy1n7f7f55zan7q")))) | |
106 | (build-system gnu-build-system) | |
107 | (native-inputs | |
108 | `(;; Autoconf shouldn't be necessary but there seems to be a bug in the | |
109 | ;; build system triggering its use. | |
110 | ("autoconf" ,autoconf) | |
111 | ||
112 | ("mig" ,mig))) | |
113 | (arguments | |
114 | `(#:phases (alist-replace | |
115 | 'install | |
116 | (lambda _ | |
117 | (zero? (system* "make" "install-headers" "no_deps=t"))) | |
118 | (alist-delete 'build %standard-phases)) | |
119 | ||
120 | #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants | |
121 | ;; that. | |
122 | "--host=i686-pc-gnu" | |
123 | ||
124 | ;; Reduce set of dependencies. | |
125 | "--without-parted") | |
126 | ||
127 | #:tests? #f)) | |
128 | (home-page "http://www.gnu.org/software/hurd/hurd.html") | |
129 | (synopsis "GNU Hurd headers") | |
130 | (description | |
131 | "This package provides C headers of the GNU Hurd, used to build the GNU C | |
132 | Library and other user programs.") | |
133 | (license gpl2+))) | |
bc046a94 MR |
134 | |
135 | (define-public hurd-minimal | |
136 | (package | |
137 | (name "hurd-minimal") | |
138 | (version "0.5") | |
139 | (source | |
140 | (origin | |
141 | (method git-fetch) | |
142 | (uri (git-reference | |
143 | (url "git://git.savannah.gnu.org/hurd/hurd") | |
144 | (commit "a5ca1de1eb575294dbc865a2c4ff643efc117ef4"))) | |
145 | (sha256 | |
146 | (base32 | |
147 | "17vqdlpy1ifw4ijhc3ydkp8p5d406c7aq4ghpmg4a1h1wlwy32kr")) | |
148 | (file-name (string-append name "-" version)) | |
149 | (patches (list (search-patch "hurd-minimal.patch"))))) | |
150 | (build-system gnu-build-system) | |
151 | (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) | |
152 | (native-inputs | |
153 | `(("autoconf" ,autoconf-wrapper) | |
154 | ("mig" ,mig))) | |
155 | ||
156 | (arguments | |
157 | `(#:phases (alist-replace | |
158 | 'install | |
159 | (lambda* (#:key outputs #:allow-other-keys) | |
160 | (let ((out (assoc-ref outputs "out"))) | |
161 | ;; We need to copy libihash.a to the output directory manually, | |
162 | ;; since there is no target for that in the makefile. | |
163 | (mkdir-p (string-append out "/include")) | |
164 | (copy-file "libihash/ihash.h" | |
165 | (string-append out "/include/ihash.h")) | |
166 | (mkdir-p (string-append out "/lib")) | |
167 | (copy-file "libihash/libihash.a" | |
168 | (string-append out "/lib/libihash.a")) | |
169 | #t)) | |
170 | (alist-replace | |
171 | 'build | |
172 | (lambda _ | |
173 | (zero? (system* "make" "-Clibihash" "libihash.a"))) | |
174 | (alist-cons-before | |
175 | 'configure 'bootstrap | |
176 | (lambda _ | |
177 | (zero? (system* "autoreconf" "-vfi"))) | |
178 | %standard-phases))) | |
179 | #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants | |
180 | ;; that. | |
181 | "--host=i686-pc-gnu" | |
182 | ||
183 | ;; Reduce set of dependencies. | |
184 | "--disable-ncursesw" | |
185 | "--disable-test" | |
186 | "--without-libbz2" | |
187 | "--without-libz" | |
188 | "--without-parted") | |
189 | #:tests? #f)) | |
190 | (home-page "http://www.gnu.org/software/hurd/hurd.html") | |
191 | (synopsis "GNU Hurd libraries") | |
192 | (description | |
193 | "This package provides libihash, needed to build the GNU C | |
194 | Library for GNU/Hurd") | |
195 | (license gpl2+))) |