projects/guix·blob beam-team · refs

689 lines · 28.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2014,2017, 2018, 2023 Eric Bavier <[email protected]>
4;;; Copyright © 2015, 2018 Leo Famulari <[email protected]>
5;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2019 Christopher Baines <[email protected]>
7;;; Copyright © 2021 Xinglu Chen <[email protected]>
8;;; Copyright © 2022 jgart <[email protected]>
9;;; Copyright © 2023 Andy Tai <[email protected]>
10;;; Copyright © 2023 Efraim Flashner <[email protected]>
11;;; Copyright © 2023 Foundation Devices, Inc. <[email protected]>
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages patchutils)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages bash)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages django)
37 #:use-module (gnu packages elf)
38 #:use-module (gnu packages engineering)
39 #:use-module (gnu packages file)
40 #:use-module (gnu packages freedesktop)
41 #:use-module (gnu packages gawk)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages groff)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages less)
48 #:use-module (gnu packages mail)
49 #:use-module (gnu packages markup)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages ocaml)
52 #:use-module (gnu packages package-management)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages python-build)
57 #:use-module (gnu packages python-xyz)
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages text-editors)
60 #:use-module (gnu packages time)
61 #:use-module (gnu packages version-control)
62 #:use-module (gnu packages vim)
63 #:use-module (gnu packages xml)
64 #:use-module (gnu packages)
65 #:use-module (guix build-system glib-or-gtk)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system meson)
68 #:use-module (guix build-system ocaml)
69 #:use-module (guix build-system pyproject)
70 #:use-module (guix download)
71 #:use-module (guix gexp)
72 #:use-module (guix git-download)
73 #:use-module (guix packages)
74 #:use-module (guix utils))
75
76(define-public coccinelle
77 (let ((revision "0")
78 (commit "6608e45f85a10c57a3c910154cf049a5df4d98e4"))
79 (package
80 (name "coccinelle")
81 (version (git-version "1.1.1" revision commit))
82 (source
83 (origin
84 (method git-fetch)
85 (uri (git-reference
86 (url "https://github.com/coccinelle/coccinelle")
87 (commit commit)))
88 (file-name (git-file-name name version))
89 (modules '((guix build utils)))
90 (snippet
91 #~(delete-file-recursively "bundles"))
92 (sha256
93 (base32
94 "08nycmjyckqmqjpi78dcqdbmjq1xp18qdc6023dl90gdi6hmxz9l"))))
95 (build-system gnu-build-system)
96 (arguments
97 (list #:phases
98 #~(modify-phases %standard-phases
99 (add-before 'bootstrap 'prepare-version.sh
100 (lambda _
101 (setenv "MAKE_COCCI_RELEASE" "y")
102 (patch-shebang "version.sh")))
103 (add-before 'check 'set-batch-mode
104 (lambda _
105 (substitute* "Makefile"
106 (("--testall")
107 "--batch_mode --testall")))))))
108 (propagated-inputs
109 (list ocaml-menhir
110 ocaml-num
111 ocaml-parmap
112 ocaml-pcre
113 ocaml-pyml
114 ocaml-stdcompat))
115 (native-inputs
116 (list autoconf
117 automake
118 ocaml
119 ocaml-findlib
120 pkg-config))
121 (home-page "https://coccinelle.lip6.fr")
122 (synopsis "Transformation of C code using semantic patches")
123 (description "Coccinelle is a tool that allows modification of C code
124using semantic patches in the @acronym{SmPL, Semantic Patch Language} for
125specifying desired matches and transformations in the C code.")
126 (license license:gpl2))))
127
128(define-public e9patch
129 (package
130 (name "e9patch")
131 (version "1.0.0")
132 (source
133 (origin
134 (method git-fetch)
135 (uri (git-reference
136 (url "https://github.com/GJDuck/e9patch")
137 (commit (string-append "v" version))))
138 (file-name (git-file-name name version))
139 (sha256
140 (base32 "1bgv05fnz0kfzpyikadp96zrr83214lk2nx82jpmlv9dq0lhxccq"))
141 ;; E9Patch is sensitive to Zydis version, including the latter's bugs:
142 ;; https://github.com/GJDuck/e9patch/pull/94#issuecomment-2525069952
143 (patches (search-patches "e9patch-zydis-4.1-compat.patch"))
144 (modules '((guix build utils)))
145 ;; The following snippet is also for Zydis 4.1 compatibility.
146 ;; The patch replaces a single line in 43 files, producing a giant diff:
147 ;; https://github.com/GJDuck/e9patch/pull/93.patch
148 (snippet
149 #~(begin
150 (substitute* (find-files "test/regtest" "\\.exp$")
151 (("\\$0x8877665544332211")
152 "$-0x778899aabbccddef"))
153 ;; The regular expression to test is .*a.*,
154 ;; matching the number produced by the substitution above.
155 (substitute* "test/regtest/not_regex.exp"
156 ((".*\\$-0x778899aabbccddef.*")
157 ""))))))
158 (build-system gnu-build-system)
159 (arguments
160 (list
161 #:phases
162 #~(modify-phases %standard-phases
163 (delete 'configure))
164 #:make-flags
165 #~(list (string-append "CC=" #$(cc-for-target))
166 (string-append "PREFIX=" #$output))))
167 (native-inputs (list markdown xxd))
168 (inputs (list elfutils zycore zydis zlib))
169 (home-page "https://github.com/GJDuck/e9patch")
170 (synopsis "Static binary rewriting tool")
171 (description
172 "E9Patch is a static binary rewriting tool for x86-64 ELF binaries,
173both executables and shared objects. The patched binaries can be used
174in place of the original, without requiring additional runtime dependencies.
175Binary patches can be defined through a high-level interface, which focuses
176on ease of use, or low-level interfaces, which provide additional flexibility
177and allow optimizations for performance.")
178 (license (list license:expat ;src/e9patch/e9loader_*.cpp
179 license:gpl3+)))) ;rest
180
181(define-public patchutils
182 (package
183 (name "patchutils")
184 (version "0.4.2")
185 (source
186 (origin
187 (method url-fetch)
188 (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
189 name "-" version ".tar.xz"))
190 (sha256
191 (base32
192 "1va5pzmxbzpi87vdnbjm9qdf9bvzps9xfv0gi4mycgg3bybb0xc8"))))
193 (build-system gnu-build-system)
194 (inputs
195 (list bash-minimal perl python))
196 (arguments
197 '(#:parallel-tests? #f
198 #:phases
199 (modify-phases %standard-phases
200 (add-before 'check 'patch-test-scripts
201 (lambda _
202 (substitute* (find-files "tests" "^run-test$")
203 (("/bin/echo") (which "echo")))))
204 (add-after 'install 'wrap-program
205 ;; Point installed scripts to the utilities they need.
206 (lambda* (#:key inputs outputs #:allow-other-keys)
207 (let* ((out (assoc-ref outputs "out"))
208 (diffutils (assoc-ref inputs "diffutils"))
209 (sed (assoc-ref inputs "sed"))
210 (gawk (assoc-ref inputs "gawk")))
211 (for-each
212 (lambda (prog)
213 (wrap-program (string-append out "/bin/" prog)
214 `("PATH" ":" prefix
215 ,(map (lambda (dir)
216 (string-append dir "/bin"))
217 (list diffutils sed gawk)))))
218 '("dehtmldiff" "editdiff" "espdiff"))))))))
219 (home-page "http://cyberelk.net/tim/software/patchutils")
220 (synopsis "Collection of tools for manipulating patch files")
221 (description
222 "Patchutils is a collection of programs that can manipulate patch files
223in useful ways such as interpolating between two pre-patches, combining two
224incremental patches, fixing line numbers in hand-edited patches, and simply
225listing the files modified by a patch.")
226 (license license:gpl2+)))
227
228(define-public quilt
229 (package
230 (name "quilt")
231 (version "0.67")
232 (source
233 (origin
234 (method url-fetch)
235 (uri (string-append "mirror://savannah/quilt/"
236 "quilt-" version ".tar.gz"))
237 (sha256
238 (base32 "1hiw05aqysbnnl15zg2n5cr11k0z7rz85fvq8qv6qap7hw4vxqrv"))
239 (patches (search-patches "quilt-grep-compat.patch"))))
240 (build-system gnu-build-system)
241 (native-inputs
242 (list gettext-minimal))
243 (inputs
244 (list bash-minimal perl less file gzip ed
245 diffutils diffstat findutils tar))
246 (arguments
247 '(#:parallel-tests? #f
248 #:phases
249 (modify-phases %standard-phases
250 (delete 'check)
251 (add-after 'install 'wrap-program
252 ;; quilt's configure checks for the absolute path to the utilities it
253 ;; needs, but uses only the name when invoking them, so we need to
254 ;; make sure the quilt script can find those utilities when run.
255 (lambda* (#:key inputs outputs #:allow-other-keys)
256 (let ((cmd-path (lambda (cmd) (dirname (which cmd))))
257 (out (assoc-ref outputs "out")))
258 (wrap-program (string-append out "/bin/quilt")
259 `("PATH" ":" prefix
260 ,(map cmd-path
261 (list "bash" "diff" "diffstat" "ed" "file" "find" "grep"
262 "gzip" "less" "patch" "perl" "rm" "sed" "tar"))))
263 (wrap-program (string-append out "/share/quilt/scripts/backup-files")
264 `("PATH" ":" prefix
265 ,(map cmd-path
266 (list "find" "grep" "mkdir")))))))
267 (add-after 'compress-documentation 'check
268 (lambda _
269 (substitute* '("test/run" "test/edit.test")
270 (("/bin/sh") (which "sh"))
271 (("rm -rf") (string-append (which "rm") " -rf")))
272 (substitute* "Makefile"
273 (("^(PATH|QUILT_DIR).*" &)
274 (string-append "#" &)) ; Test the installed 'quilt'
275 (("export QUILT_DIR") "export")
276 (("\\| sort") (string-append "| " (which "sort")))
277 (("\\| sed") (string-append "| " (which "sed")))
278 (("(chmod|touch)" &) (which &)))
279 ;; Tests are scripts interpreted by `test/run` and may specify
280 ;; the execution of several tools. But PATH will be empty, so
281 ;; rewrite with the full file name:
282 (setenv "PATH" (string-append %output "/bin" ":" (getenv "PATH")))
283 (substitute* (find-files "test" "\\.test$")
284 (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
285 & > cmd <)
286 (if (string=? cmd "zcat")
287 ;; The `zcat` program is a script, and it will not be able
288 ;; to invoke its `gzip` with PATH unset. It's a simple
289 ;; script though, so just translate here:
290 (string-append > (which "gzip") " -cd " <)
291 (or (and=> (which cmd)
292 (lambda (p) (string-append > p <)))
293 &))))
294 (let ((make (which "make")))
295 ;; Assert the installed 'quilt' can find utilities it needs.
296 (unsetenv "PATH")
297 ;; Used by some tests for access to internal "scripts"
298 (setenv "QUILT_DIR" (string-append %output "/share/quilt"))
299 (invoke make "check")))))))
300 (home-page "https://savannah.nongnu.org/projects/quilt/")
301 (synopsis "Script for managing patches to software")
302 (description
303 "Quilt allows you to easily manage large numbers of patches by keeping
304track of the changes each patch makes. Patches can be applied, un-applied,
305refreshed, and more.")
306 (license license:gpl2)))
307
308(define-public colordiff
309 (package
310 (name "colordiff")
311 (version "1.0.21")
312 (source
313 (origin
314 (method url-fetch)
315 (uri (list (string-append "https://www.colordiff.org/colordiff-"
316 version ".tar.gz")
317 (string-append "http://www.colordiff.org/archive/colordiff-"
318 version ".tar.gz")))
319 (sha256
320 (base32 "05g64z4ls1i70rpzznjxy2cpjgywisnwj9ssx9nq1w7hgqjz8c4v"))))
321 (build-system gnu-build-system)
322 (arguments
323 `(#:tests? #f ; no tests
324 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
325 "INSTALL_DIR=/bin" "MAN_DIR=/share/man/man1")
326 #:phases
327 (modify-phases %standard-phases
328 (delete 'configure) ; no configure script
329 (delete 'build)))) ; nothing to build
330 (inputs
331 (list perl xmlto))
332 (home-page "https://www.colordiff.org")
333 (synopsis "Display diff output with colors")
334 (description
335 "Colordiff is Perl script wrapper on top of diff command which provides
336'syntax highlighting' for various patch formats.")
337 (license license:gpl2+)))
338
339(define-public vbindiff
340 (package
341 (name "vbindiff")
342 (version "3.0_beta5")
343 (source (origin
344 (method url-fetch)
345 (uri (string-append "https://www.cjmweb.net/vbindiff/vbindiff-"
346 version ".tar.gz"))
347 (sha256
348 (base32
349 "1f1kj4jki08bnrwpzi663mjfkrx4wnfpzdfwd2qgijlkx5ysjkgh"))))
350 (build-system gnu-build-system)
351 (inputs
352 (list ncurses))
353 (home-page "https://www.cjmweb.net/vbindiff/")
354 (synopsis "Console-based tool for comparing binary data")
355 (description "Visual Binary Diff (@command{vbindiff}) displays files in
356hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and
357highlight the differences between them. It works well with large files (up to 4
358GiB).")
359 (license license:gpl2+)))
360
361(define-public meld
362 (package
363 (name "meld")
364 (version "3.24.0")
365 (source
366 (origin
367 (method url-fetch)
368 (uri (string-append "mirror://gnome/sources/meld/"
369 (version-major+minor version)
370 "/meld-" version ".tar.xz"))
371 (sha256
372 (base32 "154b052p8nffq69hi1dl2fxb4ayvh9hyblmw2r2m32bwgqlkdw0r"))))
373 (build-system meson-build-system)
374 (native-inputs
375 (list desktop-file-utils
376 (list gtk+ "bin") ;for gtk-update-icon-cache
377 intltool
378 itstool
379 libxml2
380 `(,glib "bin") ; for glib-compile-schemas
381 gobject-introspection
382 pkg-config
383 python))
384 (inputs
385 (list bash-minimal
386 python
387 python-pycairo
388 python-pygobject
389 gsettings-desktop-schemas
390 gtksourceview-4))
391 (propagated-inputs
392 (list dconf))
393 (arguments
394 (list
395 #:glib-or-gtk? #t
396 #:imported-modules (append %meson-build-system-modules
397 %pyproject-build-system-modules)
398 #:modules '((guix build meson-build-system)
399 ((guix build pyproject-build-system) #:prefix python:)
400 (guix build utils))
401 #:phases
402 #~(modify-phases %standard-phases
403 (add-after 'install 'copy-styles
404 (lambda* (#:key inputs outputs #:allow-other-keys)
405 (let ((styles "/share/gtksourceview-4/styles"))
406 (copy-recursively
407 (string-append (assoc-ref inputs "gtksourceview") styles)
408 (string-append (assoc-ref outputs "out") styles)))))
409 (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
410 (lambda* (#:key inputs outputs #:allow-other-keys)
411 (wrap-program (search-input-file outputs "bin/meld")
412 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")
413 ,(python:site-packages inputs outputs)))
414 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
415 (home-page "https://meldmerge.org/")
416 (synopsis "Compare files, directories and working copies")
417 (description "Meld is a visual diff and merge tool targeted at
418developers. Meld helps you compare files, directories, and version controlled
419projects. It provides two- and three-way comparison of both files and
420directories, and has support for many popular version control systems.
421
422Meld helps you review code changes and understand patches. It might even help
423you to figure out what is going on in that merge you keep avoiding.")
424 (license license:gpl2)))
425
426(define-public patchwork
427 (package
428 (name "patchwork")
429 (version "3.2.1")
430 (source
431 (origin
432 (method git-fetch)
433 (uri (git-reference
434 (url "https://github.com/getpatchwork/patchwork")
435 (commit (string-append "v" version))))
436 (file-name (git-file-name name version))
437 (sha256
438 (base32 "04ikawdyhjwspxvhazbp5f5vym672y0jcw8rd2m75h9ipcpnyxim"))))
439 (build-system pyproject-build-system)
440 (arguments
441 (list
442 #:tests? #f ;TODO: Tests require a running database
443 #:phases
444 #~(modify-phases %standard-phases
445 (delete 'configure)
446 (delete 'build)
447 (add-after 'unpack 'replace-wsgi.py
448 (lambda* (#:key inputs outputs #:allow-other-keys)
449 (delete-file "patchwork/wsgi.py")
450 (call-with-output-file "patchwork/wsgi.py"
451 (lambda (port)
452 ;; Embed the PYTHONPATH containing the dependencies, as well
453 ;; as the python modules in this package in the wsgi.py file,
454 ;; as this will ensure they are available at runtime.
455 (define pythonpath
456 (string-append (getenv "GUIX_PYTHONPATH") ":"
457 (site-packages inputs outputs)))
458 (display (string-append
459 "\nimport os, sys\n\nsys.path.extend('" pythonpath
460 "'.split(':'))
461
462from django.core.wsgi import get_wsgi_application
463
464# By default, assume that patchwork is running as a Guix service, which
465# provides the settings as the 'guix.patchwork.settings' Python module.
466#
467# When using httpd, it's hard to set environment variables, so rely on the
468# default set here.
469os.environ['DJANGO_SETTINGS_MODULE'] = os.getenv(
470 'DJANGO_SETTINGS_MODULE',
471 'guix.patchwork.settings' # default
472)
473
474application = get_wsgi_application()\n") port)))))
475 (replace 'check
476 (lambda* (#:key tests? #:allow-other-keys)
477 (when tests?
478 (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.dev")
479 (invoke "python" "-Wonce" "./manage.py" "test" "--noinput"))))
480 (replace 'install
481 (lambda* (#:key inputs outputs #:allow-other-keys)
482 (let ((out (assoc-ref outputs "out"))
483 (out-site-packages (site-packages inputs outputs)))
484 (for-each (lambda (directory)
485 (copy-recursively directory
486 (string-append out-site-packages
487 "/" directory)))
488 '( ;Contains the python code
489 "patchwork"
490 ;; Contains the templates for the generated HTML
491 "templates"))
492 (delete-file-recursively (string-append out-site-packages
493 "/patchwork/tests"))
494
495 (call-with-output-file
496 (string-append out-site-packages "/version.txt")
497 (lambda (port)
498 (display #$version port)
499 (newline port)))
500
501 ;; Install patchwork related tools
502 (for-each
503 (lambda (file)
504 (install-file file (string-append out "/bin")))
505 (list
506 (string-append out-site-packages
507 "/patchwork/bin/parsemail.sh")
508 (string-append out-site-packages
509 "/patchwork/bin/parsemail-batch.sh")))
510
511 ;; Collect the static assets, this includes JavaScript, CSS and
512 ;; fonts. This is a standard Django process when running a
513 ;; Django application for regular use, and includes assets for
514 ;; dependencies like the admin site from Django.
515 ;;
516 ;; The intent here is that you can serve files from this
517 ;; directory through a webserver, which is recommended when
518 ;; running Django applications.
519 (let ((static-root
520 (string-append out "/share/patchwork/htdocs")))
521 ;; Patch the STATICFILES_DIRS entry
522 (substitute* (string-append
523 out-site-packages
524 "/patchwork/settings/base.py")
525 (("os\\.path\\.join\\(ROOT\\_DIR, 'htdocs'\\)")
526 (string-append "'" static-root "'")))
527
528 (mkdir-p static-root)
529 (copy-file "patchwork/settings/production.example.py"
530 "patchwork/settings/assets.py")
531 (setenv "DJANGO_SECRET_KEY" "dummyvalue")
532 (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.assets")
533 (setenv "STATIC_ROOT" static-root)
534 (invoke "./manage.py" "collectstatic" "--no-input"))
535
536 ;; The lib directory includes example configuration files that
537 ;; may be useful when deploying patchwork.
538 (copy-recursively "lib"
539 (string-append out "/share/doc/"
540 #$name "-"
541 #$version)))))
542 ;; The hasher script is used from the post-receive.hook
543 (add-after 'install 'install-hasher
544 (lambda* (#:key inputs outputs #:allow-other-keys)
545 (let* ((out (assoc-ref outputs "out"))
546 (out-site-packages (site-packages inputs outputs))
547 (out-hasher.py (string-append out-site-packages
548 "/patchwork/hasher.py")))
549 (chmod out-hasher.py #o555)
550 (symlink out-hasher.py
551 (string-append out "/bin/hasher")))))
552 ;; Create a patchwork specific version of Django's command line admin
553 ;; utility.
554 (add-after 'install 'install-patchwork-admin
555 (lambda _
556 (mkdir-p (string-append #$output "/bin"))
557 (call-with-output-file (string-append #$output
558 "/bin/patchwork-admin")
559 (lambda (port)
560 (simple-format port "#!~A
561import os, sys
562
563if __name__ == \"__main__\":
564 from django.core.management import execute_from_command_line
565
566 execute_from_command_line(sys.argv)" (which "python"))))
567 (chmod (string-append #$output "/bin/patchwork-admin")
568 #o555))))))
569 (native-inputs (list python-setuptools))
570 (inputs (list python-wrapper))
571 (propagated-inputs
572 (list python-django
573 python-tzdata
574 ;; TODO: Make this configurable
575 python-psycopg2
576 python-mysqlclient
577 python-django-filter
578 python-django-rest-framework
579 python-django-debug-toolbar))
580 (synopsis "Web based patch tracking system")
581 (description
582 "Patchwork is a patch tracking system. It takes in emails containing
583patches, and displays the patches along with comments and state information.
584Users can login allowing them to change the state of patches.")
585 (home-page "http://jk.ozlabs.org/projects/patchwork/")
586 (license license:gpl2+)))
587
588(define-public wdiff
589 (package
590 (name "wdiff")
591 (version "1.2.2")
592 (source
593 (origin
594 (method url-fetch)
595 (uri (string-append "mirror://gnu/wdiff/wdiff-"
596 version ".tar.gz"))
597 (sha256
598 (base32
599 "0sxgg0ms5lhi4aqqvz1rj4s77yi9wymfm3l3gbjfd1qchy66kzrl"))))
600 (build-system gnu-build-system)
601 (arguments
602 (list
603 #:phases
604 #~(modify-phases %standard-phases
605 (add-before 'check 'fix-testsuite
606 (lambda _
607 (substitute* "tests/testsuite"
608 (("#! /bin/sh")
609 (string-append "#!" (which "sh")))))))))
610 (native-inputs
611 (list which
612 ;; For some reason wdiff.info gets rebuilt.
613 texinfo))
614 (home-page "https://www.gnu.org/software/wdiff/")
615 (synopsis "Word difference finder")
616 (description
617 "GNU Wdiff is a front-end to the diff program from Diffutils that
618allows you to compare files on a word-by-word basis, where a word is anything
619between whitespace.")
620 (license license:gpl3+)))
621
622(define-public wiggle
623 (package
624 (name "wiggle")
625 (version "1.3")
626 (source (origin
627 (method git-fetch)
628 (uri (git-reference
629 (url "https://github.com/neilbrown/wiggle")
630 (commit (string-append "v" version))))
631 (file-name (git-file-name name version))
632 (sha256
633 (base32
634 "18ilzr9sbal1j8p1d94ilm1j5blac5cngvcvjpdmgmpw6diy2ldf"))))
635 (build-system gnu-build-system)
636 (arguments
637 (list
638 #:make-flags
639 #~(list "CFLAGS=-I. -O3" "INSTALL=install" "STRIP=-s"
640 (string-append "CC=" #$(cc-for-target))
641 (string-append "BINDIR=" #$output "/bin")
642 (string-append "MANDIR=" #$output "/share/man")
643 (string-append "PREFIX=" #$output))
644 #:test-target "test"
645 #:phases
646 #~(modify-phases %standard-phases
647 (delete 'configure))))
648 (home-page "http://neil.brown.name/wiggle/")
649 (inputs (list ncurses))
650 (native-inputs (list groff))
651 (synopsis "Apply patches with conflicts")
652 (description
653 "@code{wiggle} attempts to apply patches to a target file even if the
654patches do not match perfectly.")
655 (license license:gpl2+)))
656
657(define-public pwclient
658 (package
659 (name "pwclient")
660 (version "1.3.0")
661 (source
662 (origin
663 (method git-fetch)
664 (uri (git-reference
665 (url "https://github.com/getpatchwork/pwclient")
666 (commit version)))
667 (file-name (git-file-name name version))
668 (sha256
669 (base32 "1xckwvcqklzpyh3xs4k2zm40ifp0q5fdkj2vmgb8vhfvl1ivs6jv"))))
670 (build-system pyproject-build-system)
671 (arguments
672 (list
673 #:phases
674 #~(modify-phases %standard-phases
675 (add-after 'install 'install-man-page
676 (lambda _
677 (install-file "man/pwclient.1"
678 (string-append #$output "/share/man/man1")))))))
679 (native-inputs
680 (list python-pbr
681 python-pytest
682 python-mock
683 python-setuptools))
684 (home-page "https://github.com/getpatchwork/pwclient")
685 (synopsis "Command-line client for the Patchwork patch tracking tool")
686 (description
687 "pwclient is a VCS-agnostic tool for interacting with Patchwork, the
688web-based patch tracking system.")
689 (license license:gpl2+)))