build-system/trivial: Take the 'source' field into account.
[jackhill/guix/guix.git] / gnu / packages / system.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
9a9e72d5 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
340c7033 3;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
1df895b0 4;;;
233e7676 5;;; This file is part of GNU Guix.
1df895b0 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
1df895b0
LC
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;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
1df895b0
LC
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
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
1df895b0 19
1ffa7090 20(define-module (gnu packages system)
4a44e743 21 #:use-module (guix licenses)
1df895b0
LC
22 #:use-module (guix packages)
23 #:use-module (guix download)
fbc1a58f 24 #:use-module (guix build-system cmake)
1df895b0 25 #:use-module (guix build-system gnu)
59a43334 26 #:use-module (gnu packages)
9a9e72d5 27 #:use-module (gnu packages ncurses)
f15164e7
LC
28 #:use-module (gnu packages linux)
29 #:use-module (gnu packages guile)
30 #:use-module (gnu packages pkg-config))
31
32(define-public dmd
33 (package
34 (name "dmd")
35 (version "-0.4")
36 (source (origin
37 (method url-fetch)
d0821398
LC
38 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
39 version ".tar.gz"))
f15164e7
LC
40 (sha256
41 (base32
42 "094ja3xvk9ljghhxmy39if67cfjd1hy6m4svnp399n0wpxvaryvy"))))
43 (build-system gnu-build-system)
44 (arguments
45 '(#:configure-flags '("--localstatedir=/var")))
46 (inputs `(("pkg-config" ,pkg-config)
47 ("guile" ,guile-2.0)))
48 (synopsis "Daemon managing daemons")
49 (description "'DMD' is a \"Daemon managing Daemons\" (or
50\"Daemons-managing Daemon\"?)---i.e. a service manager that provides a
51replacement for the service-managing capabilities of SysV-init (or any other
52init) with a both powerful and beautiful dependency-based system with a
53convenient interface. It is intended for use on GNU/Hurd, but it is supposed
54to work on every POSIX-like system where Guile is available. In particular,
55it has been tested on GNU/Linux.")
56 (license gpl3+)
57 (home-page "http://www.gnu.org/software/dmd/")))
1df895b0 58
fbc1a58f
CR
59(define-public dfc
60 (package
61 (name "dfc")
62 (version "3.0.3")
63 (source
64 (origin
65 (method url-fetch)
66 (uri (string-append
67 "http://projects.gw-computing.net/attachments/download/78/dfc-"
68 version ".tar.gz"))
69 (sha256
70 (base32
71 "1b4hfqv23l87cb37fxwzfk2sgspkyxpr3ig2hsd23hr6mm982j7z"))))
72 (build-system cmake-build-system)
73 (arguments '(#:tests? #f)) ; There are no tests.
74 (home-page "http://projects.gw-computing.net/projects/dfc")
75 (synopsis "Display file system space usage using graphs and colors")
76 (description
77 "dfc (df color) is a modern version of df. It uses colors, draws pretty
78graphs and can export its output to different formats.")
79 (license bsd-3)))
80
340c7033
CR
81(define-public htop
82 (package
83 (name "htop")
84 (version "1.0.2")
85 (source (origin
86 (method url-fetch)
87 (uri (string-append "mirror://sourceforge/htop/"
88 version "/htop-" version ".tar.gz"))
89 (sha256
90 (base32
91 "18fqrhvnm7h4c3939av8lpiwrwxbyw6hcly0jvq0vkjf0ixnaq7f"))))
92 (build-system gnu-build-system)
93 (inputs
94 `(("ncurses" ,ncurses)))
95 (home-page "http://htop.sourceforge.net/")
96 (synopsis "Interactive process viewer")
97 (description
98 "This is htop, an interactive process viewer. It is a text-mode
99application (for console or X terminals) and requires ncurses.")
100 (license gpl2)))
101
1df895b0
LC
102(define-public pies
103 (package
104 (name "pies")
105 (version "1.2")
106 (source
107 (origin
108 (method url-fetch)
109 (uri (string-append "mirror://gnu/pies/pies-"
110 version ".tar.bz2"))
111 (sha256
112 (base32
113 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
114 (build-system gnu-build-system)
115 (home-page "http://www.gnu.org/software/pies/")
f50d2669 116 (synopsis "Program invocation and execution supervisor")
1df895b0
LC
117 (description
118 "The name Pies (pronounced \"p-yes\") stands for Program Invocation
119and Execution Supervisor. This utility starts and controls execution of
120external programs, called components. Each component is a stand-alone
121program, which is executed in the foreground. Upon startup, pies reads
122the list of components from its configuration file, starts them, and
123remains in the background, controlling their execution. If any of the
124components terminates, the default action of Pies is to restart it.
125However, it can also be programmed to perform a variety of another
126actions such as, e.g., sending mail notifications to the system
127administrator, invoking another external program, etc.
128
129Pies can be used for a wide variety of tasks. Its most obious use is to
130put in backgound a program which normally cannot detach itself from the
131controlling terminal, such as, e.g., minicom. It can launch and control
132components of some complex system, such as Jabberd or MeTA1 (and it
133offers much more control over them than the native utilities). Finally,
134it can replace the inetd utility!")
4a44e743 135 (license gpl3+)))
1df895b0
LC
136
137(define-public inetutils
138 (package
139 (name "inetutils")
140 (version "1.9.1")
141 (source
142 (origin
143 (method url-fetch)
144 (uri (string-append "mirror://gnu/inetutils/inetutils-"
145 version ".tar.gz"))
146 (sha256
147 (base32
148 "0azzg6njgq79byl6960kb0wihfhhzf49snslhxgvi30ribgfpa82"))))
149 (build-system gnu-build-system)
150 (arguments `(#:patches (list (assoc-ref %build-inputs "patch/gets"))
151
152 ;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
153 ;; which is currently missing.
154 #:tests? #f))
155 (inputs `(("patch/gets" ,(search-patch "diffutils-gets-undeclared.patch"))
156 ("ncurses" ,ncurses)))
157 (home-page "http://www.gnu.org/software/inetutils/")
f50d2669 158 (synopsis "Basic networking utilities")
1df895b0
LC
159 (description
160 "The GNU network utilities suite provides the following tools:
161ftp(d), hostname, ifconfig, inetd, logger, ping, rcp, rexec(d),
162rlogin(d), rsh(d), syslogd, talk(d), telnet(d), tftp(d), traceroute,
163uucpd, and whois.")
4a44e743 164 (license gpl3+)))
9a9e72d5
LC
165
166(define-public shadow
167 (package
168 (name "shadow")
169 (version "4.1.5.1")
170 (source (origin
171 (method url-fetch)
172 (uri (string-append
173 "http://pkg-shadow.alioth.debian.org/releases/shadow-"
174 version ".tar.bz2"))
175 (sha256
176 (base32
177 "1yvqx57vzih0jdy3grir8vfbkxp0cl0myql37bnmi2yn90vk6cma"))))
178 (build-system gnu-build-system)
179 (arguments
180 '(;; Assume System V `setpgrp (void)', which is the default on GNU
181 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
182 #:configure-flags '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
183
184 #:phases (alist-cons-before
185 'build 'set-nscd-file-name
186 (lambda* (#:key inputs #:allow-other-keys)
187 ;; Use the right file name for nscd.
188 (let ((libc (assoc-ref inputs "libc")))
189 (substitute* "lib/nscd.c"
190 (("/usr/sbin/nscd")
191 (string-append libc "/sbin/nscd")))))
192 (alist-cons-after
193 'install 'remove-groups
194 (lambda* (#:key outputs #:allow-other-keys)
195 ;; Remove `groups', which is already provided by Coreutils.
196 (let* ((out (assoc-ref outputs "out"))
197 (bin (string-append out "/bin"))
198 (man (string-append out "/share/man/man1")))
199 (delete-file (string-append bin "/groups"))
200 (for-each delete-file (find-files man "^groups\\."))
201 #t))
202 %standard-phases))))
203
204 (inputs (if (string-suffix? "-linux"
205 (or (%current-target-system)
206 (%current-system)))
207 `(("linux-pam" ,linux-pam))
208 '()))
209 (home-page "http://pkg-shadow.alioth.debian.org/")
210 (synopsis "Authentication-related tools such as passwd, su, and login")
211 (description
212 "Shadow provides a number of authentication-related tools, including:
213login, passwd, su, groupadd, and useradd.")
214
215 ;; The `vipw' program is GPLv2+.
216 ;; libmisc/salt.c is public domain.
217 (license bsd-3)))
1e151896
LC
218
219(define-public mingetty
220 (package
221 (name "mingetty")
222 (version "1.08")
223 (source (origin
224 (method url-fetch)
225 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
226 version ".tar.gz"))
227 (sha256
228 (base32
229 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
230 (build-system gnu-build-system)
231 (arguments
232 `(#:phases (alist-replace 'configure
233 (lambda* (#:key inputs outputs
234 #:allow-other-keys)
235 (let* ((out (assoc-ref outputs "out"))
236 (man8 (string-append
237 out "/share/man/man8"))
238 (sbin (string-append out "/sbin"))
239 (shadow (assoc-ref inputs "shadow"))
240 (login (string-append shadow
241 "/bin/login")))
242 (substitute* "Makefile"
243 (("^SBINDIR.*")
244 (string-append "SBINDIR = " out
245 "/sbin\n"))
246 (("^MANDIR.*")
247 (string-append "MANDIR = " out
248 "/share/man/man8\n")))
249
250 ;; Pick the right 'login' by default.
251 (substitute* "mingetty.c"
252 (("\"/bin/login\"")
253 (string-append "\"" login "\"")))
254
255 (mkdir-p sbin)
256 (mkdir-p man8)))
257 %standard-phases)
258 #:tests? #f)) ; no tests
259 (inputs `(("shadow" ,shadow)))
260
261 (home-page "http://sourceforge.net/projects/mingetty")
262 (synopsis "Getty for the text console")
263 (description
264 "Small console getty that is started on the Linux text console,
265asks for a login name and then transfers over to 'login'. It is extended to
266allow automatic login and starting any app.")
267 (license gpl2+)))