projects/guix·blob mesa-updates · refs

701 lines · 28.8 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.1")
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 "185zwzz2cxraidzan328qynibkakk21nw7jip4p9n60nnlha6aab"))
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 (add-after 'install 'wrap-e9compile
164 (lambda* (#:key inputs #:allow-other-keys)
165 (wrap-program (string-append #$output "/bin/e9compile")
166 `("PATH" suffix
167 (,(dirname (search-input-file inputs "bin/gcc"))
168 ,(dirname (search-input-file inputs "bin/grep"))
169 ,(dirname (search-input-file inputs "bin/head"))
170 ,(dirname (search-input-file inputs "bin/readelf"))
171 ,(dirname (search-input-file inputs "bin/xargs"))))
172 `("C_INCLUDE_PATH" suffix
173 (,(dirname (search-input-directory
174 inputs "include/linux")))))))
175 (delete 'configure))
176 #:make-flags
177 #~(list (string-append "CC=" #$(cc-for-target))
178 (string-append "PREFIX=" #$output))))
179 (native-inputs (list markdown xxd))
180 (inputs (list elfutils findutils zycore zydis zlib))
181 (home-page "https://github.com/GJDuck/e9patch")
182 (synopsis "Static binary rewriting tool")
183 (description
184 "E9Patch is a static binary rewriting tool for x86-64 ELF binaries,
185both executables and shared objects. The patched binaries can be used
186in place of the original, without requiring additional runtime dependencies.
187Binary patches can be defined through a high-level interface, which focuses
188on ease of use, or low-level interfaces, which provide additional flexibility
189and allow optimizations for performance.")
190 (license (list license:expat ;src/e9patch/e9loader_*.cpp
191 license:gpl3+)))) ;rest
192
193(define-public patchutils
194 (package
195 (name "patchutils")
196 (version "0.4.2")
197 (source
198 (origin
199 (method url-fetch)
200 (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
201 name "-" version ".tar.xz"))
202 (sha256
203 (base32
204 "1va5pzmxbzpi87vdnbjm9qdf9bvzps9xfv0gi4mycgg3bybb0xc8"))))
205 (build-system gnu-build-system)
206 (inputs
207 (list bash-minimal perl python))
208 (arguments
209 '(#:parallel-tests? #f
210 #:phases
211 (modify-phases %standard-phases
212 (add-before 'check 'patch-test-scripts
213 (lambda _
214 (substitute* (find-files "tests" "^run-test$")
215 (("/bin/echo") (which "echo")))))
216 (add-after 'install 'wrap-program
217 ;; Point installed scripts to the utilities they need.
218 (lambda* (#:key inputs outputs #:allow-other-keys)
219 (let* ((out (assoc-ref outputs "out"))
220 (diffutils (assoc-ref inputs "diffutils"))
221 (sed (assoc-ref inputs "sed"))
222 (gawk (assoc-ref inputs "gawk")))
223 (for-each
224 (lambda (prog)
225 (wrap-program (string-append out "/bin/" prog)
226 `("PATH" ":" prefix
227 ,(map (lambda (dir)
228 (string-append dir "/bin"))
229 (list diffutils sed gawk)))))
230 '("dehtmldiff" "editdiff" "espdiff"))))))))
231 (home-page "http://cyberelk.net/tim/software/patchutils")
232 (synopsis "Collection of tools for manipulating patch files")
233 (description
234 "Patchutils is a collection of programs that can manipulate patch files
235in useful ways such as interpolating between two pre-patches, combining two
236incremental patches, fixing line numbers in hand-edited patches, and simply
237listing the files modified by a patch.")
238 (license license:gpl2+)))
239
240(define-public quilt
241 (package
242 (name "quilt")
243 (version "0.67")
244 (source
245 (origin
246 (method url-fetch)
247 (uri (string-append "mirror://savannah/quilt/"
248 "quilt-" version ".tar.gz"))
249 (sha256
250 (base32 "1hiw05aqysbnnl15zg2n5cr11k0z7rz85fvq8qv6qap7hw4vxqrv"))
251 (patches (search-patches "quilt-grep-compat.patch"))))
252 (build-system gnu-build-system)
253 (native-inputs
254 (list gettext-minimal))
255 (inputs
256 (list bash-minimal perl less file gzip ed
257 diffutils diffstat findutils tar))
258 (arguments
259 '(#:parallel-tests? #f
260 #:phases
261 (modify-phases %standard-phases
262 (delete 'check)
263 (add-after 'install 'wrap-program
264 ;; quilt's configure checks for the absolute path to the utilities it
265 ;; needs, but uses only the name when invoking them, so we need to
266 ;; make sure the quilt script can find those utilities when run.
267 (lambda* (#:key inputs outputs #:allow-other-keys)
268 (let ((cmd-path (lambda (cmd) (dirname (which cmd))))
269 (out (assoc-ref outputs "out")))
270 (wrap-program (string-append out "/bin/quilt")
271 `("PATH" ":" prefix
272 ,(map cmd-path
273 (list "bash" "diff" "diffstat" "ed" "file" "find" "grep"
274 "gzip" "less" "patch" "perl" "rm" "sed" "tar"))))
275 (wrap-program (string-append out "/share/quilt/scripts/backup-files")
276 `("PATH" ":" prefix
277 ,(map cmd-path
278 (list "find" "grep" "mkdir")))))))
279 (add-after 'compress-documentation 'check
280 (lambda _
281 (substitute* '("test/run" "test/edit.test")
282 (("/bin/sh") (which "sh"))
283 (("rm -rf") (string-append (which "rm") " -rf")))
284 (substitute* "Makefile"
285 (("^(PATH|QUILT_DIR).*" &)
286 (string-append "#" &)) ; Test the installed 'quilt'
287 (("export QUILT_DIR") "export")
288 (("\\| sort") (string-append "| " (which "sort")))
289 (("\\| sed") (string-append "| " (which "sed")))
290 (("(chmod|touch)" &) (which &)))
291 ;; Tests are scripts interpreted by `test/run` and may specify
292 ;; the execution of several tools. But PATH will be empty, so
293 ;; rewrite with the full file name:
294 (setenv "PATH" (string-append %output "/bin" ":" (getenv "PATH")))
295 (substitute* (find-files "test" "\\.test$")
296 (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
297 & > cmd <)
298 (if (string=? cmd "zcat")
299 ;; The `zcat` program is a script, and it will not be able
300 ;; to invoke its `gzip` with PATH unset. It's a simple
301 ;; script though, so just translate here:
302 (string-append > (which "gzip") " -cd " <)
303 (or (and=> (which cmd)
304 (lambda (p) (string-append > p <)))
305 &))))
306 (let ((make (which "make")))
307 ;; Assert the installed 'quilt' can find utilities it needs.
308 (unsetenv "PATH")
309 ;; Used by some tests for access to internal "scripts"
310 (setenv "QUILT_DIR" (string-append %output "/share/quilt"))
311 (invoke make "check")))))))
312 (home-page "https://savannah.nongnu.org/projects/quilt/")
313 (synopsis "Script for managing patches to software")
314 (description
315 "Quilt allows you to easily manage large numbers of patches by keeping
316track of the changes each patch makes. Patches can be applied, un-applied,
317refreshed, and more.")
318 (license license:gpl2)))
319
320(define-public colordiff
321 (package
322 (name "colordiff")
323 (version "1.0.21")
324 (source
325 (origin
326 (method url-fetch)
327 (uri (list (string-append "https://www.colordiff.org/colordiff-"
328 version ".tar.gz")
329 (string-append "http://www.colordiff.org/archive/colordiff-"
330 version ".tar.gz")))
331 (sha256
332 (base32 "05g64z4ls1i70rpzznjxy2cpjgywisnwj9ssx9nq1w7hgqjz8c4v"))))
333 (build-system gnu-build-system)
334 (arguments
335 `(#:tests? #f ; no tests
336 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
337 "INSTALL_DIR=/bin" "MAN_DIR=/share/man/man1")
338 #:phases
339 (modify-phases %standard-phases
340 (delete 'configure) ; no configure script
341 (delete 'build)))) ; nothing to build
342 (inputs
343 (list perl xmlto))
344 (home-page "https://www.colordiff.org")
345 (synopsis "Display diff output with colors")
346 (description
347 "Colordiff is Perl script wrapper on top of diff command which provides
348'syntax highlighting' for various patch formats.")
349 (license license:gpl2+)))
350
351(define-public vbindiff
352 (package
353 (name "vbindiff")
354 (version "3.0_beta5")
355 (source (origin
356 (method url-fetch)
357 (uri (string-append "https://www.cjmweb.net/vbindiff/vbindiff-"
358 version ".tar.gz"))
359 (sha256
360 (base32
361 "1f1kj4jki08bnrwpzi663mjfkrx4wnfpzdfwd2qgijlkx5ysjkgh"))))
362 (build-system gnu-build-system)
363 (inputs
364 (list ncurses))
365 (home-page "https://www.cjmweb.net/vbindiff/")
366 (synopsis "Console-based tool for comparing binary data")
367 (description "Visual Binary Diff (@command{vbindiff}) displays files in
368hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and
369highlight the differences between them. It works well with large files (up to 4
370GiB).")
371 (license license:gpl2+)))
372
373(define-public meld
374 (package
375 (name "meld")
376 (version "3.24.1")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (string-append "mirror://gnome/sources/meld/"
381 (version-major+minor version)
382 "/meld-" version ".tar.xz"))
383 (sha256
384 (base32 "07kbgilycnc6g4s6c6zpwfyxh1l5wjwryz5d9pxc52bvhl6yxpr9"))))
385 (build-system meson-build-system)
386 (native-inputs
387 (list desktop-file-utils
388 (list gtk+ "bin") ;for gtk-update-icon-cache
389 intltool
390 itstool
391 libxml2
392 `(,glib "bin") ; for glib-compile-schemas
393 gobject-introspection
394 pkg-config
395 python))
396 (inputs
397 (list bash-minimal
398 python
399 python-pycairo
400 python-pygobject
401 gsettings-desktop-schemas
402 gtksourceview-4))
403 (propagated-inputs
404 (list dconf))
405 (arguments
406 (list
407 #:glib-or-gtk? #t
408 #:imported-modules (append %meson-build-system-modules
409 %pyproject-build-system-modules)
410 #:modules '((guix build meson-build-system)
411 ((guix build pyproject-build-system) #:prefix python:)
412 (guix build utils))
413 #:phases
414 #~(modify-phases %standard-phases
415 (add-after 'install 'copy-styles
416 (lambda* (#:key inputs outputs #:allow-other-keys)
417 (let ((styles "/share/gtksourceview-4/styles"))
418 (copy-recursively
419 (string-append (assoc-ref inputs "gtksourceview") styles)
420 (string-append (assoc-ref outputs "out") styles)))))
421 (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
422 (lambda* (#:key inputs outputs #:allow-other-keys)
423 (wrap-program (search-input-file outputs "bin/meld")
424 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")
425 ,(python:site-packages inputs outputs)))
426 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))
427 (home-page "https://meldmerge.org/")
428 (synopsis "Compare files, directories and working copies")
429 (description "Meld is a visual diff and merge tool targeted at
430developers. Meld helps you compare files, directories, and version controlled
431projects. It provides two- and three-way comparison of both files and
432directories, and has support for many popular version control systems.
433
434Meld helps you review code changes and understand patches. It might even help
435you to figure out what is going on in that merge you keep avoiding.")
436 (license license:gpl2)))
437
438(define-public patchwork
439 (package
440 (name "patchwork")
441 (version "3.2.1")
442 (source
443 (origin
444 (method git-fetch)
445 (uri (git-reference
446 (url "https://github.com/getpatchwork/patchwork")
447 (commit (string-append "v" version))))
448 (file-name (git-file-name name version))
449 (sha256
450 (base32 "04ikawdyhjwspxvhazbp5f5vym672y0jcw8rd2m75h9ipcpnyxim"))))
451 (build-system pyproject-build-system)
452 (arguments
453 (list
454 #:tests? #f ;TODO: Tests require a running database
455 #:phases
456 #~(modify-phases %standard-phases
457 (delete 'configure)
458 (delete 'build)
459 (add-after 'unpack 'replace-wsgi.py
460 (lambda* (#:key inputs outputs #:allow-other-keys)
461 (delete-file "patchwork/wsgi.py")
462 (call-with-output-file "patchwork/wsgi.py"
463 (lambda (port)
464 ;; Embed the PYTHONPATH containing the dependencies, as well
465 ;; as the python modules in this package in the wsgi.py file,
466 ;; as this will ensure they are available at runtime.
467 (define pythonpath
468 (string-append (getenv "GUIX_PYTHONPATH") ":"
469 (site-packages inputs outputs)))
470 (display (string-append
471 "\nimport os, sys\n\nsys.path.extend('" pythonpath
472 "'.split(':'))
473
474from django.core.wsgi import get_wsgi_application
475
476# By default, assume that patchwork is running as a Guix service, which
477# provides the settings as the 'guix.patchwork.settings' Python module.
478#
479# When using httpd, it's hard to set environment variables, so rely on the
480# default set here.
481os.environ['DJANGO_SETTINGS_MODULE'] = os.getenv(
482 'DJANGO_SETTINGS_MODULE',
483 'guix.patchwork.settings' # default
484)
485
486application = get_wsgi_application()\n") port)))))
487 (replace 'check
488 (lambda* (#:key tests? #:allow-other-keys)
489 (when tests?
490 (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.dev")
491 (invoke "python" "-Wonce" "./manage.py" "test" "--noinput"))))
492 (replace 'install
493 (lambda* (#:key inputs outputs #:allow-other-keys)
494 (let ((out (assoc-ref outputs "out"))
495 (out-site-packages (site-packages inputs outputs)))
496 (for-each (lambda (directory)
497 (copy-recursively directory
498 (string-append out-site-packages
499 "/" directory)))
500 '( ;Contains the python code
501 "patchwork"
502 ;; Contains the templates for the generated HTML
503 "templates"))
504 (delete-file-recursively (string-append out-site-packages
505 "/patchwork/tests"))
506
507 (call-with-output-file
508 (string-append out-site-packages "/version.txt")
509 (lambda (port)
510 (display #$version port)
511 (newline port)))
512
513 ;; Install patchwork related tools
514 (for-each
515 (lambda (file)
516 (install-file file (string-append out "/bin")))
517 (list
518 (string-append out-site-packages
519 "/patchwork/bin/parsemail.sh")
520 (string-append out-site-packages
521 "/patchwork/bin/parsemail-batch.sh")))
522
523 ;; Collect the static assets, this includes JavaScript, CSS and
524 ;; fonts. This is a standard Django process when running a
525 ;; Django application for regular use, and includes assets for
526 ;; dependencies like the admin site from Django.
527 ;;
528 ;; The intent here is that you can serve files from this
529 ;; directory through a webserver, which is recommended when
530 ;; running Django applications.
531 (let ((static-root
532 (string-append out "/share/patchwork/htdocs")))
533 ;; Patch the STATICFILES_DIRS entry
534 (substitute* (string-append
535 out-site-packages
536 "/patchwork/settings/base.py")
537 (("os\\.path\\.join\\(ROOT\\_DIR, 'htdocs'\\)")
538 (string-append "'" static-root "'")))
539
540 (mkdir-p static-root)
541 (copy-file "patchwork/settings/production.example.py"
542 "patchwork/settings/assets.py")
543 (setenv "DJANGO_SECRET_KEY" "dummyvalue")
544 (setenv "DJANGO_SETTINGS_MODULE" "patchwork.settings.assets")
545 (setenv "STATIC_ROOT" static-root)
546 (invoke "./manage.py" "collectstatic" "--no-input"))
547
548 ;; The lib directory includes example configuration files that
549 ;; may be useful when deploying patchwork.
550 (copy-recursively "lib"
551 (string-append out "/share/doc/"
552 #$name "-"
553 #$version)))))
554 ;; The hasher script is used from the post-receive.hook
555 (add-after 'install 'install-hasher
556 (lambda* (#:key inputs outputs #:allow-other-keys)
557 (let* ((out (assoc-ref outputs "out"))
558 (out-site-packages (site-packages inputs outputs))
559 (out-hasher.py (string-append out-site-packages
560 "/patchwork/hasher.py")))
561 (chmod out-hasher.py #o555)
562 (symlink out-hasher.py
563 (string-append out "/bin/hasher")))))
564 ;; Create a patchwork specific version of Django's command line admin
565 ;; utility.
566 (add-after 'install 'install-patchwork-admin
567 (lambda _
568 (mkdir-p (string-append #$output "/bin"))
569 (call-with-output-file (string-append #$output
570 "/bin/patchwork-admin")
571 (lambda (port)
572 (simple-format port "#!~A
573import os, sys
574
575if __name__ == \"__main__\":
576 from django.core.management import execute_from_command_line
577
578 execute_from_command_line(sys.argv)" (which "python"))))
579 (chmod (string-append #$output "/bin/patchwork-admin")
580 #o555))))))
581 (native-inputs (list python-setuptools))
582 (inputs (list python-wrapper))
583 (propagated-inputs
584 (list python-django
585 python-tzdata
586 ;; TODO: Make this configurable
587 python-psycopg2
588 python-mysqlclient
589 python-django-filter
590 python-django-rest-framework
591 python-django-debug-toolbar))
592 (synopsis "Web based patch tracking system")
593 (description
594 "Patchwork is a patch tracking system. It takes in emails containing
595patches, and displays the patches along with comments and state information.
596Users can login allowing them to change the state of patches.")
597 (home-page "http://jk.ozlabs.org/projects/patchwork/")
598 (license license:gpl2+)))
599
600(define-public wdiff
601 (package
602 (name "wdiff")
603 (version "1.2.2")
604 (source
605 (origin
606 (method url-fetch)
607 (uri (string-append "mirror://gnu/wdiff/wdiff-"
608 version ".tar.gz"))
609 (sha256
610 (base32
611 "0sxgg0ms5lhi4aqqvz1rj4s77yi9wymfm3l3gbjfd1qchy66kzrl"))))
612 (build-system gnu-build-system)
613 (arguments
614 (list
615 #:phases
616 #~(modify-phases %standard-phases
617 (add-before 'check 'fix-testsuite
618 (lambda _
619 (substitute* "tests/testsuite"
620 (("#! /bin/sh")
621 (string-append "#!" (which "sh")))))))))
622 (native-inputs
623 (list which
624 ;; For some reason wdiff.info gets rebuilt.
625 texinfo))
626 (home-page "https://www.gnu.org/software/wdiff/")
627 (synopsis "Word difference finder")
628 (description
629 "GNU Wdiff is a front-end to the diff program from Diffutils that
630allows you to compare files on a word-by-word basis, where a word is anything
631between whitespace.")
632 (license license:gpl3+)))
633
634(define-public wiggle
635 (package
636 (name "wiggle")
637 (version "1.3")
638 (source (origin
639 (method git-fetch)
640 (uri (git-reference
641 (url "https://github.com/neilbrown/wiggle")
642 (commit (string-append "v" version))))
643 (file-name (git-file-name name version))
644 (sha256
645 (base32
646 "18ilzr9sbal1j8p1d94ilm1j5blac5cngvcvjpdmgmpw6diy2ldf"))))
647 (build-system gnu-build-system)
648 (arguments
649 (list
650 #:make-flags
651 #~(list "CFLAGS=-I. -O3" "INSTALL=install" "STRIP=-s"
652 (string-append "CC=" #$(cc-for-target))
653 (string-append "BINDIR=" #$output "/bin")
654 (string-append "MANDIR=" #$output "/share/man")
655 (string-append "PREFIX=" #$output))
656 #:test-target "test"
657 #:phases
658 #~(modify-phases %standard-phases
659 (delete 'configure))))
660 (home-page "http://neil.brown.name/wiggle/")
661 (inputs (list ncurses))
662 (native-inputs (list groff))
663 (synopsis "Apply patches with conflicts")
664 (description
665 "@code{wiggle} attempts to apply patches to a target file even if the
666patches do not match perfectly.")
667 (license license:gpl2+)))
668
669(define-public pwclient
670 (package
671 (name "pwclient")
672 (version "1.3.0")
673 (source
674 (origin
675 (method git-fetch)
676 (uri (git-reference
677 (url "https://github.com/getpatchwork/pwclient")
678 (commit version)))
679 (file-name (git-file-name name version))
680 (sha256
681 (base32 "1xckwvcqklzpyh3xs4k2zm40ifp0q5fdkj2vmgb8vhfvl1ivs6jv"))))
682 (build-system pyproject-build-system)
683 (arguments
684 (list
685 #:phases
686 #~(modify-phases %standard-phases
687 (add-after 'install 'install-man-page
688 (lambda _
689 (install-file "man/pwclient.1"
690 (string-append #$output "/share/man/man1")))))))
691 (native-inputs
692 (list python-pbr
693 python-pytest
694 python-mock
695 python-setuptools))
696 (home-page "https://github.com/getpatchwork/pwclient")
697 (synopsis "Command-line client for the Patchwork patch tracking tool")
698 (description
699 "pwclient is a VCS-agnostic tool for interacting with Patchwork, the
700web-based patch tracking system.")
701 (license license:gpl2+)))