Mirror of GNU Guix
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.

675 lines
27 KiB

gnu: Use synopses from the Womb. * gnu/packages/algebra.scm, gnu/packages/aspell.scm, gnu/packages/autotools.scm, gnu/packages/base.scm, gnu/packages/bash.scm, gnu/packages/bison.scm, gnu/packages/cdrom.scm, gnu/packages/cflow.scm, gnu/packages/compression.scm, gnu/packages/cpio.scm, gnu/packages/cppi.scm, gnu/packages/ddrescue.scm, gnu/packages/dejagnu.scm, gnu/packages/ed.scm, gnu/packages/emacs.scm, gnu/packages/fdisk.scm, gnu/packages/gawk.scm, gnu/packages/gcc.scm, packages/gcc.scm, b/gnu/packages/gcc.scm, 4b982 100644 s/gcc.scm, s/gcc.scm, @@ %standard-phases))))) `((gcc-libc . ,(assoc-ref inputs "libc")))) The GNU Compiler Collection") GNU Compiler Collection") n ompiler Collection includes compiler front ends for C, C++, tran, OpenMP for C/C++/Fortran, Java, and Ada, as well as gnu/packages/gdb.scm, gnu/packages/gettext.scm, gnu/packages/ghostscript.scm, gnu/packages/glib.scm, gnu/packages/global.scm, gnu/packages/gnupg.scm, gnu/packages/gnutls.scm, gnu/packages/gperf.scm, gnu/packages/gprolog.scm, gnu/packages/groff.scm, gnu/packages/grub.scm, gnu/packages/gsasl.scm, gnu/packages/guile.scm, gnu/packages/help2man.scm, gnu/packages/idutils.scm, gnu/packages/indent.scm, gnu/packages/less.scm, gnu/packages/libidn.scm, gnu/packages/libsigsegv.scm, gnu/packages/libunistring.scm, gnu/packages/linux.scm, gnu/packages/lsh.scm, gnu/packages/m4.scm, gnu/packages/mailutils.scm, gnu/packages/multiprecision.scm, gnu/packages/nano.scm, gnu/packages/ncurses.scm, gnu/packages/nettle.scm, gnu/packages/oggvorbis.scm, gnu/packages/parted.scm, gnu/packages/pth.scm, gnu/packages/readline.scm, gnu/packages/recutils.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/shishi.scm, gnu/packages/smalltalk.scm, gnu/packages/system.scm, gnu/packages/texinfo.scm, gnu/packages/time.scm, gnu/packages/wdiff.scm, gnu/packages/wget.scm, gnu/packages/which.scm: Use synopses from the Womb.
9 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
  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 linux)
  20. #:use-module (guix licenses)
  21. #:use-module (gnu packages)
  22. #:use-module ((gnu packages compression)
  23. #:renamer (symbol-prefix-proc 'guix:))
  24. #:use-module (gnu packages flex)
  25. #:use-module (gnu packages bison)
  26. #:use-module (gnu packages libusb)
  27. #:use-module (gnu packages ncurses)
  28. #:use-module (gnu packages bdb)
  29. #:use-module (gnu packages perl)
  30. #:use-module (gnu packages pkg-config)
  31. #:use-module (gnu packages algebra)
  32. #:use-module ((gnu packages gettext)
  33. #:renamer (symbol-prefix-proc 'g:))
  34. #:use-module (gnu packages attr)
  35. #:use-module (guix packages)
  36. #:use-module (guix download)
  37. #:use-module (guix build-system gnu))
  38. (define-public (system->linux-architecture arch)
  39. "Return the Linux architecture name for ARCH, a Guix system name such as
  40. \"x86_64-linux\"."
  41. (let ((arch (car (string-split arch #\-))))
  42. (cond ((string=? arch "i686") "i386")
  43. ((string-prefix? "mips" arch) "mips")
  44. ((string-prefix? "arm" arch) "arm")
  45. (else arch))))
  46. (define (linux-libre-urls version)
  47. "Return a list of URLs for Linux-Libre VERSION."
  48. (list (string-append
  49. "http://linux-libre.fsfla.org/pub/linux-libre/releases/"
  50. version "-gnu/linux-libre-" version "-gnu.tar.xz")
  51. ;; XXX: Work around <http://bugs.gnu.org/14851>.
  52. (string-append
  53. "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-"
  54. version "-gnu.tar.xz")
  55. ;; Maybe this URL will become valid eventually.
  56. (string-append
  57. "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
  58. version "-gnu.tar.xz")))
  59. (define-public linux-libre-headers
  60. (let* ((version* "3.3.8")
  61. (build-phase
  62. (lambda (arch)
  63. `(lambda _
  64. (setenv "ARCH" ,(system->linux-architecture arch))
  65. (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
  66. (and (zero? (system* "make" "defconfig"))
  67. (zero? (system* "make" "mrproper" "headers_check"))))))
  68. (install-phase
  69. `(lambda* (#:key outputs #:allow-other-keys)
  70. (let ((out (assoc-ref outputs "out")))
  71. (and (zero? (system* "make"
  72. (string-append "INSTALL_HDR_PATH=" out)
  73. "headers_install"))
  74. (mkdir (string-append out "/include/config"))
  75. (call-with-output-file
  76. (string-append out
  77. "/include/config/kernel.release")
  78. (lambda (p)
  79. (format p "~a-default~%" ,version*))))))))
  80. (package
  81. (name "linux-libre-headers")
  82. (version version*)
  83. (source (origin
  84. (method url-fetch)
  85. (uri (linux-libre-urls version))
  86. (sha256
  87. (base32
  88. "0jkfh0z1s6izvdnc3njm39dhzp1cg8i06jv06izwqz9w9qsprvnl"))))
  89. (build-system gnu-build-system)
  90. (native-inputs `(("perl" ,perl)))
  91. (arguments
  92. `(#:modules ((guix build gnu-build-system)
  93. (guix build utils)
  94. (srfi srfi-1))
  95. #:phases (alist-replace
  96. 'build ,(build-phase (%current-system))
  97. (alist-replace
  98. 'install ,install-phase
  99. (alist-delete 'configure %standard-phases)))
  100. #:tests? #f))
  101. (synopsis "GNU Linux-Libre kernel headers")
  102. (description "Headers of the Linux-Libre kernel.")
  103. (license gpl2)
  104. (home-page "http://www.gnu.org/software/linux-libre/"))))
  105. (define-public module-init-tools
  106. (package
  107. (name "module-init-tools")
  108. (version "3.16")
  109. (source (origin
  110. (method url-fetch)
  111. (uri (string-append
  112. "mirror://kernel.org/linux/utils/kernel/module-init-tools/module-init-tools-"
  113. version ".tar.bz2"))
  114. (sha256
  115. (base32
  116. "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"))))
  117. (build-system gnu-build-system)
  118. (arguments
  119. ;; FIXME: The upstream tarball lacks man pages, and building them would
  120. ;; require DocBook & co. We used to use Gentoo's pre-built man pages,
  121. ;; but they vanished. In the meantime, fake it.
  122. '(#:phases (alist-cons-before
  123. 'configure 'fake-docbook
  124. (lambda _
  125. (substitute* "Makefile.in"
  126. (("^DOCBOOKTOMAN.*$")
  127. "DOCBOOKTOMAN = true\n")))
  128. %standard-phases)))
  129. (home-page "http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/")
  130. (synopsis "Tools for loading and managing Linux kernel modules")
  131. (description
  132. "Tools for loading and managing Linux kernel modules, such as `modprobe',
  133. `insmod', `lsmod', and more.")
  134. (license gpl2+)))
  135. (define-public linux-libre
  136. (let* ((version* "3.11")
  137. (build-phase
  138. '(lambda* (#:key system #:allow-other-keys #:rest args)
  139. (let ((arch (car (string-split system #\-))))
  140. (setenv "ARCH"
  141. (cond ((string=? arch "i686") "i386")
  142. (else arch)))
  143. (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
  144. (let ((build (assoc-ref %standard-phases 'build)))
  145. (and (zero? (system* "make" "defconfig"))
  146. (begin
  147. (format #t "enabling additional modules...~%")
  148. (substitute* ".config"
  149. (("^# CONFIG_CIFS.*$")
  150. "CONFIG_CIFS=m\n"))
  151. (zero? (system* "make" "oldconfig")))
  152. ;; Call the default `build' phase so `-j' is correctly
  153. ;; passed.
  154. (apply build #:make-flags "all" args)))))
  155. (install-phase
  156. `(lambda* (#:key inputs outputs #:allow-other-keys)
  157. (let* ((out (assoc-ref outputs "out"))
  158. (moddir (string-append out "/lib/modules"))
  159. (mit (assoc-ref inputs "module-init-tools")))
  160. (mkdir-p moddir)
  161. (for-each (lambda (file)
  162. (copy-file file
  163. (string-append out "/" (basename file))))
  164. (find-files "." "^(bzImage|System\\.map)$"))
  165. (copy-file ".config" (string-append out "/config"))
  166. (zero? (system* "make"
  167. (string-append "DEPMOD=" mit "/sbin/depmod")
  168. (string-append "MODULE_DIR=" moddir)
  169. (string-append "INSTALL_PATH=" out)
  170. (string-append "INSTALL_MOD_PATH=" out)
  171. "modules_install"))))))
  172. (package
  173. (name "linux-libre")
  174. (version version*)
  175. (source (origin
  176. (method url-fetch)
  177. (uri (linux-libre-urls version))
  178. (sha256
  179. (base32
  180. "1vlk04xkvyy1kc9zz556md173rn1qzlnvhz7c9sljv4bpk3mdspl"))))
  181. (build-system gnu-build-system)
  182. (native-inputs `(("perl" ,perl)
  183. ("bc" ,bc)
  184. ("module-init-tools" ,module-init-tools)))
  185. (arguments
  186. `(#:modules ((guix build gnu-build-system)
  187. (guix build utils)
  188. (srfi srfi-1)
  189. (ice-9 match))
  190. #:phases (alist-replace
  191. 'build ,build-phase
  192. (alist-replace
  193. 'install ,install-phase
  194. (alist-delete 'configure %standard-phases)))
  195. #:tests? #f))
  196. (synopsis "100% free redistribution of a cleaned Linux kernel")
  197. (description "Linux-Libre operating system kernel.")
  198. (license gpl2)
  199. (home-page "http://www.gnu.org/software/linux-libre/"))))
  200. ;;;
  201. ;;; Pluggable authentication modules (PAM).
  202. ;;;
  203. (define-public linux-pam
  204. (package
  205. (name "linux-pam")
  206. (version "1.1.6")
  207. (source
  208. (origin
  209. (method url-fetch)
  210. (uri (list (string-append "http://www.linux-pam.org/library/Linux-PAM-"
  211. version ".tar.bz2")
  212. (string-append "mirror://kernel.org/linux/libs/pam/library/Linux-PAM-"
  213. version ".tar.bz2")))
  214. (sha256
  215. (base32
  216. "1hlz2kqvbjisvwyicdincq7nz897b9rrafyzccwzqiqg53b8gf5s"))))
  217. (build-system gnu-build-system)
  218. (inputs
  219. `(("flex" ,flex)
  220. ;; TODO: optional dependencies
  221. ;; ("libxcrypt" ,libxcrypt)
  222. ;; ("cracklib" ,cracklib)
  223. ))
  224. (arguments
  225. '(;; Most users, such as `shadow', expect the headers to be under
  226. ;; `security'.
  227. #:configure-flags (list (string-append "--includedir="
  228. (assoc-ref %outputs "out")
  229. "/include/security"))
  230. ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
  231. ;; isn't available.
  232. #:tests? #f))
  233. (home-page "http://www.linux-pam.org/")
  234. (synopsis "Pluggable authentication modules for Linux")
  235. (description
  236. "A *Free* project to implement OSF's RFC 86.0.
  237. Pluggable authentication modules are small shared object files that can
  238. be used through the PAM API to perform tasks, like authenticating a user
  239. at login. Local and dynamic reconfiguration are its key features")
  240. (license bsd-3)))
  241. ;;;
  242. ;;; Miscellaneous.
  243. ;;;
  244. (define-public psmisc
  245. (package
  246. (name "psmisc")
  247. (version "22.20")
  248. (source
  249. (origin
  250. (method url-fetch)
  251. (uri (string-append "mirror://sourceforge/psmisc/psmisc/psmisc-"
  252. version ".tar.gz"))
  253. (sha256
  254. (base32
  255. "052mfraykmxnavpi8s78aljx8w87hyvpx8mvzsgpjsjz73i28wmi"))))
  256. (build-system gnu-build-system)
  257. (inputs `(("ncurses" ,ncurses)))
  258. (home-page "http://psmisc.sourceforge.net/")
  259. (synopsis
  260. "set of utilities that use the proc filesystem, such as fuser, killall, and pstree")
  261. (description
  262. "This PSmisc package is a set of some small useful utilities that
  263. use the proc filesystem. We're not about changing the world, but
  264. providing the system administrator with some help in common tasks.")
  265. (license gpl2+)))
  266. (define-public util-linux
  267. (package
  268. (name "util-linux")
  269. (version "2.21")
  270. (source
  271. (origin
  272. (method url-fetch)
  273. (uri (string-append "mirror://kernel.org/linux/utils/"
  274. name "/v" version "/"
  275. name "-" version ".2" ".tar.xz"))
  276. (sha256
  277. (base32
  278. "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
  279. (build-system gnu-build-system)
  280. (arguments
  281. `(#:configure-flags '("--disable-use-tty-group")
  282. #:phases (alist-cons-after
  283. 'install 'patch-chkdupexe
  284. (lambda* (#:key outputs #:allow-other-keys)
  285. (let ((out (assoc-ref outputs "out")))
  286. (substitute* (string-append out "/bin/chkdupexe")
  287. ;; Allow 'patch-shebang' to do its work.
  288. (("@PERL@") "/bin/perl"))))
  289. %standard-phases)))
  290. (inputs `(("zlib" ,guix:zlib)
  291. ("ncurses" ,ncurses)
  292. ("perl" ,perl)))
  293. (home-page "https://www.kernel.org/pub/linux/utils/util-linux/")
  294. (synopsis "Collection of utilities for the Linux kernel")
  295. (description
  296. "util-linux is a random collection of utilities for the Linux kernel.")
  297. ;; Note that util-linux doesn't use the same license for all the
  298. ;; code. GPLv2+ is the default license for a code without an
  299. ;; explicitly defined license.
  300. (license (list gpl3+ gpl2+ gpl2 lgpl2.0+
  301. bsd-4 public-domain))))
  302. (define-public procps
  303. (package
  304. (name "procps")
  305. (version "3.2.8")
  306. (source (origin
  307. (method url-fetch)
  308. (uri (string-append "http://procps.sourceforge.net/procps-"
  309. version ".tar.gz"))
  310. (sha256
  311. (base32
  312. "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i"))))
  313. (build-system gnu-build-system)
  314. (inputs `(("ncurses" ,ncurses)
  315. ("patch/make-3.82" ,(search-patch "procps-make-3.82.patch"))))
  316. (arguments
  317. '(#:patches (list (assoc-ref %build-inputs "patch/make-3.82"))
  318. #:phases (alist-replace
  319. 'configure
  320. (lambda* (#:key outputs #:allow-other-keys)
  321. ;; No `configure', just a single Makefile.
  322. (let ((out (assoc-ref outputs "out")))
  323. (substitute* "Makefile"
  324. (("/usr/") "/")
  325. (("--(owner|group) 0") "")
  326. (("ldconfig") "true")
  327. (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value)
  328. ;; Add libproc to the RPATH.
  329. (string-append "LDFLAGS := -Wl,-rpath="
  330. out "/lib" value))))
  331. (setenv "CC" "gcc"))
  332. (alist-replace
  333. 'install
  334. (lambda* (#:key outputs #:allow-other-keys)
  335. (let ((out (assoc-ref outputs "out")))
  336. (and (zero?
  337. (system* "make" "install"
  338. (string-append "DESTDIR=" out)))
  339. ;; Sanity check.
  340. (zero?
  341. (system* (string-append out "/bin/ps")
  342. "--version")))))
  343. %standard-phases))
  344. ;; What did you expect? Tests?
  345. #:tests? #f))
  346. (home-page "http://procps.sourceforge.net/")
  347. (synopsis "Utilities that give information about processes")
  348. (description
  349. "procps is the package that has a bunch of small useful utilities
  350. that give information about processes using the Linux /proc file system.
  351. The package includes the programs ps, top, vmstat, w, kill, free,
  352. slabtop, and skill.")
  353. (license gpl2)))
  354. (define-public usbutils
  355. (package
  356. (name "usbutils")
  357. (version "006")
  358. (source
  359. (origin
  360. (method url-fetch)
  361. (uri (string-append "mirror://kernel.org/linux/utils/usb/usbutils/"
  362. "usbutils-" version ".tar.xz"))
  363. (sha256
  364. (base32
  365. "03pd57vv8c6x0hgjqcbrxnzi14h8hcghmapg89p8k5zpwpkvbdfr"))))
  366. (build-system gnu-build-system)
  367. (inputs
  368. `(("libusb" ,libusb) ("pkg-config" ,pkg-config)))
  369. (home-page "http://www.linux-usb.org/")
  370. (synopsis
  371. "Tools for working with USB devices, such as lsusb")
  372. (description
  373. "Tools for working with USB devices, such as lsusb.")
  374. (license gpl2+)))
  375. (define-public e2fsprogs
  376. (package
  377. (name "e2fsprogs")
  378. (version "1.42.7")
  379. (source (origin
  380. (method url-fetch)
  381. (uri (string-append "mirror://sourceforge/e2fsprogs/e2fsprogs-"
  382. version ".tar.gz"))
  383. (sha256
  384. (base32
  385. "0ibkkvp6kan0hn0d1anq4n2md70j5gcm7mwna515w82xwyr02rfw"))))
  386. (build-system gnu-build-system)
  387. (inputs `(("util-linux" ,util-linux)
  388. ("pkg-config" ,pkg-config)))
  389. (arguments
  390. '(#:phases (alist-cons-before
  391. 'configure 'patch-shells
  392. (lambda _
  393. (substitute* "configure"
  394. (("/bin/sh (.*)parse-types.sh" _ dir)
  395. (string-append (which "sh") " " dir
  396. "parse-types.sh")))
  397. (substitute* (find-files "." "^Makefile.in$")
  398. (("#!/bin/sh")
  399. (string-append "#!" (which "sh")))))
  400. %standard-phases)
  401. ;; FIXME: Tests work by comparing the stdout/stderr of programs, that
  402. ;; they fail because we get an extra line that says "Can't check if
  403. ;; filesystem is mounted due to missing mtab file".
  404. #:tests? #f))
  405. (home-page "http://e2fsprogs.sourceforge.net/")
  406. (synopsis "Creating and checking ext2/ext3/ext4 file systems")
  407. (description
  408. "This package provides tools for manipulating ext2/ext3/ext4 file systems.")
  409. (license (list gpl2 ; programs
  410. lgpl2.0 ; libext2fs
  411. x11)))) ; libuuid
  412. (define-public strace
  413. (package
  414. (name "strace")
  415. (version "4.7")
  416. (source (origin
  417. (method url-fetch)
  418. (uri (string-append "mirror://sourceforge/strace/strace-"
  419. version ".tar.xz"))
  420. (sha256
  421. (base32
  422. "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
  423. (build-system gnu-build-system)
  424. (inputs `(("perl" ,perl)))
  425. (home-page "http://strace.sourceforge.net/")
  426. (synopsis "System call tracer for Linux")
  427. (description
  428. "strace is a system call tracer, i.e. a debugging tool which prints out a
  429. trace of all the system calls made by a another process/program.")
  430. (license bsd-3)))
  431. (define-public alsa-lib
  432. (package
  433. (name "alsa-lib")
  434. (version "1.0.27.1")
  435. (source (origin
  436. (method url-fetch)
  437. (uri (string-append
  438. "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"
  439. version ".tar.bz2"))
  440. (sha256
  441. (base32
  442. "0fx057746dj7rjdi0jnvx2m9b0y1lgdkh1hks87d8w32xyihf3k9"))))
  443. (build-system gnu-build-system)
  444. (home-page "http://www.alsa-project.org/")
  445. (synopsis "The Advanced Linux Sound Architecture libraries")
  446. (description
  447. "The Advanced Linux Sound Architecture (ALSA) provides audio and
  448. MIDI functionality to the Linux-based operating system.")
  449. (license lgpl2.1+)))
  450. (define-public iptables
  451. (package
  452. (name "iptables")
  453. (version "1.4.16.2")
  454. (source (origin
  455. (method url-fetch)
  456. (uri (string-append
  457. "http://www.netfilter.org/projects/iptables/files/iptables-"
  458. version ".tar.bz2"))
  459. (sha256
  460. (base32
  461. "0vkg5lzkn4l3i1sm6v3x96zzvnv9g7mi0qgj6279ld383mzcws24"))))
  462. (build-system gnu-build-system)
  463. (arguments '(#:tests? #f)) ; no test suite
  464. (home-page "http://www.netfilter.org/projects/iptables/index.html")
  465. (synopsis "Program to configure the Linux IP packet filtering rules")
  466. (description
  467. "iptables is the userspace command line program used to configure the
  468. Linux 2.4.x and later IPv4 packet filtering ruleset. It is targeted towards
  469. system administrators. Since Network Address Translation is also configured
  470. from the packet filter ruleset, iptables is used for this, too. The iptables
  471. package also includes ip6tables. ip6tables is used for configuring the IPv6
  472. packet filter.")
  473. (license gpl2+)))
  474. (define-public iproute
  475. (package
  476. (name "iproute2")
  477. (version "3.8.0")
  478. (source (origin
  479. (method url-fetch)
  480. (uri (string-append
  481. "mirror://kernel.org/linux/utils/net/iproute2/iproute2-"
  482. version ".tar.xz"))
  483. (sha256
  484. (base32
  485. "0kqy30wz2krbg4y7750hjq5218hgy2vj9pm5qzkn1bqskxs4b4ap"))))
  486. (build-system gnu-build-system)
  487. (arguments
  488. `(#:tests? #f ; no test suite
  489. #:make-flags (let ((out (assoc-ref %outputs "out")))
  490. (list "DESTDIR="
  491. (string-append "LIBDIR=" out "/lib")
  492. (string-append "SBINDIR=" out "/sbin")
  493. (string-append "CONFDIR=" out "/etc")
  494. (string-append "DOCDIR=" out "/share/doc/"
  495. ,name "-" ,version)
  496. (string-append "MANDIR=" out "/share/man")))
  497. #:phases (alist-cons-before
  498. 'install 'pre-install
  499. (lambda _
  500. ;; Don't attempt to create /var/lib/arpd.
  501. (substitute* "Makefile"
  502. (("^.*ARPDDIR.*$") "")))
  503. %standard-phases)))
  504. (inputs
  505. `(("iptables" ,iptables)
  506. ("db4" ,bdb)
  507. ("pkg-config" ,pkg-config)
  508. ("flex" ,flex)
  509. ("bison" ,bison)))
  510. (home-page
  511. "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2")
  512. (synopsis
  513. "A collection of utilities for controlling TCP/IP networking and traffic control in Linux")
  514. (description
  515. "Iproute2 is a collection of utilities for controlling TCP/IP
  516. networking and traffic with the Linux kernel.
  517. Most network configuration manuals still refer to ifconfig and route as the
  518. primary network configuration tools, but ifconfig is known to behave
  519. inadequately in modern network environments. They should be deprecated, but
  520. most distros still include them. Most network configuration systems make use
  521. of ifconfig and thus provide a limited feature set. The /etc/net project aims
  522. to support most modern network technologies, as it doesn't use ifconfig and
  523. allows a system administrator to make use of all iproute2 features, including
  524. traffic control.
  525. iproute2 is usually shipped in a package called iproute or iproute2 and
  526. consists of several tools, of which the most important are ip and tc. ip
  527. controls IPv4 and IPv6 configuration and tc stands for traffic control. Both
  528. tools print detailed usage messages and are accompanied by a set of
  529. manpages.")
  530. (license gpl2+)))
  531. (define-public net-tools
  532. ;; XXX: This package is basically unmaintained, but it provides a few
  533. ;; commands not yet provided by Inetutils, such as 'route', so we have to
  534. ;; live with it.
  535. (package
  536. (name "net-tools")
  537. (version "1.60")
  538. (home-page "http://www.tazenda.demon.co.uk/phil/net-tools/")
  539. (source (origin
  540. (method url-fetch)
  541. (uri (string-append home-page "/" name "-"
  542. version ".tar.bz2"))
  543. (sha256
  544. (base32
  545. "0yvxrzk0mzmspr7sa34hm1anw6sif39gyn85w4c5ywfn8inxvr3s"))))
  546. (build-system gnu-build-system)
  547. (arguments
  548. '(#:phases (alist-replace
  549. 'patch
  550. (lambda* (#:key inputs #:allow-other-keys)
  551. (define (apply-patch file)
  552. (zero? (system* "patch" "-p1" "--batch"
  553. "--input" file)))
  554. (let ((patch.gz (assoc-ref inputs "patch")))
  555. (format #t "applying Debian patch set '~a'...~%"
  556. patch.gz)
  557. (system (string-append "gunzip < " patch.gz " > the-patch"))
  558. (pk 'here)
  559. (and (apply-patch "the-patch")
  560. (for-each apply-patch
  561. (find-files "debian/patches"
  562. "\\.patch")))))
  563. (alist-replace
  564. 'configure
  565. (lambda* (#:key outputs #:allow-other-keys)
  566. (let ((out (assoc-ref outputs "out")))
  567. (mkdir-p (string-append out "/bin"))
  568. (mkdir-p (string-append out "/sbin"))
  569. ;; Pretend we have everything...
  570. (system "yes | make config")
  571. ;; ... except we don't have libdnet, so remove that
  572. ;; definition.
  573. (substitute* '("config.make" "config.h")
  574. (("^.*HAVE_AFDECnet.*$") ""))))
  575. %standard-phases))
  576. ;; Binaries that depend on libnet-tools.a don't declare that
  577. ;; dependency, making it parallel-unsafe.
  578. #:parallel-build? #f
  579. #:tests? #f ; no test suite
  580. #:make-flags (list "CC=gcc"
  581. (string-append "BASEDIR="
  582. (assoc-ref %outputs "out")))))
  583. ;; Use the big Debian patch set (the thing does not even compile out of
  584. ;; the box.)
  585. (inputs `(("patch" ,(origin
  586. (method url-fetch)
  587. (uri
  588. "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")
  589. (sha256
  590. (base32
  591. "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzhjc030p"))))))
  592. (native-inputs `(("gettext" ,g:gettext)))
  593. (synopsis "Tools for controlling the network subsystem in Linux")
  594. (description
  595. "This package includes the important tools for controlling the network
  596. subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
  597. netstat, rarp and route. Additionally, this package contains utilities
  598. relating to particular network hardware types (plipconfig, slattach) and
  599. advanced aspects of IP configuration (iptunnel, ipmaddr).")
  600. (license gpl2+)))
  601. (define-public libcap
  602. (package
  603. (name "libcap")
  604. (version "2.22")
  605. (source (origin
  606. (method url-fetch)
  607. ;; Tarballs used to be available from
  608. ;; <https://www.kernel.org/pub/linux/libs/security/linux-privs/>
  609. ;; but they never came back after kernel.org was compromised.
  610. (uri (string-append
  611. "mirror://debian/pool/main/libc/libcap2/libcap2_"
  612. version ".orig.tar.gz"))
  613. (sha256
  614. (base32
  615. "07vjhkznm82p8dm4w6j8mmg7h5c70lp5s9bwwfdmgwpbixfydjp1"))))
  616. (build-system gnu-build-system)
  617. (arguments '(#:phases (alist-delete 'configure %standard-phases)
  618. #:tests? #f ; no 'check' target
  619. #:make-flags (list "lib=lib"
  620. (string-append "prefix="
  621. (assoc-ref %outputs "out"))
  622. "RAISE_SETFCAP=no")))
  623. (native-inputs `(("perl" ,perl)))
  624. (inputs `(("attr" ,attr)))
  625. (home-page "https://sites.google.com/site/fullycapable/")
  626. (synopsis "Library for working with POSIX capabilities")
  627. (description
  628. "libcap2 provides a programming interface to POSIX capabilities on
  629. Linux-based operating systems.")
  630. ;; License is BSD-3 or GPLv2, at the user's choice.
  631. (license gpl2)))