| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages debug)
|
| 20 | #:use-module (guix packages)
|
| 21 | #:use-module (guix licenses)
|
| 22 | #:use-module (guix download)
|
| 23 | #:use-module (guix utils)
|
| 24 | #:use-module (guix build-system gnu)
|
| 25 | #:use-module (gnu packages bash)
|
| 26 | #:use-module (gnu packages flex)
|
| 27 | #:use-module (gnu packages indent)
|
| 28 | #:use-module (gnu packages llvm)
|
| 29 | #:use-module (gnu packages perl)
|
| 30 | #:use-module (gnu packages pretty-print))
|
| 31 |
|
| 32 | (define-public delta
|
| 33 | (package
|
| 34 | (name "delta")
|
| 35 | (version "2006.08.03")
|
| 36 | (source
|
| 37 | (origin
|
| 38 | (method url-fetch)
|
| 39 | (uri (list
|
| 40 | (string-append "http://ftp.de.debian.org/debian/pool/main/d/delta/"
|
| 41 | "delta_" version ".orig.tar.gz")
|
| 42 | |
| 43 | (string-append "http://delta.tigris.org/files/documents/3103/"
|
| 44 | "33566/delta-" version ".tar.gz")))
|
| 45 | (sha256
|
| 46 | (base32
|
| 47 | "184wh35pf2ddx97319s6sgkzpz48xxkbwzcjpycv009bm53lh61q"))))
|
| 48 | (build-system gnu-build-system)
|
| 49 | (inputs |
| 50 | `(("perl" ,perl)))
|
| 51 | (arguments
|
| 52 | `(#:phases
|
| 53 | (alist-replace
|
| 54 | 'install
|
| 55 | (lambda* (#:key outputs #:allow-other-keys)
|
| 56 | |
| 57 | (let* ((out (assoc-ref outputs "out"))
|
| 58 | (bin (string-append out "/bin"))
|
| 59 | (doc (string-append out "/share/doc/delta-" ,version)))
|
| 60 | (begin
|
| 61 | (mkdir-p bin)
|
| 62 | (mkdir-p doc)
|
| 63 | (for-each (lambda (h)
|
| 64 | (copy-file h (string-append doc "/" (basename h))))
|
| 65 | `("License.txt" ,@(find-files "www" ".*\\.html")))
|
| 66 | (for-each (lambda (b)
|
| 67 | (copy-file b (string-append bin "/" b)))
|
| 68 | `("delta" "multidelta" "topformflat")))))
|
| 69 | (alist-delete 'configure %standard-phases))))
|
| 70 | (home-page "http://delta.tigris.org/")
|
| 71 | (synopsis "Heuristical file minimizer")
|
| 72 | (description
|
| 73 | "Delta assists you in minimizing \"interesting\" files subject to a test
|
| 74 | of their interestingness. A common such situation is when attempting to
|
| 75 | isolate a small failure-inducing substring of a large input that causes your
|
| 76 | program to exhibit a bug.")
|
| 77 | |
| 78 | |
| 79 | (license bsd-3)))
|
| 80 |
|
| 81 | (define-public c-reduce
|
| 82 | (package
|
| 83 | (name "c-reduce")
|
| 84 | (version "2.2.1")
|
| 85 | (source
|
| 86 | (origin
|
| 87 | (method url-fetch)
|
| 88 | (uri (list
|
| 89 | (string-append "http://embed.cs.utah.edu/creduce/"
|
| 90 | "creduce-" version ".tar.gz")))
|
| 91 | (sha256
|
| 92 | (base32
|
| 93 | "0wh0fkyg2l41d2wkndrgdiai9g2qiav7jik7cys21vmgzq01pyy2"))
|
| 94 | (modules '((guix build utils)))
|
| 95 | (snippet
|
| 96 | '(substitute* "clang_delta/TransformationManager.cpp"
|
| 97 | (("llvm/Config/config.h") "llvm/Config/llvm-config.h")))))
|
| 98 | (build-system gnu-build-system)
|
| 99 | (inputs
|
| 100 | `(("astyle" ,astyle)
|
| 101 | ("delta" ,delta)
|
| 102 | ("llvm" ,llvm-3.5)
|
| 103 | ("clang" ,clang-3.5)
|
| 104 | ("flex" ,flex)
|
| 105 | ("indent" ,indent)
|
| 106 | ("perl" ,perl)
|
| 107 | ("benchmark-timer" ,perl-benchmark-timer)
|
| 108 | ("exporter-lite" ,perl-exporter-lite)
|
| 109 | ("file-which" ,perl-file-which)
|
| 110 | ("getopt-tabular" ,perl-getopt-tabular)
|
| 111 | ("regex-common" ,perl-regexp-common)
|
| 112 | ("sys-cpu" ,perl-sys-cpu)))
|
| 113 | (arguments
|
| 114 | `(#:phases (alist-cons-after
|
| 115 | 'install 'set-load-paths
|
| 116 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 117 | |
| 118 | (let* ((out (assoc-ref outputs "out"))
|
| 119 | (prog (string-append out "/bin/creduce")))
|
| 120 | (wrap-program
|
| 121 | prog
|
| 122 | `("PERL5LIB" ":" prefix
|
| 123 | ,(map (lambda (p)
|
| 124 | (string-append (assoc-ref inputs p)
|
| 125 | "/lib/perl5/site_perl/"
|
| 126 | ,(package-version perl)))
|
| 127 | '("benchmark-timer" "exporter-lite"
|
| 128 | "file-which" "getopt-tabular"
|
| 129 | "regex-common" "sys-cpu"))))))
|
| 130 | %standard-phases)))
|
| 131 | (home-page "http://embed.cs.utah.edu/creduce")
|
| 132 | (synopsis "Reducer for interesting code")
|
| 133 | (description
|
| 134 | "C-Reduce is a tool that takes a large C or C++ program that has a
|
| 135 | property of interest (such as triggering a compiler bug) and automatically
|
| 136 | produces a much smaller C/C++ program that has the same property. It is
|
| 137 | intended for use by people who discover and report bugs in compilers and other
|
| 138 | tools that process C/C++ code.")
|
| 139 | (license ncsa)))
|