gnu: gettext: Rename binding to 'gnu-gettext'.
[jackhill/guix/guix.git] / gnu / packages / system.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages system)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system trivial)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages ncurses)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages guile)
31 #:use-module (gnu packages gettext)
32 #:use-module ((gnu packages base)
33 #:select (tar))
34 #:use-module ((gnu packages compression)
35 #:select (gzip))
36 #:use-module (gnu packages pkg-config))
37
38 (define-public dmd
39 (package
40 (name "dmd")
41 (version "-0.4")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "094ja3xvk9ljghhxmy39if67cfjd1hy6m4svnp399n0wpxvaryvy"))))
49 (build-system gnu-build-system)
50 (arguments
51 '(#:configure-flags '("--localstatedir=/var")))
52 (inputs `(("pkg-config" ,pkg-config)
53 ("guile" ,guile-2.0)))
54 (synopsis "Daemon managing daemons")
55 (description
56 "DMD is a \"daemon-managing daemon,\" meaning it manages the execution of
57 system services, replacing similar functionality found in typical init
58 systems. It provides dependency-handling through a convenient interface and
59 is based on GNU Guile.")
60 (license gpl3+)
61 (home-page "http://www.gnu.org/software/dmd/")))
62
63 (define-public dfc
64 (package
65 (name "dfc")
66 (version "3.0.3")
67 (source
68 (origin
69 (method url-fetch)
70 (uri (string-append
71 "http://projects.gw-computing.net/attachments/download/78/dfc-"
72 version ".tar.gz"))
73 (sha256
74 (base32
75 "1b4hfqv23l87cb37fxwzfk2sgspkyxpr3ig2hsd23hr6mm982j7z"))))
76 (build-system cmake-build-system)
77 (arguments '(#:tests? #f)) ; There are no tests.
78 (native-inputs `(("gettext" ,gnu-gettext)))
79 (home-page "http://projects.gw-computing.net/projects/dfc")
80 (synopsis "Display file system space usage using graphs and colors")
81 (description
82 "dfc (df color) is a modern version of df. It uses colors, draws pretty
83 graphs and can export its output to different formats.")
84 (license bsd-3)))
85
86 (define-public htop
87 (package
88 (name "htop")
89 (version "1.0.2")
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "mirror://sourceforge/htop/"
93 version "/htop-" version ".tar.gz"))
94 (sha256
95 (base32
96 "18fqrhvnm7h4c3939av8lpiwrwxbyw6hcly0jvq0vkjf0ixnaq7f"))))
97 (build-system gnu-build-system)
98 (inputs
99 `(("ncurses" ,ncurses)))
100 (home-page "http://htop.sourceforge.net/")
101 (synopsis "Interactive process viewer")
102 (description
103 "This is htop, an interactive process viewer. It is a text-mode
104 application (for console or X terminals) and requires ncurses.")
105 (license gpl2)))
106
107 (define-public pies
108 (package
109 (name "pies")
110 (version "1.2")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "mirror://gnu/pies/pies-"
115 version ".tar.bz2"))
116 (sha256
117 (base32
118 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
119 (build-system gnu-build-system)
120 (home-page "http://www.gnu.org/software/pies/")
121 (synopsis "Program invocation and execution supervisor")
122 (description
123 "Pies is a program that supervises the invocation and executiton of
124 other programs. It reads the list of programs to be started from its
125 configuration file, executes them, and then monitors their status,
126 re-executing them as necessary.")
127 (license gpl3+)))
128
129 (define-public inetutils
130 (package
131 (name "inetutils")
132 (version "1.9.1")
133 (source (origin
134 (method url-fetch)
135 (uri (string-append "mirror://gnu/inetutils/inetutils-"
136 version ".tar.gz"))
137 (sha256
138 (base32
139 "0azzg6njgq79byl6960kb0wihfhhzf49snslhxgvi30ribgfpa82"))
140 (patches
141 (list (search-patch "diffutils-gets-undeclared.patch")))))
142 (build-system gnu-build-system)
143 (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
144 ;; which is currently missing.
145 #:tests? #f))
146 (inputs `(("ncurses" ,ncurses)))
147 (home-page "http://www.gnu.org/software/inetutils/")
148 (synopsis "Basic networking utilities")
149 (description
150 "Inetutils is a collection of common network programs, such as an ftp
151 client and server, a telnet client and server, and an rsh client and server.")
152 (license gpl3+)))
153
154 (define-public shadow
155 (package
156 (name "shadow")
157 (version "4.1.5.1")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append
161 "http://pkg-shadow.alioth.debian.org/releases/shadow-"
162 version ".tar.bz2"))
163 (sha256
164 (base32
165 "1yvqx57vzih0jdy3grir8vfbkxp0cl0myql37bnmi2yn90vk6cma"))))
166 (build-system gnu-build-system)
167 (arguments
168 '(;; Assume System V `setpgrp (void)', which is the default on GNU
169 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
170 #:configure-flags '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
171
172 #:phases (alist-cons-before
173 'build 'set-nscd-file-name
174 (lambda* (#:key inputs #:allow-other-keys)
175 ;; Use the right file name for nscd.
176 (let ((libc (assoc-ref inputs "libc")))
177 (substitute* "lib/nscd.c"
178 (("/usr/sbin/nscd")
179 (string-append libc "/sbin/nscd")))))
180 (alist-cons-after
181 'install 'remove-groups
182 (lambda* (#:key outputs #:allow-other-keys)
183 ;; Remove `groups', which is already provided by Coreutils.
184 (let* ((out (assoc-ref outputs "out"))
185 (bin (string-append out "/bin"))
186 (man (string-append out "/share/man/man1")))
187 (delete-file (string-append bin "/groups"))
188 (for-each delete-file (find-files man "^groups\\."))
189 #t))
190 %standard-phases))))
191
192 (inputs (if (string-suffix? "-linux"
193 (or (%current-target-system)
194 (%current-system)))
195 `(("linux-pam" ,linux-pam))
196 '()))
197 (home-page "http://pkg-shadow.alioth.debian.org/")
198 (synopsis "Authentication-related tools such as passwd, su, and login")
199 (description
200 "Shadow provides a number of authentication-related tools, including:
201 login, passwd, su, groupadd, and useradd.")
202
203 ;; The `vipw' program is GPLv2+.
204 ;; libmisc/salt.c is public domain.
205 (license bsd-3)))
206
207 (define-public mingetty
208 (package
209 (name "mingetty")
210 (version "1.08")
211 (source (origin
212 (method url-fetch)
213 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
214 version ".tar.gz"))
215 (sha256
216 (base32
217 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
218 (build-system gnu-build-system)
219 (arguments
220 `(#:phases (alist-replace 'configure
221 (lambda* (#:key inputs outputs
222 #:allow-other-keys)
223 (let* ((out (assoc-ref outputs "out"))
224 (man8 (string-append
225 out "/share/man/man8"))
226 (sbin (string-append out "/sbin"))
227 (shadow (assoc-ref inputs "shadow"))
228 (login (string-append shadow
229 "/bin/login")))
230 (substitute* "Makefile"
231 (("^SBINDIR.*")
232 (string-append "SBINDIR = " out
233 "/sbin\n"))
234 (("^MANDIR.*")
235 (string-append "MANDIR = " out
236 "/share/man/man8\n")))
237
238 ;; Pick the right 'login' by default.
239 (substitute* "mingetty.c"
240 (("\"/bin/login\"")
241 (string-append "\"" login "\"")))
242
243 (mkdir-p sbin)
244 (mkdir-p man8)))
245 %standard-phases)
246 #:tests? #f)) ; no tests
247 (inputs `(("shadow" ,shadow)))
248
249 (home-page "http://sourceforge.net/projects/mingetty")
250 (synopsis "Getty for the text console")
251 (description
252 "Small console getty that is started on the Linux text console,
253 asks for a login name and then transfers over to 'login'. It is extended to
254 allow automatic login and starting any app.")
255 (license gpl2+)))
256
257 (define-public net-base
258 (package
259 (name "net-base")
260 (version "5.1")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append
264 "http://ftp.de.debian.org/debian/pool/main/n/netbase/netbase_"
265 version ".tar.gz"))
266 (sha256
267 (base32
268 "17l8xk2x632id5f9x9v5fs9wqc650hldd2lf3dh90r1zisj1ya8d"))))
269 (build-system trivial-build-system)
270 (arguments
271 `(#:modules ((guix build utils))
272 #:builder (begin
273 (use-modules (guix build utils)
274 (srfi srfi-26))
275
276 (let* ((source (assoc-ref %build-inputs "source"))
277 (tar (assoc-ref %build-inputs "tar"))
278 (gzip (assoc-ref %build-inputs "gzip"))
279 (output (assoc-ref %outputs "out"))
280 (etc (string-append output "/etc")))
281 (setenv "PATH" (string-append gzip "/bin"))
282 (system* (string-append tar "/bin/tar") "xvf"
283 source)
284 (chdir ,(string-append "netbase-" version))
285 (mkdir-p etc)
286 (for-each copy-file
287 '("etc-services" "etc-protocols" "etc-rpc")
288 (map (cut string-append etc "/" <>)
289 '("services" "protocols" "rpc")))
290 #t))))
291 (native-inputs `(("tar" ,tar)
292 ("gzip" ,gzip)))
293 (synopsis "IANA protocol, port, and RPC number assignments")
294 (description
295 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
296 files, which contain information about the IANA-assigned port, protocol, and
297 ONC RPC numbers")
298 (home-page "http://packages.debian.org/sid/netbase")
299 (license gpl2)))
300
301 (define-public netcat
302 (package
303 (name "netcat")
304 (version "0.7.1")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append "mirror://sourceforge/netcat/netcat-"
308 version ".tar.bz2"))
309 (sha256
310 (base32
311 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
312 (build-system gnu-build-system)
313 (home-page "http://netcat.sourceforge.net")
314 (synopsis "Read and write data over TCP/IP")
315 (description
316 "Netcat is a featured networking utility which reads and writes data
317 across network connections, using the TCP/IP protocol. It is designed to be a
318 reliable \"back-end\" tool that can be used directly or easily driven by other
319 programs and scripts. At the same time, it is a feature-rich network debugging
320 and exploration tool, since it can create almost any kind of connection you
321 would need and has several interesting built-in capabilities.")
322 (license gpl2+)))
323
324 (define-public alive
325 (package
326 (name "alive")
327 (version "2.0.2")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "mirror://gnu/alive/alive-"
331 version ".tar.xz"))
332 (sha256
333 (base32
334 "1vrzg51ai68x9yld7vbgl58sxaw5qpx8rbakwcxn4cqq6vpxj38j"))))
335 (build-system gnu-build-system)
336 (arguments '(#:configure-flags '("alive_cv_nice_ping=yes")))
337 (inputs `(("guile" ,guile-2.0)
338 ("inetutils" ,inetutils)))
339 (home-page "http://www.gnu.org/software/alive/")
340 (synopsis "Autologin and keep-alive daemon")
341 (description
342 "GNU Alive sends periodic pings to a server, generally to keep a
343 connection alive.")
344 (license gpl3+)))