linux-initrd: Add USB kernel modules to the default initrd.
[jackhill/guix/guix.git] / gnu / packages / gdb.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages gdb)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages ncurses)
22 #:use-module (gnu packages readline)
23 #:use-module (gnu packages dejagnu)
24 #:use-module (gnu packages texinfo)
25 #:use-module (gnu packages multiprecision)
26 #:use-module (gnu packages xml)
27 #:use-module (gnu packages guile)
28 #:use-module (gnu packages python)
29 #:use-module (gnu packages pkg-config)
30 #:use-module ((guix licenses) #:select (gpl3+))
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build-system gnu))
34
35 (define-public gdb
36 (package
37 (name "gdb")
38 (version "7.8.2")
39 (source (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnu/gdb/gdb-"
42 version ".tar.xz"))
43 (sha256
44 (base32
45 "11a4fj1vpsny71kz7xqqbqk3kgzbs5cfjj3z9gm0hpvxfkam8nb0"))))
46 (build-system gnu-build-system)
47 (arguments
48 '(#:tests? #f ; FIXME "make check" fails on single-processor systems.
49 #:phases (alist-cons-after
50 'configure 'post-configure
51 (lambda _
52 (for-each patch-makefile-SHELL
53 (find-files "." "Makefile\\.in")))
54 (alist-cons-after
55 'install 'post-install
56 (lambda* (#:key outputs #:allow-other-keys)
57 ;; Like Binutils, GDB installs libbfd and libopcodes.
58 ;; However, this leads to collisions when both are
59 ;; installed, and really is none of its business,
60 ;; conceptually. So remove them.
61 (for-each delete-file
62 (find-files (assoc-ref outputs "out")
63 "^lib(opcodes|bfd)\\.")))
64 %standard-phases))))
65 (inputs
66 `(("expat" ,expat)
67 ("mpfr" ,mpfr)
68 ("gmp" ,gmp)
69 ("readline" ,readline)
70 ("ncurses" ,ncurses)
71 ("guile" ,guile-2.0)
72 ("python" ,python)
73 ("python-wrapper" ,python-wrapper)
74 ("dejagnu" ,dejagnu)
75
76 ;; Allow use of XML-formatted syscall information. This enables 'catch
77 ;; syscall' and similar commands.
78 ("libxml2" ,libxml2)))
79 (native-inputs
80 `(("texinfo" ,texinfo)
81 ("pkg-config" ,pkg-config)))
82 (home-page "http://www.gnu.org/software/gdb/")
83 (synopsis "The GNU debugger")
84 (description
85 "GDB is the GNU debugger. With it, you can monitor what a program is
86 doing while it runs or what it was doing just before a crash. It allows you
87 to specify the runtime conditions, to define breakpoints, and to change how
88 the program is running to try to fix bugs. It can be used to debug programs
89 written in C, C++, Ada, Objective-C, Pascal and more.")
90 (license gpl3+)))