gnu: Add emacs-slime.
[jackhill/guix/guix.git] / gnu / packages / hurd.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 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)
23 #:use-module (gnu packages)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages flex)
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (guix git-download))
31
32 (define-public gnumach-headers
33 (package
34 (name "gnumach-headers")
35 (version "1.6")
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 "1m7xwsrv6x6gk9xi5phs104rdn9q3lr63p348vyv0dzd6r3zyncb"))))
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+)))
65
66 (define-public mig
67 (package
68 (name "mig")
69 (version "1.6")
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 "1i9qd6j5g8wsv9k9n6vpdqflyw0284wyayb2s2h7pp4yyi2jsksk"))))
78 (build-system gnu-build-system)
79 ;; Flex is needed both at build and run time.
80 (inputs `(("gnumach-headers" ,gnumach-headers)
81 ("flex" ,flex)))
82 (native-inputs
83 `(("flex" ,flex)
84 ("bison" ,bison)))
85 (arguments `(#:tests? #f))
86 (home-page "http://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
87 (synopsis "Mach 3.0 interface generator for the Hurd")
88 (description
89 "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
90 MIG, as maintained by the GNU Hurd developers for the GNU project.
91 You need this tool to compile the GNU Mach and GNU Hurd distributions,
92 and to compile the GNU C library for the Hurd. Also, you will need it
93 for other software in the GNU system that uses Mach-based inter-process
94 communication.")
95 (license gpl2+)))
96
97 (define-public hurd-headers
98 (package
99 (name "hurd-headers")
100 (version "0.7")
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "mirror://gnu/hurd/hurd-"
104 version ".tar.gz"))
105 (sha256
106 (base32
107 "1q2pyc16vb5plqi8hlwnnc9jk8zlifm91cavz6x7vhbwy0nh2yvh"))))
108 (build-system gnu-build-system)
109 (native-inputs
110 `(;; Autoconf shouldn't be necessary but there seems to be a bug in the
111 ;; build system triggering its use.
112 ("autoconf" ,autoconf)
113
114 ("mig" ,mig)))
115 (arguments
116 `(#:phases (alist-replace
117 'install
118 (lambda _
119 (zero? (system* "make" "install-headers" "no_deps=t")))
120 (alist-delete 'build %standard-phases))
121
122 #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants
123 ;; that.
124 "--build=i686-pc-gnu"
125
126 ;; Reduce set of dependencies.
127 "--without-parted")
128
129 #:tests? #f))
130 (home-page "http://www.gnu.org/software/hurd/hurd.html")
131 (synopsis "GNU Hurd headers")
132 (description
133 "This package provides C headers of the GNU Hurd, used to build the GNU C
134 Library and other user programs.")
135 (license gpl2+)))
136
137 (define-public hurd-minimal
138 (package (inherit hurd-headers)
139 (name "hurd-minimal")
140 (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers)))
141 (native-inputs
142 `(("autoconf" ,(autoconf-wrapper))
143 ("mig" ,mig)))
144
145 (arguments
146 `(#:phases (alist-replace
147 'install
148 (lambda* (#:key outputs #:allow-other-keys)
149 (let ((out (assoc-ref outputs "out")))
150 ;; We need to copy libihash.a to the output directory manually,
151 ;; since there is no target for that in the makefile.
152 (mkdir-p (string-append out "/include"))
153 (copy-file "libihash/ihash.h"
154 (string-append out "/include/ihash.h"))
155 (mkdir-p (string-append out "/lib"))
156 (copy-file "libihash/libihash.a"
157 (string-append out "/lib/libihash.a"))
158 #t))
159 (alist-replace
160 'build
161 (lambda _
162 (zero? (system* "make" "-Clibihash" "libihash.a")))
163 (alist-cons-before
164 'configure 'bootstrap
165 (lambda _
166 (zero? (system* "autoreconf" "-vfi")))
167 %standard-phases)))
168 #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants
169 ;; that.
170 "--host=i686-pc-gnu"
171
172 ;; Reduce set of dependencies.
173 "--disable-ncursesw"
174 "--disable-test"
175 "--without-libbz2"
176 "--without-libz"
177 "--without-parted"
178 ;; Skip the clnt_create check because it expects
179 ;; a working glibc causing a circular dependency.
180 "ac_cv_search_clnt_create=no")
181 #:tests? #f))
182 (home-page "http://www.gnu.org/software/hurd/hurd.html")
183 (synopsis "GNU Hurd libraries")
184 (description
185 "This package provides libihash, needed to build the GNU C
186 Library for GNU/Hurd.")
187 (license gpl2+)))