gnu: Add enet.
[jackhill/guix/guix.git] / gnu / packages / valgrind.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages valgrind)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix licenses)
26 #:use-module (gnu packages gdb)
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages))
29
30 (define-public valgrind
31 (package
32 (name "valgrind")
33 (version "3.11.0")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "http://valgrind.org/downloads/valgrind-"
37 version ".tar.bz2"))
38 (sha256
39 (base32
40 "0hiv871b9bk689mv42mkhp76za78l5773glszfkdbpf1m1qn4fbc"))
41 (patches (search-patches "valgrind-enable-arm.patch"))))
42 (build-system gnu-build-system)
43 (arguments
44 '(#:phases (alist-cons-after
45 'install 'patch-suppression-files
46 (lambda* (#:key outputs #:allow-other-keys)
47 ;; Don't assume the FHS.
48 (let* ((out (assoc-ref outputs "out"))
49 (dir (string-append out "/lib/valgrind")))
50 (substitute* (find-files dir "\\.supp$")
51 (("obj:/lib") "obj:*/lib")
52 (("obj:/usr/X11R6/lib") "obj:*/lib")
53 (("obj:/usr/lib") "obj:*/lib"))
54 #t))
55 %standard-phases)))
56 (inputs `(;; GDB is needed to provide a sane default for `--db-command'.
57 ("gdb" ,gdb)))
58 (native-inputs `(("perl" ,perl)))
59 (home-page "http://www.valgrind.org/")
60 (synopsis "Debugging and profiling tool suite")
61 (description
62 "Valgrind is an instrumentation framework for building dynamic analysis
63 tools. There are Valgrind tools that can automatically detect many memory
64 management and threading bugs, and profile your programs in detail. You can
65 also use Valgrind to build new tools.")
66 (license gpl2+)
67
68 ;; Building VEX on mips64el-linux fails with "opcode not supported on this
69 ;; processor: mips3".
70 (supported-systems (delete "mips64el-linux" %supported-systems))))