gnu: rust: Accept more detailed gdb responses.
[jackhill/guix/guix.git] / gnu / packages / patchutils.scm
CommitLineData
8a9d928f
EB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
9e286eb1 3;;; Copyright © 2015, 2018 Leo Famulari <leo@famulari.name>
58e3603e 4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
8a9d928f
EB
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 patchutils)
22 #:use-module (guix packages)
23 #:use-module (guix licenses)
24 #:use-module (guix download)
3b6eddb2 25 #:use-module (guix git-download)
8a9d928f 26 #:use-module (guix build-system gnu)
3b6eddb2 27 #:use-module (guix build-system python)
8a9d928f
EB
28 #:use-module (gnu packages)
29 #:use-module (gnu packages ed)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages bash)
32 #:use-module (gnu packages file)
33 #:use-module (gnu packages gawk)
34 #:use-module (gnu packages less)
9e286eb1
LF
35 #:use-module (gnu packages mail)
36 #:use-module (gnu packages ncurses)
285d8f0d 37 #:use-module (gnu packages perl)
3b6eddb2 38 #:use-module (gnu packages python)
285d8f0d 39 #:use-module (gnu packages xml))
8a9d928f
EB
40
41(define-public patchutils
42 (package
43 (name "patchutils")
44 (version "0.3.3")
45 (source
46 (origin
47 (method url-fetch)
48 (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
49 name "-" version ".tar.xz"))
50 (sha256
51 (base32
52 "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i"))
fc1adab1 53 (patches (search-patches "patchutils-xfail-gendiff-tests.patch"))))
8a9d928f
EB
54 (build-system gnu-build-system)
55 (inputs `(("perl" ,perl)))
56 (arguments
57 '(#:parallel-tests? #f
dc1d3cde
KK
58 #:phases
59 (modify-phases %standard-phases
60 (add-before 'check 'patch-test-scripts
61 (lambda _
62 (let ((echo (which "echo")))
63 (substitute*
64 (find-files "tests" "^run-test$")
65 (("/bin/echo") echo)))
66 #t))
67 (add-after 'install 'wrap-program
68 ;; Point installed scripts to the utilities they need.
69 (lambda* (#:key inputs outputs #:allow-other-keys)
70 (let* ((out (assoc-ref outputs "out"))
71 (diffutils (assoc-ref inputs "diffutils"))
72 (sed (assoc-ref inputs "sed"))
73 (gawk (assoc-ref inputs "gawk")))
74 (for-each
75 (lambda (prog)
76 (wrap-program (string-append out "/bin/" prog)
77 `("PATH" ":" prefix
78 ,(map (lambda (dir)
79 (string-append dir "/bin"))
80 (list diffutils sed gawk)))))
81 '("dehtmldiff" "editdiff" "espdiff")))
82 #t)))))
8a9d928f
EB
83 (home-page "http://cyberelk.net/tim/software/patchutils")
84 (synopsis "Collection of tools for manipulating patch files")
85 (description
86 "Patchutils is a collection of programs that can manipulate patch files
87in useful ways such as interpolating between two pre-patches, combining two
88incremental patches, fixing line numbers in hand-edited patches, and simply
89listing the files modified by a patch.")
90 (license gpl2+)))
91
92(define-public quilt
93 (package
94 (name "quilt")
95 (version "0.61")
96 (source
97 (origin
98 (method url-fetch)
99 (uri (string-append "mirror://savannah/quilt/"
100 name "-" version ".tar.gz"))
101 (sha256
102 (base32
103 "1hwz58djkq9cv46sjwxbp2v5m8yjr41kd0nm1zm1xm6418khmv0y"))))
104 (build-system gnu-build-system)
105 (inputs `(("perl" ,perl)
106 ("less" ,less)
0253ab39 107 ("file" ,file)
8a9d928f
EB
108 ("ed" ,ed)))
109 (arguments
110 '(#:parallel-tests? #f
dc1d3cde
KK
111 #:phases
112 (modify-phases %standard-phases
113 (add-before 'check 'patch-tests
114 (lambda _
115 (substitute*
116 '("test/run"
117 "test/edit.test")
118 (("/bin/sh") (which "sh")))
119 ;; TODO: Run the mail tests once the mail feature can be supported.
120 (delete-file "test/mail.test")
121 #t))
122 (add-after 'install 'wrap-program
123 ;; quilt's configure checks for the absolute path to the utilities it
124 ;; needs, but uses only the name when invoking them, so we need to
125 ;; make sure the quilt script can find those utilities when run.
126 (lambda* (#:key inputs outputs #:allow-other-keys)
127 (let* ((out (assoc-ref outputs "out"))
128 (coreutils (assoc-ref inputs "coreutils"))
129 (diffutils (assoc-ref inputs "diffutils"))
130 (findutils (assoc-ref inputs "findutils"))
131 (less (assoc-ref inputs "less"))
132 (file (assoc-ref inputs "file"))
133 (ed (assoc-ref inputs "ed"))
134 (sed (assoc-ref inputs "sed"))
135 (bash (assoc-ref inputs "bash"))
136 (grep (assoc-ref inputs "grep")))
137 (wrap-program (string-append out "/bin/quilt")
138 `("PATH" ":" prefix
139 ,(map (lambda (dir)
140 (string-append dir "/bin"))
141 (list coreutils diffutils findutils
142 less file ed sed bash grep)))))
143 #t)))))
8a9d928f
EB
144 (home-page "https://savannah.nongnu.org/projects/quilt/")
145 (synopsis "Script for managing patches to software")
146 (description
147 "Quilt allows you to easily manage large numbers of patches by keeping
148track of the changes each patch makes. Patches can be applied, un-applied,
149refreshed, and more.")
150 (license gpl2)))
285d8f0d
151
152(define-public colordiff
153 (package
154 (name "colordiff")
58e3603e 155 (version "1.0.18")
285d8f0d 156 (source
8d479d27
LF
157 (origin
158 (method url-fetch)
58e3603e
TGR
159 (uri (list (string-append "https://www.colordiff.org/colordiff-"
160 version ".tar.gz")
161 (string-append "http://www.colordiff.org/archive/colordiff-"
8d479d27 162 version ".tar.gz")))
285d8f0d 163 (sha256
8d479d27 164 (base32
58e3603e 165 "1q6n60n4b9fnzccxyxv04mxjsql4ddq17vl2c74ijvjdhpcfrkr9"))))
285d8f0d
166 (build-system gnu-build-system)
167 (arguments
58e3603e 168 `(#:tests? #f ; no tests
285d8f0d
169 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
170 "INSTALL_DIR=/bin" "MAN_DIR=/share/man/man1")
171 #:phases
dc1d3cde 172 (modify-phases %standard-phases
58e3603e
TGR
173 (delete 'configure) ; no configure script
174 (delete 'build)))) ; nothing to build
285d8f0d
175 (inputs
176 `(("perl" ,perl)
177 ("xmlto" ,xmlto)))
8cccd09d 178 (home-page "https://www.colordiff.org")
285d8f0d
179 (synopsis "Display diff output with colors")
180 (description
181 "Colordiff is Perl script wrapper on top of diff command which provides
182'syntax highlighting' for various patch formats.")
183 (license gpl2+)))
3b6eddb2
LC
184
185(define-public patches
5ca54f41 186 (let ((commit "ef1b8a7d954b82ed4af3a08fd63d2085d19090ef"))
3b6eddb2
LC
187 (package
188 (name "patches")
5ca54f41
LC
189 (home-page "https://github.com/stefanha/patches")
190 (version (string-append "0.0-1." (string-take commit 7)))
3b6eddb2
LC
191 (source (origin
192 (method git-fetch)
193 (uri (git-reference
5ca54f41 194 (url home-page)
3b6eddb2
LC
195 (commit commit)))
196 (sha256
197 (base32
5ca54f41
LC
198 "11rdmhv0l1s8nqb20ywmw2zqizczch2p62qf9apyx5wqgxlnjshk"))
199 (file-name (string-append name "-"version "-checkout"))))
3b6eddb2
LC
200 (build-system python-build-system)
201 (inputs `(("python-notmuch" ,python2-notmuch)))
202 (arguments
203 `(#:tests? #f ;no "test" target
5ca54f41 204 #:python ,python-2)) ;not compatible with Python 3
3b6eddb2
LC
205 (synopsis "Patch tracking tool")
206 (description
207 "'Patches' is a patch-tracking tool initially written for the QEMU
208project. It provides commands that build a database of patches from a mailing
209list, and commands that can search that database. It allows users to track
210the status of a patch, apply patches, and search for patches---all that from
211the command-line or from Emacs via its Notmuch integration.")
212 (license gpl2+))))
9e286eb1
LF
213
214(define-public vbindiff
215 (package
216 (name "vbindiff")
217 (version "3.0_beta5")
218 (source (origin
219 (method url-fetch)
220 (uri (string-append "https://www.cjmweb.net/vbindiff/vbindiff-"
221 version ".tar.gz"))
222 (sha256
223 (base32
224 "1f1kj4jki08bnrwpzi663mjfkrx4wnfpzdfwd2qgijlkx5ysjkgh"))))
225 (build-system gnu-build-system)
226 (inputs
227 `(("ncurses" ,ncurses)))
228 (home-page "https://www.cjmweb.net/vbindiff/")
229 (synopsis "Console-based tool for comparing binary data")
230 (description "Visual Binary Diff (@command{vbindiff}) displays files in
231hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and
232highlight the differences between them. It works well with large files (up to 4
233GiB).")
234 (license gpl2+)))