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>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
34 #:use-module ((gnu packages compression)
36 #:use-module (gnu packages pkg-config))
44 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
48 "094ja3xvk9ljghhxmy39if67cfjd1hy6m4svnp399n0wpxvaryvy"))))
49 (build-system gnu-build-system)
51 '(#:configure-flags '("--localstatedir=/var")))
52 (inputs `(("pkg-config" ,pkg-config)
53 ("guile" ,guile-2.0)))
54 (synopsis "Daemon managing daemons")
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.")
61 (home-page "http://www.gnu.org/software/dmd/")))
71 "http://projects.gw-computing.net/attachments/download/78/dfc-"
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")
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.")
92 (uri (string-append "mirror://sourceforge/htop/"
93 version "/htop-" version ".tar.gz"))
96 "18fqrhvnm7h4c3939av8lpiwrwxbyw6hcly0jvq0vkjf0ixnaq7f"))))
97 (build-system gnu-build-system)
99 `(("ncurses" ,ncurses)))
100 (home-page "http://htop.sourceforge.net/")
101 (synopsis "Interactive process viewer")
103 "This is htop, an interactive process viewer. It is a text-mode
104 application (for console or X terminals) and requires ncurses.")
114 (uri (string-append "mirror://gnu/pies/pies-"
118 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
119 (build-system gnu-build-system)
120 (home-page "http://www.gnu.org/software/pies/")
121 (synopsis "Program invocation and execution supervisor")
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.")
129 (define-public inetutils
135 (uri (string-append "mirror://gnu/inetutils/inetutils-"
139 "0azzg6njgq79byl6960kb0wihfhhzf49snslhxgvi30ribgfpa82"))
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.
146 (inputs `(("ncurses" ,ncurses)))
147 (home-page "http://www.gnu.org/software/inetutils/")
148 (synopsis "Basic networking utilities")
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.")
154 (define-public shadow
161 "http://pkg-shadow.alioth.debian.org/releases/shadow-"
165 "1yvqx57vzih0jdy3grir8vfbkxp0cl0myql37bnmi2yn90vk6cma"))))
166 (build-system gnu-build-system)
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")
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"
179 (string-append libc "/sbin/nscd")))))
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\\."))
192 (inputs (if (string-suffix? "-linux"
193 (or (%current-target-system)
195 `(("linux-pam" ,linux-pam))
197 (home-page "http://pkg-shadow.alioth.debian.org/")
198 (synopsis "Authentication-related tools such as passwd, su, and login")
200 "Shadow provides a number of authentication-related tools, including:
201 login, passwd, su, groupadd, and useradd.")
203 ;; The `vipw' program is GPLv2+.
204 ;; libmisc/salt.c is public domain.
207 (define-public mingetty
213 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
217 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
218 (build-system gnu-build-system)
220 `(#:phases (alist-replace 'configure
221 (lambda* (#:key inputs outputs
223 (let* ((out (assoc-ref outputs "out"))
225 out "/share/man/man8"))
226 (sbin (string-append out "/sbin"))
227 (shadow (assoc-ref inputs "shadow"))
228 (login (string-append shadow
230 (substitute* "Makefile"
232 (string-append "SBINDIR = " out
235 (string-append "MANDIR = " out
236 "/share/man/man8\n")))
238 ;; Pick the right 'login' by default.
239 (substitute* "mingetty.c"
241 (string-append "\"" login "\"")))
246 #:tests? #f)) ; no tests
247 (inputs `(("shadow" ,shadow)))
249 (home-page "http://sourceforge.net/projects/mingetty")
250 (synopsis "Getty for the text console")
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.")
257 (define-public net-base
264 "http://ftp.de.debian.org/debian/pool/main/n/netbase/netbase_"
268 "17l8xk2x632id5f9x9v5fs9wqc650hldd2lf3dh90r1zisj1ya8d"))))
269 (build-system trivial-build-system)
271 `(#:modules ((guix build utils))
273 (use-modules (guix build utils)
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"
284 (chdir ,(string-append "netbase-" version))
287 '("etc-services" "etc-protocols" "etc-rpc")
288 (map (cut string-append etc "/" <>)
289 '("services" "protocols" "rpc")))
291 (native-inputs `(("tar" ,tar)
293 (synopsis "IANA protocol, port, and RPC number assignments")
295 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
296 files, which contain information about the IANA-assigned port, protocol, and
298 (home-page "http://packages.debian.org/sid/netbase")
301 (define-public netcat
307 (uri (string-append "mirror://sourceforge/netcat/netcat-"
311 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
312 (build-system gnu-build-system)
313 (home-page "http://netcat.sourceforge.net")
314 (synopsis "Read and write data over TCP/IP")
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.")
330 (uri (string-append "mirror://gnu/alive/alive-"
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")
342 "GNU Alive sends periodic pings to a server, generally to keep a