You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

346 lines
14 KiB

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