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 base)
33 #:use-module ((gnu packages compression)
35 #:use-module (gnu packages pkg-config))
43 (uri (string-append "ftp://alpha.gnu.org/gnu/dmd/dmd-"
47 "094ja3xvk9ljghhxmy39if67cfjd1hy6m4svnp399n0wpxvaryvy"))))
48 (build-system gnu-build-system)
50 '(#:configure-flags '("--localstatedir=/var")))
51 (inputs `(("pkg-config" ,pkg-config)
52 ("guile" ,guile-2.0)))
53 (synopsis "Daemon managing daemons")
55 "DMD is a \"daemon-managing daemon,\" meaning it manages the execution of
56 system services, replacing similar functionality found in typical init
57 systems. It provides dependency-handling through a convenient interface and
58 is based on GNU Guile.")
60 (home-page "http://www.gnu.org/software/dmd/")))
70 "http://projects.gw-computing.net/attachments/download/78/dfc-"
74 "1b4hfqv23l87cb37fxwzfk2sgspkyxpr3ig2hsd23hr6mm982j7z"))))
75 (build-system cmake-build-system)
76 (arguments '(#:tests? #f)) ; There are no tests.
77 (home-page "http://projects.gw-computing.net/projects/dfc")
78 (synopsis "Display file system space usage using graphs and colors")
80 "dfc (df color) is a modern version of df. It uses colors, draws pretty
81 graphs and can export its output to different formats.")
90 (uri (string-append "mirror://sourceforge/htop/"
91 version "/htop-" version ".tar.gz"))
94 "18fqrhvnm7h4c3939av8lpiwrwxbyw6hcly0jvq0vkjf0ixnaq7f"))))
95 (build-system gnu-build-system)
97 `(("ncurses" ,ncurses)))
98 (home-page "http://htop.sourceforge.net/")
99 (synopsis "Interactive process viewer")
101 "This is htop, an interactive process viewer. It is a text-mode
102 application (for console or X terminals) and requires ncurses.")
112 (uri (string-append "mirror://gnu/pies/pies-"
116 "18w0dbg77i56cx1bwa789w0qi3l4xkkbascxcv2b6gbm0zmjg1g6"))))
117 (build-system gnu-build-system)
118 (home-page "http://www.gnu.org/software/pies/")
119 (synopsis "Program invocation and execution supervisor")
121 "Pies is a program that supervises the invocation and executiton of
122 other programs. It reads the list of programs to be started from its
123 configuration file, executes them, and then monitors their status,
124 re-executing them as necessary.")
127 (define-public inetutils
133 (uri (string-append "mirror://gnu/inetutils/inetutils-"
137 "0azzg6njgq79byl6960kb0wihfhhzf49snslhxgvi30ribgfpa82"))
139 (list (search-patch "diffutils-gets-undeclared.patch")))))
140 (build-system gnu-build-system)
141 (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux,
142 ;; which is currently missing.
144 (inputs `(("ncurses" ,ncurses)))
145 (home-page "http://www.gnu.org/software/inetutils/")
146 (synopsis "Basic networking utilities")
148 "Inetutils is a collection of common network programs, such as an ftp
149 client and server, a telnet client and server, and an rsh client and server.")
152 (define-public shadow
159 "http://pkg-shadow.alioth.debian.org/releases/shadow-"
163 "1yvqx57vzih0jdy3grir8vfbkxp0cl0myql37bnmi2yn90vk6cma"))))
164 (build-system gnu-build-system)
166 '(;; Assume System V `setpgrp (void)', which is the default on GNU
167 ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
168 #:configure-flags '("--with-libpam" "ac_cv_func_setpgrp_void=yes")
170 #:phases (alist-cons-before
171 'build 'set-nscd-file-name
172 (lambda* (#:key inputs #:allow-other-keys)
173 ;; Use the right file name for nscd.
174 (let ((libc (assoc-ref inputs "libc")))
175 (substitute* "lib/nscd.c"
177 (string-append libc "/sbin/nscd")))))
179 'install 'remove-groups
180 (lambda* (#:key outputs #:allow-other-keys)
181 ;; Remove `groups', which is already provided by Coreutils.
182 (let* ((out (assoc-ref outputs "out"))
183 (bin (string-append out "/bin"))
184 (man (string-append out "/share/man/man1")))
185 (delete-file (string-append bin "/groups"))
186 (for-each delete-file (find-files man "^groups\\."))
190 (inputs (if (string-suffix? "-linux"
191 (or (%current-target-system)
193 `(("linux-pam" ,linux-pam))
195 (home-page "http://pkg-shadow.alioth.debian.org/")
196 (synopsis "Authentication-related tools such as passwd, su, and login")
198 "Shadow provides a number of authentication-related tools, including:
199 login, passwd, su, groupadd, and useradd.")
201 ;; The `vipw' program is GPLv2+.
202 ;; libmisc/salt.c is public domain.
205 (define-public mingetty
211 (uri (string-append "mirror://sourceforge/mingetty/mingetty-"
215 "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
216 (build-system gnu-build-system)
218 `(#:phases (alist-replace 'configure
219 (lambda* (#:key inputs outputs
221 (let* ((out (assoc-ref outputs "out"))
223 out "/share/man/man8"))
224 (sbin (string-append out "/sbin"))
225 (shadow (assoc-ref inputs "shadow"))
226 (login (string-append shadow
228 (substitute* "Makefile"
230 (string-append "SBINDIR = " out
233 (string-append "MANDIR = " out
234 "/share/man/man8\n")))
236 ;; Pick the right 'login' by default.
237 (substitute* "mingetty.c"
239 (string-append "\"" login "\"")))
244 #:tests? #f)) ; no tests
245 (inputs `(("shadow" ,shadow)))
247 (home-page "http://sourceforge.net/projects/mingetty")
248 (synopsis "Getty for the text console")
250 "Small console getty that is started on the Linux text console,
251 asks for a login name and then transfers over to 'login'. It is extended to
252 allow automatic login and starting any app.")
255 (define-public net-base
262 "http://ftp.de.debian.org/debian/pool/main/n/netbase/netbase_"
266 "17l8xk2x632id5f9x9v5fs9wqc650hldd2lf3dh90r1zisj1ya8d"))))
267 (build-system trivial-build-system)
269 `(#:modules ((guix build utils))
271 (use-modules (guix build utils)
274 (let* ((source (assoc-ref %build-inputs "source"))
275 (tar (assoc-ref %build-inputs "tar"))
276 (gzip (assoc-ref %build-inputs "gzip"))
277 (output (assoc-ref %outputs "out"))
278 (etc (string-append output "/etc")))
279 (setenv "PATH" (string-append gzip "/bin"))
280 (system* (string-append tar "/bin/tar") "xvf"
282 (chdir ,(string-append "netbase-" version))
285 '("etc-services" "etc-protocols" "etc-rpc")
286 (map (cut string-append etc "/" <>)
287 '("services" "protocols" "rpc")))
289 (native-inputs `(("tar" ,tar)
291 (synopsis "IANA protocol, port, and RPC number assignments")
293 "This package provides the /etc/services, /etc/protocols, and /etc/rpc
294 files, which contain information about the IANA-assigned port, protocol, and
296 (home-page "http://packages.debian.org/sid/netbase")
299 (define-public netcat
305 (uri (string-append "mirror://sourceforge/netcat/netcat-"
309 "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
310 (build-system gnu-build-system)
311 (home-page "http://netcat.sourceforge.net")
312 (synopsis "Read and write data over TCP/IP")
314 "Netcat is a featured networking utility which reads and writes data
315 across network connections, using the TCP/IP protocol. It is designed to be a
316 reliable \"back-end\" tool that can be used directly or easily driven by other
317 programs and scripts. At the same time, it is a feature-rich network debugging
318 and exploration tool, since it can create almost any kind of connection you
319 would need and has several interesting built-in capabilities.")