Commit | Line | Data |
---|---|---|
e78a0ae5 | 1 | ;;; GNU Guix --- Functional package management for GNU |
5f36ea03 | 2 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
43640a33 | 3 | ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> |
1d6c8db5 | 4 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
5fd84e28 | 5 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
2cdf16c8 | 6 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
e78a0ae5 LC |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages valgrind) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build-system gnu) | |
27 | #:use-module (guix licenses) | |
28 | #:use-module (gnu packages gdb) | |
29 | #:use-module (gnu packages perl) | |
30 | #:use-module (gnu packages)) | |
31 | ||
32 | (define-public valgrind | |
33 | (package | |
34 | (name "valgrind") | |
2cdf16c8 | 35 | (version "3.13.0") |
e78a0ae5 | 36 | (source (origin |
2cdf16c8 TGR |
37 | (method url-fetch) |
38 | (uri (string-append "ftp://sourceware.org/pub/valgrind/valgrind-" | |
e78a0ae5 LC |
39 | version ".tar.bz2")) |
40 | (sha256 | |
41 | (base32 | |
2cdf16c8 | 42 | "0fqc3684grrbxwsic1rc5ryxzxmigzjx9p5vf3lxa37h0gpq0rnp")) |
ff9edc2c MB |
43 | (patches (search-patches "valgrind-enable-arm.patch" |
44 | "valgrind-glibc-compat.patch")))) | |
e78a0ae5 | 45 | (build-system gnu-build-system) |
84bf845a DL |
46 | (outputs '("doc" ;16 MB |
47 | "out")) | |
e78a0ae5 | 48 | (arguments |
5fd84e28 EF |
49 | '(#:phases |
50 | (modify-phases %standard-phases | |
51 | (add-after 'install 'patch-suppression-files | |
52 | (lambda* (#:key outputs #:allow-other-keys) | |
53 | ;; Don't assume the FHS. | |
54 | (let* ((out (assoc-ref outputs "out")) | |
55 | (dir (string-append out "/lib/valgrind"))) | |
56 | (substitute* (find-files dir "\\.supp$") | |
57 | (("obj:/lib") "obj:*/lib") | |
58 | (("obj:/usr/X11R6/lib") "obj:*/lib") | |
59 | (("obj:/usr/lib") "obj:*/lib")) | |
84bf845a DL |
60 | #t))) |
61 | (add-after 'install 'install-doc | |
62 | (lambda* (#:key outputs #:allow-other-keys) | |
63 | (let ((orig (format #f "~a/share/doc" (assoc-ref outputs "out"))) | |
64 | (dest (format #f "~a/share" (assoc-ref outputs "doc")))) | |
65 | (mkdir-p dest) | |
66 | (rename-file orig dest) | |
5fd84e28 | 67 | #t)))))) |
2cdf16c8 TGR |
68 | (inputs |
69 | ;; GDB is needed to provide a sane default for `--db-command'. | |
70 | `(("gdb" ,gdb))) | |
71 | (native-inputs | |
72 | `(("perl" ,perl))) | |
e78a0ae5 LC |
73 | (home-page "http://www.valgrind.org/") |
74 | (synopsis "Debugging and profiling tool suite") | |
75 | (description | |
76 | "Valgrind is an instrumentation framework for building dynamic analysis | |
77 | tools. There are Valgrind tools that can automatically detect many memory | |
35b9e423 | 78 | management and threading bugs, and profile your programs in detail. You can |
e78a0ae5 | 79 | also use Valgrind to build new tools.") |
67a86d3b LC |
80 | (license gpl2+) |
81 | ||
82 | ;; Building VEX on mips64el-linux fails with "opcode not supported on this | |
83 | ;; processor: mips3". | |
84 | (supported-systems (delete "mips64el-linux" %supported-systems)))) |