| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 |
|
| 28 | (define-module (gnu packages valgrind)
|
| 29 | #:use-module (srfi srfi-1)
|
| 30 | #:use-module (guix build-system gnu)
|
| 31 | #:use-module (guix download)
|
| 32 | #:use-module (guix git-download)
|
| 33 | #:use-module (guix gexp)
|
| 34 | #:use-module (guix licenses)
|
| 35 | #:use-module (guix packages)
|
| 36 | #:use-module (guix utils)
|
| 37 | #:use-module (gnu packages)
|
| 38 | #:use-module (gnu packages base)
|
| 39 | #:use-module (gnu packages gdb)
|
| 40 | #:use-module (gnu packages perl)
|
| 41 | #:use-module (gnu packages python))
|
| 42 |
|
| 43 | (define-public valgrind/pinned
|
| 44 | (package
|
| 45 | (name "valgrind")
|
| 46 | (version "3.25.1")
|
| 47 | (source (origin
|
| 48 | (method url-fetch)
|
| 49 | (uri (list (string-append "https://sourceware.org/pub/valgrind"
|
| 50 | "/valgrind-" version ".tar.bz2")
|
| 51 | (string-append "ftp://sourceware.org/pub/valgrind"
|
| 52 | "/valgrind-" version ".tar.bz2")))
|
| 53 | (sha256
|
| 54 | (base32
|
| 55 | "1bvilavwimza3n6v5r2ypxydk737krn3n6ywxxlc4ibvfb8bipk1"))))
|
| 56 | (build-system gnu-build-system)
|
| 57 | (outputs '("doc" |
| 58 | "out"))
|
| 59 | (arguments
|
| 60 | (append
|
| 61 | (if (string-prefix? "powerpc" (or (%current-target-system)
|
| 62 | (%current-system)))
|
| 63 | (list #:make-flags #~(list "CFLAGS+=-maltivec"))
|
| 64 | '())
|
| 65 | (list #:phases
|
| 66 | #~(modify-phases %standard-phases
|
| 67 | (add-after 'install 'patch-suppression-files
|
| 68 | (lambda _
|
| 69 | |
| 70 | (let* ((dir (string-append #$output "/lib/valgrind")))
|
| 71 | (substitute* (find-files dir "\\.supp$")
|
| 72 | (("obj:/lib") "obj:*/lib")
|
| 73 | (("obj:/usr/X11R6/lib") "obj:*/lib")
|
| 74 | (("obj:/usr/lib") "obj:*/lib")))))
|
| 75 | (add-after 'install 'install-doc
|
| 76 | (lambda _
|
| 77 | (let ((orig (string-append #$output "/share/doc"))
|
| 78 | (dest (string-append #$output:doc "/share")))
|
| 79 | (mkdir-p dest)
|
| 80 | (rename-file orig dest))))))))
|
| 81 | (native-inputs
|
| 82 | (list perl))
|
| 83 | (home-page "https://www.valgrind.org/")
|
| 84 | (synopsis "Debugging and profiling tool suite")
|
| 85 | (description
|
| 86 | "Valgrind is an instrumentation framework for building dynamic analysis
|
| 87 | tools. There are Valgrind tools that can automatically detect many memory
|
| 88 | management and threading bugs, and profile your programs in detail. You can
|
| 89 | also use Valgrind to build new tools.")
|
| 90 | |
| 91 | (supported-systems (fold delete %supported-systems
|
| 92 | '("i586-gnu" "x86_64-gnu" "armhf-linux")))
|
| 93 | (license gpl2+)
|
| 94 |
|
| 95 | |
| 96 | (properties '((hidden? . #t)))))
|
| 97 |
|
| 98 | (define-public valgrind
|
| 99 | (package
|
| 100 | (inherit valgrind/pinned)
|
| 101 | (version "3.27.0")
|
| 102 | (source (origin
|
| 103 | (method url-fetch)
|
| 104 | (uri (list (string-append "https://sourceware.org/pub/valgrind"
|
| 105 | "/valgrind-" version ".tar.bz2")
|
| 106 | (string-append "ftp://sourceware.org/pub/valgrind"
|
| 107 | "/valgrind-" version ".tar.bz2")))
|
| 108 | (sha256
|
| 109 | (base32
|
| 110 | "1vsv47wkmz2yd15alzd03839ikmd26bip9wfd58qzvjphbg3fnav"))))))
|
| 111 |
|
| 112 | (define-public valgrind/interactive
|
| 113 | (package/inherit valgrind
|
| 114 | (inputs
|
| 115 | |
| 116 | (list gdb
|
| 117 | `(,(canonical-package (libc-for-target)) "debug")
|
| 118 | python)) |
| 119 | (properties '())))
|
| 120 |
|
| 121 | (define-public vex
|
| 122 | (let ((commit "61f2373464af0a8df436bd88be36bdf129c2032f")
|
| 123 | (revision "0"))
|
| 124 | (package
|
| 125 | (name "vex")
|
| 126 | (version "0.0.0")
|
| 127 | (source
|
| 128 | (origin
|
| 129 | (method git-fetch)
|
| 130 | (uri (git-reference
|
| 131 | (url "https://github.com/angr/vex")
|
| 132 | (commit commit)))
|
| 133 | (file-name (git-file-name name version))
|
| 134 | (sha256
|
| 135 | (base32 "1wf1vxkjq81mv18nf6dm2sc2zfzwpf2fdwjqhkkm2xxsxc48gzb1"))))
|
| 136 | (build-system gnu-build-system)
|
| 137 | (arguments
|
| 138 | (list
|
| 139 | #:tests? #f |
| 140 | #:make-flags
|
| 141 | #~(list (string-append "AR=" #$(ar-for-target))
|
| 142 | (string-append "CC=" #$(cc-for-target))
|
| 143 | (string-append "CC_NATIVE=" #$(cc-for-target))
|
| 144 | "--makefile=Makefile-gcc")
|
| 145 | #:phases
|
| 146 | #~(modify-phases %standard-phases
|
| 147 | (delete 'configure) |
| 148 | |
| 149 | (replace 'install
|
| 150 | (lambda _
|
| 151 | (let ((lib (string-append #$output "/lib")))
|
| 152 | (install-file "libvex.a" lib)
|
| 153 | (install-file "libvex.so" lib)))))))
|
| 154 | (home-page "https://github.com/angr/vex")
|
| 155 | (synopsis "Patched version of VEX to work with PyVEX")
|
| 156 | (description
|
| 157 | "This package provides an alternative variant of libVEX (of the Valgrind
|
| 158 | project: valgrind.org) for use with @url{https://github.com/angr/pyvex,
|
| 159 | PyVEX}.")
|
| 160 | (license gpl2+))))
|