projects/guix·blob librewolf-updates · refs

2074 lines · 83.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <[email protected]>
3;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2024 Ricardo Wurmus <[email protected]>
4;;; Copyright © 2015, 2016 Ben Woodcroft <[email protected]>
5;;; Copyright © 2015 Roel Janssen <[email protected]>
6;;; Copyright © 2016 Jelle Licht <[email protected]>
7;;; Copyright © 2016 Alex Griffin <[email protected]>
8;;; Copyright © 2016, 2018, 2019, 2020, 2023, 2025 Efraim Flashner <[email protected]>
9;;; Copyright © 2016 Nikita <[email protected]>
10;;; Copyright © 2016, 2020 Marius Bakke <[email protected]>
11;;; Copyright © 2017 Eric Bavier <[email protected]>
12;;; Copyright © 2017 Rene Saavedra <[email protected]>
13;;; Copyright © 2017,2019 Hartmut Goebel <[email protected]>
14;;; Copyright © 2017 Kei Kebreau <[email protected]>
15;;; Copyright © 2017 Alex Vong <[email protected]>
16;;; Copyright © 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice <[email protected]>
17;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
18;;; Copyright © 2018 Meiyo Peng <[email protected]>
19;;; Copyright © 2019 Yoshinori Arai <[email protected]>
20;;; Copyright © 2019 Mădălin Ionel Patrașcu <[email protected]>
21;;; Copyright © 2019 Wiktor Żelazny <[email protected]>
22;;; Copyright © 2020 Joseph LaFreniere <[email protected]>
23;;; Copyright © 2020 Maxim Cournoyer <[email protected]>
24;;; Copyright © 2021 Jean-Baptiste Volatier <[email protected]>
25;;; Copyright © 2021 Simon Tournier <[email protected]>
26;;; Copyright © 2021 Felix Gruber <[email protected]>
27;;; Copyright © 2021 Bonface Munyoki Kilyungi <[email protected]>
28;;; Copyright © 2021 Tanguy Le Carrour <[email protected]>
29;;; Copyright © 2022, 2024 kiasoc5 <[email protected]>
30;;; Copyright © 2022 Gabriel Wicki <[email protected]>
31;;; Copyright © 2022 Greg Hogan <[email protected]>
32;;; Copyright © 2022 M <[email protected]>
33;;; Copyright © 2022 Paul A. Patience <[email protected]>
34;;; Copyright © 2023 Reza Housseini <[email protected]>
35;;; Copyright © 2023 Hilton Chain <[email protected]>
36;;; Copyright © 2023, 2024 Zheng Junjie <[email protected]>
37;;; Copyright © 2024 John Kehayias <[email protected]>
38;;; Copyright © 2024 Timotej Lazar <[email protected]>
39;;; Copyright © 2024-2026 Sharlatan Hellseher <[email protected]>
40;;; Copyright © 2024, 2025 Ashish SHUKLA <[email protected]>
41;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
42;;; Copyright © 2025 John Khoo <[email protected]>
43;;;
44;;; This file is part of GNU Guix.
45;;;
46;;; GNU Guix is free software; you can redistribute it and/or modify it
47;;; under the terms of the GNU General Public License as published by
48;;; the Free Software Foundation; either version 3 of the License, or (at
49;;; your option) any later version.
50;;;
51;;; GNU Guix is distributed in the hope that it will be useful, but
52;;; WITHOUT ANY WARRANTY; without even the implied warranty of
53;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54;;; GNU General Public License for more details.
55;;;
56;;; You should have received a copy of the GNU General Public License
57;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
58
59(define-module (gnu packages textutils)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (guix build-system ant)
62 #:use-module (guix build-system cmake)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system go)
65 #:use-module (guix build-system perl)
66 #:use-module (guix build-system python)
67 #:use-module (guix build-system pyproject)
68 #:use-module (guix download)
69 #:use-module (guix gexp)
70 #:use-module (guix git-download)
71 #:use-module (guix packages)
72 #:use-module (guix utils)
73 #:use-module (gnu packages)
74 #:use-module (gnu packages autotools)
75 #:use-module (gnu packages base)
76 #:use-module (gnu packages check)
77 #:use-module (gnu packages certs)
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages gcc)
80 #:use-module (gnu packages gettext)
81 #:use-module (gnu packages golang)
82 #:use-module (gnu packages golang-build)
83 #:use-module (gnu packages golang-check)
84 #:use-module (gnu packages golang-compression)
85 #:use-module (gnu packages golang-crypto)
86 #:use-module (gnu packages golang-maths)
87 #:use-module (gnu packages golang-web)
88 #:use-module (gnu packages golang-xyz)
89 #:use-module (gnu packages java)
90 #:use-module (gnu packages julia)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages pcre)
94 #:use-module (gnu packages perl)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages python)
97 #:use-module (gnu packages python-build)
98 #:use-module (gnu packages python-check)
99 #:use-module (gnu packages python-web)
100 #:use-module (gnu packages python-xyz)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages ruby)
103 #:use-module (gnu packages serialization)
104 #:use-module (gnu packages slang)
105 #:use-module (gnu packages sphinx)
106 #:use-module (gnu packages version-control)
107 #:use-module (gnu packages web)
108 #:use-module (gnu packages xml)
109 #:use-module (gnu packages xorg)
110 #:use-module (srfi srfi-1))
111
112(define-public dos2unix
113 (package
114 (name "dos2unix")
115 (version "7.5.2")
116 (source
117 (origin
118 (method url-fetch)
119 (uri (string-append "https://waterlan.home.xs4all.nl/dos2unix/"
120 "dos2unix-" version ".tar.gz"))
121 (sha256
122 (base32 "0fmzqhwq5y14gv5p4kin5flv6g1hvbv0mhlniys2wi08cr244ir6"))))
123 (build-system gnu-build-system)
124 (arguments
125 (list #:make-flags
126 #~(list (string-append "CC=" #$(cc-for-target))
127 (string-append "prefix=" #$output))
128 #:phases
129 #~(modify-phases %standard-phases
130 (delete 'configure)))) ; no configure script
131 (native-inputs
132 (list gettext-minimal perl))
133 (home-page "https://waterlan.home.xs4all.nl/dos2unix.html")
134 (synopsis "DOS/Mac to Unix and vice versa text file format converter")
135 (description
136 "dos2unix is a tool to convert line breaks in a text file from Unix format
137to DOS format and vice versa.")
138 (license license:bsd-2)))
139
140(define-public recode
141 (package
142 (name "recode")
143 (version "3.7.6")
144 (source
145 (origin
146 (method url-fetch)
147 (uri (string-append "https://github.com/rrthomas/recode/releases/"
148 "download/v" version "/recode-" version ".tar.gz"))
149 (sha256
150 (base32 "0m59sd1ca0zw1aydpc3m8sw03nc885knmccqryg7byzmqs585ia6"))))
151 (build-system gnu-build-system)
152 (native-inputs
153 (list python python-cython))
154 (home-page "https://github.com/rrthomas/recode")
155 (synopsis "Text encoding converter")
156 (description "The Recode library converts files between character sets and
157usages. It recognises or produces over 200 different character sets (or about
158300 if combined with an iconv library) and transliterates files between almost
159any pair. When exact transliteration are not possible, it gets rid of
160offending characters or falls back on approximations. The recode program is a
161handy front-end to the library.")
162 (license license:gpl3+)))
163
164(define-public enca
165 (package
166 (name "enca")
167 (version "1.19")
168 (source
169 (origin
170 (method git-fetch)
171 (uri (git-reference
172 (url "https://github.com/nijel/enca")
173 (commit version)))
174 (file-name (git-file-name name version))
175 (sha256
176 (base32 "19q7cwwxmmk5j9438bsqdpjvdjawsd3zmw1zyqgi7s4m0rasr3ah"))))
177 (build-system gnu-build-system)
178 ;; enca-1.19 tests fail with recent recode.
179 ;(inputs `(("recode" ,recode)))
180 (home-page "https://github.com/nijel/enca")
181 (synopsis "Text encoding detection tool")
182 (description "Enca (Extremely Naive Charset Analyser) consists of libenca,
183an encoding detection library, and enca, a command line frontend, integrating
184libenca and several charset conversion libraries and tools.")
185 (license license:gpl2)))
186
187;; Newer utf8proc depends on julia for tests. Since julia also depends on
188;; utf8proc, a dependency cycle is created. This bootstrap variant of utf8proc
189;; disables tests.
190(define-public utf8proc-bootstrap
191 (hidden-package
192 (package
193 (name "utf8proc-bootstrap")
194 (version "2.10.0")
195 (source
196 (origin
197 (method git-fetch)
198 (uri (git-reference
199 (url "https://github.com/JuliaStrings/utf8proc")
200 (commit (string-append "v" version))))
201 (file-name (git-file-name name version))
202 (sha256
203 (base32 "1n1k67x39sk8xnza4w1xkbgbvgb1g7w2a7j2qrqzqaw1lyilqsy2"))))
204 (build-system gnu-build-system)
205 (arguments
206 (list #:tests? #f ;To break dependency cycle.
207 #:make-flags
208 #~(list (string-append "CC=" #$(cc-for-target))
209 (string-append "prefix=" #$output))
210 #:phases
211 #~(modify-phases %standard-phases
212 ;; No configure script.
213 (delete 'configure))))
214 (home-page "https://juliastrings.github.io/utf8proc/")
215 (synopsis "C library for processing UTF-8 Unicode data")
216 (description
217 "@code{utf8proc} is a small C library that provides Unicode normalization,
218case-folding, and other operations for data in the UTF-8 encoding.")
219 (license license:expat))))
220
221(define-public utf8proc
222 (package
223 (inherit utf8proc-bootstrap)
224 (name "utf8proc")
225 (native-inputs
226 (let ((UNICODE_VERSION "16.0.0")) ; defined in data/Makefile
227 ;; Only if the tests will be run should these be added.
228 (if (and (%current-system)
229 (supported-package? julia))
230 ;; Test data that is otherwise downloaded with curl.
231 (list (origin
232 (method url-fetch)
233 (uri (string-append
234 "https://www.unicode.org/Public/"
235 UNICODE_VERSION "/ucd/NormalizationTest.txt"))
236 (sha256
237 (base32
238 "1cffwlxgn6sawxb627xqaw3shnnfxq0v7cbgsld5w1z7aca9f4fq")))
239 (origin
240 (method url-fetch)
241 (uri (string-append
242 "https://www.unicode.org/Public/"
243 UNICODE_VERSION "/ucd/auxiliary/GraphemeBreakTest.txt"))
244 (sha256
245 (base32
246 "1d9w6vdfxakjpp38qjvhgvbl2qx0zv5655ph54dhdb3hs9a96azf")))
247 (origin
248 (method url-fetch)
249 (uri (string-append
250 "https://www.unicode.org/Public/"
251 UNICODE_VERSION "/ucd/DerivedCoreProperties.txt"))
252 (sha256
253 (base32
254 "1gfsq4vdmzi803i2s8ih7mm4fgs907kvkg88kvv9fi4my9hm3lrr")))
255 ;; For tests.
256 julia
257 perl
258 ;; TODO Move to ruby@3 on the next rebuild cycle.
259 ruby-2.7)
260 '())))
261 (arguments
262 (if (this-package-native-input "julia")
263 (strip-keyword-arguments
264 '(#:tests?)
265 (substitute-keyword-arguments (package-arguments utf8proc-bootstrap)
266 ((#:phases phases '%standard-phases)
267 #~(modify-phases #$phases
268 (add-before 'check 'check-data
269 (lambda* (#:key inputs native-inputs #:allow-other-keys)
270 (for-each (lambda (i)
271 (copy-file (assoc-ref (or native-inputs inputs) i)
272 (string-append "data/" i)))
273 '("NormalizationTest.txt" "GraphemeBreakTest.txt"
274 "DerivedCoreProperties.txt"))))))))
275 (substitute-keyword-arguments (package-arguments utf8proc-bootstrap)
276 ((#:tests? _ #t) #f))))
277 (properties
278 (alist-delete 'hidden? (package-properties utf8proc-bootstrap)))))
279
280(define-public libconfuse
281 (package
282 (name "libconfuse")
283 (version "3.3")
284 (source
285 (origin
286 (method url-fetch)
287 (uri (string-append "https://github.com/martinh/libconfuse/"
288 "releases/download/v" version
289 "/confuse-" version ".tar.xz"))
290 (sha256
291 (base32 "043hqqykpprgrkw9s2hbdlxr308a7yxwsgxj4m8aadg1401hmm8x"))
292 (patches
293 (search-patches "libconfuse-CVE-2022-40320.patch"))))
294 (build-system gnu-build-system)
295 (arguments
296 '(#:configure-flags '("--disable-static")))
297 (home-page "https://github.com/martinh/libconfuse")
298 (synopsis "Configuration file parser library")
299 (description "libconfuse is a configuration file parser library. It
300supports sections and (lists of) values (strings, integers, floats, booleans
301or other sections), as well as some other features (such as
302single/double-quoted strings, environment variable expansion, functions and
303nested include statements).")
304 (license license:isc)))
305
306(define-public libgtextutils
307 (package
308 (name "libgtextutils")
309 (version "0.7")
310 (source
311 (origin
312 (method url-fetch)
313 (uri (string-append
314 "https://github.com/agordon/libgtextutils/releases/download/"
315 version "/libgtextutils-" version ".tar.gz"))
316 (sha256
317 (base32 "0jiybkb2z58wa2msvllnphr4js2hvjvh988pavb3mzkgr6ihwbkr"))))
318 (build-system gnu-build-system)
319 (arguments
320 `(#:phases
321 (modify-phases %standard-phases
322 (replace 'bootstrap
323 (lambda _ (invoke "sh" "reconf")))
324 (add-after 'set-paths 'hide-default-gcc
325 (lambda* (#:key inputs #:allow-other-keys)
326 (let ((gcc (assoc-ref inputs "gcc")))
327 ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
328 ;; conflicts with the GCC 5 input.
329 (setenv "CPLUS_INCLUDE_PATH"
330 (string-join
331 (delete (string-append gcc "/include/c++")
332 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
333 ":"))
334 #t))))))
335 (native-inputs
336 `(("autoconf" ,autoconf)
337 ("automake" ,automake)
338 ("gcc@5" ,gcc-5) ; doesn't build with later versions
339 ("libtool" ,libtool)))
340 (home-page "https://github.com/agordon/libgtextutils")
341 (synopsis "Gordon's text utils library")
342 (description
343 "libgtextutils is a text utilities library used by the fastx toolkit from
344the Hannon Lab.")
345 (license license:agpl3+)))
346
347(define-public libxo
348 (package
349 (name "libxo")
350 (version "1.7.5")
351 (source
352 (origin
353 (method git-fetch)
354 (uri (git-reference
355 (url "https://github.com/Juniper/libxo")
356 (commit version)))
357 (file-name (git-file-name name version))
358 (sha256
359 (base32 "115jv067msym0lsxkiz95ddvspd6smvww37248xkqyin0rxb2m0j"))
360 (snippet
361 '(for-each
362 delete-file
363 '("xohtml/external/jquery.js"
364 "xohtml/external/jquery.qtip.css"
365 "xohtml/external/jquery.qtip.js")))))
366 (build-system gnu-build-system)
367 (arguments
368 (list
369 #:modules '((guix build gnu-build-system)
370 (guix build minify-build-system)
371 (guix build utils)
372 (ice-9 match))
373 #:imported-modules
374 `(,@%default-gnu-imported-modules
375 (guix build minify-build-system))
376 #:phases
377 '(modify-phases (@ (guix build gnu-build-system) %standard-phases)
378 (add-after 'unpack 'process-javascript
379 (lambda* (#:key inputs #:allow-other-keys)
380 (with-directory-excursion "xohtml/external"
381 (for-each (match-lambda
382 ((source . target)
383 (minify source #:target target)))
384 `((,(assoc-ref inputs "js-jquery")
385 . "jquery.js")
386 (,(assoc-ref inputs "js-qtip2")
387 . "jquery.qtip.js")
388 (,(assoc-ref inputs "js-qtip2.css")
389 . "jquery.qtip.css")))))))))
390 (inputs
391 `(("perl", perl)
392 ("js-jquery"
393 ,(origin
394 (method url-fetch)
395 (uri "https://code.jquery.com/jquery-1.7.0.js")
396 (sha256
397 (base32
398 "1qz3jmzg5ac6nkgivzyjgd7rr3vvkwzqv525s080mx10hvn8a63w"))))
399 ("js-qtip2"
400 ,(origin
401 (method url-fetch)
402 (uri "https://cdnjs.cloudflare.com/ajax/libs/qtip2/2.1.1/jquery.qtip.js")
403 (sha256
404 (base32
405 "05aq2x5hd8jnpnhkn41ivsbdg3rqmk093bb2vqzswbihvsizyx64"))))
406 ("js-qtip2.css"
407 ,(origin
408 (method url-fetch)
409 (uri "https://cdnjs.cloudflare.com/ajax/libs/qtip2/2.1.1/jquery.qtip.css")
410 (sha256
411 (base32
412 "18h10klb84jqpasvjymlaskj0442wcain434iwydikpdxmrr7g0n"))))))
413 (native-inputs
414 `(("autoconf" ,autoconf)
415 ("automake" ,automake)
416 ("esbuild" ,esbuild)
417 ("libtool" ,libtool)))
418 (home-page "https://juniper.github.io/libxo/libxo-manual.html")
419 (synopsis "Library for Generating Text, XML, JSON, and HTML Output")
420 (description
421 "This package implements the functionality to generate text, XML,
422JSON, and HTML output using a common set of function calls. The caller
423decides at run time which output style should be produced. Afterwards, the caller
424calls the function @code{xo_emit} to produce output in a format described using
425a format string.")
426 ;; license:expat: jquery and qtip2.
427 (license (list license:bsd-2 license:expat))))
428
429(define-public cityhash
430 (let ((commit "8af9b8c"))
431 (package
432 (name "cityhash")
433 (version (string-append "1.1-2." commit))
434 (source (origin
435 (method git-fetch)
436 (uri (git-reference
437 (url "https://github.com/google/cityhash")
438 (commit commit)))
439 (file-name (string-append name "-" version ".tar.gz"))
440 (sha256
441 (base32
442 "0n6skf5dv8yfl1ckax8dqhvsbslkwc9158zf2ims0xqdvzsahbi6"))))
443 (build-system gnu-build-system)
444 (arguments
445 '(#:make-flags (list "CXXFLAGS=-g -O3")
446 #:phases
447 (modify-phases %standard-phases
448 ;; citycrc is not installed by default but is used by some
449 ;; programs.
450 (add-after 'install 'install-citycrc
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let* ((out (assoc-ref outputs "out"))
453 (include (string-append out "/include")))
454 (install-file "src/citycrc.h" include))
455 #t)))))
456 (home-page "https://github.com/google/cityhash")
457 (synopsis "C++ hash functions for strings")
458 (description
459 "CityHash provides hash functions for strings. The functions mix the
460input bits thoroughly but are not suitable for cryptography.")
461 (license license:expat))))
462
463(define-public ustr
464 (package
465 (name "ustr")
466 (version "1.0.4")
467 (source (origin
468 (method url-fetch)
469 (uri (string-append "http://www.and.org/ustr/" version
470 "/ustr-" version ".tar.bz2"))
471 (sha256
472 (base32
473 "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx"))
474 (patches (search-patches "ustr-fix-build-with-gcc-5.patch"))))
475 (build-system gnu-build-system)
476 (arguments
477 `(#:make-flags
478 (list (string-append "CC=" ,(cc-for-target))
479 "HIDE="
480 ;; Override "/sbin/ldconfig" with "echo" because we don't need
481 ;; "ldconfig".
482 "LDCONFIG=echo"
483 (string-append "prefix=" (assoc-ref %outputs "out"))
484 "all-shared")
485 #:phases
486 (modify-phases %standard-phases
487 (add-after 'unpack 'fix-cross-compilation
488 ;; The Makefile contains more insults than cross-compilation support.
489 ;; It poorly reinvents autotools by compiling C programmes with $CC,
490 ;; then tries to run them during the build. Hard-code the results.
491 (lambda _
492 (substitute* "Makefile"
493 (("\\./autoconf_64b")
494 ,(if (target-64bit? (or (%current-target-system)
495 (%current-system)))
496 "echo 1"
497 "echo 0"))
498 (("\\./autoconf_vsnprintf") "echo 0"))))
499 (add-after 'unpack 'omit-static-libraries
500 ;; These are needed to build & test ustr, but don't install them.
501 (lambda _
502 (substitute* "Makefile"
503 ((".*install.*LIB_STATIC.*") ""))))
504 (add-after 'unpack 'disable-check-for-stdint
505 (lambda _
506 ;; Of course we have stdint.h, just not in /usr/include
507 (substitute* '("Makefile"
508 "ustr-import.in")
509 (("-f \"/usr/include/stdint.h\"") "-z \"\""))
510 #t))
511 ;; No configure script
512 (delete 'configure))))
513 (home-page "http://www.and.org/ustr/")
514 (synopsis "String library with very low memory overhead")
515 (description
516 "Ustr is a string library for C with very low memory overhead.")
517 ;; Quoted from the home page: "The License for the code is MIT, new-BSD,
518 ;; LGPL, etc. ... if you need another license to help compatibility, just
519 ;; ask for it. It's basically public domain, without all the legal
520 ;; problems for everyone that trying to make something public domain
521 ;; entails."
522 (license license:public-domain)))
523
524(define-public ascii2binary
525 (package
526 (name "ascii2binary")
527 (version "2.14")
528 (source
529 (origin
530 (method url-fetch)
531 (uri (string-append "http://billposer.org/Software/Downloads/"
532 "ascii2binary-" version ".tar.bz2"))
533 (sha256
534 (base32 "0dc9fxcdmppbs9s06jvq61zbk552laxps0xyk098gj41697ihd96"))))
535 (build-system gnu-build-system)
536 (native-inputs
537 (list gettext-minimal autoconf automake))
538 (arguments (list #:phases
539 #~(modify-phases %standard-phases
540 ;; AC_FUNC_MALLOC and AC_FUNC_REALLOC usually unneeded
541 ;; see https://lists.gnu.org/archive/html/autoconf/2003-02/msg00017.html
542 (add-after 'unpack 'fix-rpl_malloc
543 (lambda _
544 (substitute* "configure.ac"
545 (("AC_FUNC_MALLOC") "")
546 (("AC_FUNC_REALLOC") ""))
547 ;; let bootstrap phase run.
548 (delete-file "./configure"))))))
549 (home-page "https://billposer.org/Software/a2b.html")
550 (synopsis "Convert between ASCII, hexadecimal and binary representations")
551 (description "The two programs are useful for generating test data, for
552inspecting binary files, and for interfacing programs that generate textual
553output to programs that require binary input and conversely. They can also be
554useful when it is desired to reformat numbers.
555
556@itemize
557
558@item @command{ascii2binary} reads input consisting of ascii or hexadecimal
559 representation numbers separated by whitespace and produces as output
560 the binary equivalents. The type and precision of the binary output
561 is selected using command line flags.
562
563@item @command{binary2ascii} reads input consisting of binary numbers
564 and converts them to their ascii or hexadecimal representation.
565 Command line flags specify the type and size of the binary numbers
566 and provide control over the format of the output.
567 Unsigned integers may be written out in binary, octal, decimal,
568 or hexadecimal.
569
570 Signed integers may be written out only in binary or decimal. Floating
571 point numbers may be written out only decimal, either in standard or
572 scientific notation. (If you want to examine the binary representation
573 of floating point numbers, just treat the input as a sequence of unsigned
574 characters.)
575
576@end itemize")
577 (license license:gpl3)))
578
579(define-public uniutils
580 (package
581 (name "uniutils")
582 (version "2.28")
583 (source
584 (origin
585 (method url-fetch)
586 (uri (string-append "https://billposer.org/Software/Downloads/"
587 "uniutils-" version ".tar.bz2"))
588 (sha256
589 (base32 "0z4ibnd2zzya489vl84cfh82bmdwdhf0isf1myqwrs3s9s0vqyyn"))))
590 (build-system gnu-build-system)
591 (arguments
592 (list #:configure-flags
593 #~(list "--disable-dependency-tracking"
594 "CFLAGS=-g -O2 -Wno-error=implicit-int")
595 #:phases
596 #~(modify-phases %standard-phases
597 (add-before 'build 'gcc14
598 (lambda _
599 (substitute* "uniname.c"
600 (("#include <unistd.h>" all)
601 (string-append all "\n#include <ctype.h>")))
602 (substitute* "unifuzz.c"
603 (("#include <unistd.h>" all)
604 (string-append all "\n#include <time.h>"))
605 (("^Emit") "void Emit"))
606 (substitute* "putu8.c"
607 (("void" all)
608 (string-append "#include <stdio.h>\n" all)))))
609 (add-after 'build 'fix-paths
610 (lambda* (#:key outputs inputs #:allow-other-keys)
611 (let ((out (assoc-ref outputs "out"))
612 (a2b (assoc-ref inputs "ascii2binary"))
613 (iconv (assoc-ref inputs "libiconv")))
614 (substitute* "utf8lookup"
615 (("^ascii2binary ") (string-append a2b "/bin/ascii2binary "))
616 (("^uniname ") (string-append out "/bin/uniname "))
617 (("^iconv ") (string-append iconv "/bin/iconv ")))))))))
618 (inputs
619 (list ascii2binary libiconv))
620 (home-page "https://billposer.org/Software/unidesc.html")
621 (synopsis "Find out what is in a Unicode file")
622 (description "Useful tools when working with Unicode files when one
623doesn't know the writing system, doesn't have the necessary font, needs to
624inspect invisible characters, needs to find out whether characters have been
625combined or in what order they occur, or needs statistics on which characters
626occur.
627
628@itemize
629
630@item @command{uniname} defaults to printing the character offset of each
631character, its byte offset, its hex code value, its encoding, the glyph
632itself, and its name. It may also be used to validate UTF-8 input.
633
634@item @command{unidesc} reports the character ranges to which different
635portions of the text belong. It can also be used to identify Unicode encodings
636(e.g. UTF-16be) flagged by magic numbers.
637
638@item @command{unihist} generates a histogram of the characters in its input.
639
640@item @command{ExplicateUTF8} is intended for debugging or for learning about
641Unicode. It determines and explains the validity of a sequence of bytes as a
642UTF8 encoding.
643
644@item @command{utf8lookup} provides a handy way to look up Unicode characters
645from the command line.
646
647@item @command{unireverse} reverse each line of UTF-8 input
648character-by-character.
649
650@item @command{unifuzz} generates test input for programs that expect Unicode.
651It can generate a random string of characters, tokens of various potentially
652problematic characters and sequences, very long lines, strings with embedded
653nulls, and ill-formed UTF-8.
654
655@item @command{unisurrogate} takes a codepoint on the command line and, if it
656falls outside the BMP, reports its surrogate decomposition.
657
658@end itemize")
659 (license license:gpl3)))
660
661(define-public libconfig
662 (package
663 (name "libconfig")
664 (version "1.7.3")
665 (home-page "https://hyperrealm.github.io/libconfig/")
666 (source (origin
667 (method url-fetch)
668 (uri (string-append home-page "/dist/libconfig-"
669 version ".tar.gz"))
670 (sha256
671 (base32
672 "1rqynfxl1zxwk4b42sniz9xlw285aidcrsfih51p8dy0rbb6clal"))))
673 (build-system gnu-build-system)
674 (arguments
675 (list
676 #:phases
677 #~(modify-phases %standard-phases
678 (add-after 'unpack 'update-config-scripts
679 (lambda* (#:key native-inputs inputs #:allow-other-keys)
680 (for-each (lambda (file)
681 (install-file
682 (search-input-file
683 (or native-inputs inputs)
684 (string-append "/bin/" file)) "aux-build"))
685 '("config.guess" "config.sub")))))))
686 (native-inputs
687 (list config))
688 (synopsis "C/C++ configuration file library")
689 (description
690 "Libconfig is a simple library for manipulating structured configuration
691files. This file format is more compact and more readable than XML. And
692unlike XML, it is type-aware, so it is not necessary to do string parsing in
693application code.")
694 (license license:lgpl2.1+)))
695
696(define-public pfff
697 (package
698 (name "pfff")
699 (version "1.0")
700 (source (origin
701 (method git-fetch)
702 (uri (git-reference
703 (url "https://github.com/pfff/pfff")
704 (commit (string-append "v" version))))
705 (file-name (git-file-name name version))
706 (sha256
707 (base32
708 "1nxkfm7zliq3rmr7yp871sppwfnz71iz364m2sgazny71pzykggc"))))
709 (build-system cmake-build-system)
710 (home-page "https://biit.cs.ut.ee/pfff/")
711 (synopsis "Probabilistic fast file fingerprinting tool")
712 (description
713 "pfff is a tool for calculating a compact digital fingerprint of a file
714by sampling randomly from the file instead of reading it in full.
715Consequently, the computation has a flat performance characteristic,
716correlated with data variation rather than file size. pfff can be as reliable
717as existing hashing techniques, with provably negligible risk of collisions.")
718 (license license:bsd-3)))
719
720(define-public oniguruma
721 (package
722 (name "oniguruma")
723 (version "6.9.10")
724 (source (origin
725 (method url-fetch)
726 (uri (string-append "https://github.com/kkos/"
727 "oniguruma/releases/download/v"
728 ;; If there is a "-" in the version, convert
729 ;; to underscore for this part of the URI.
730 (string-map (lambda (c) (if (char=? #\- c) #\_ c))
731 version)
732 "/onig-" version ".tar.gz"))
733 (sha256
734 (base32
735 "01gwd7bkhwl2rdqbfq109vlzznic2pygz3dnhrzykr2rw9dgqp1a"))))
736 (build-system gnu-build-system)
737 (arguments '(#:configure-flags '("--disable-static")))
738 (home-page "https://github.com/kkos/oniguruma")
739 (synopsis "Regular expression library")
740 (description "Oniguruma is a regular expressions library. The special
741characteristic of this library is that different character encoding for every
742regular expression object can be specified.")
743 (license license:bsd-2)))
744
745(define-public antiword
746 (package
747 (name "antiword")
748 (version "0.37")
749 (source (origin
750 (method url-fetch)
751 ;; Development stopped in 2005; as of 2023 the home page 404s.
752 (uri (string-append "https://web.archive.org/web/20200621222738/"
753 "http://www.winfield.demon.nl/linux"
754 "/antiword-" version ".tar.gz"))
755 (sha256
756 (base32
757 "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f"))
758 (patches (search-patches "antiword-CVE-2014-8123.patch"))))
759 (build-system gnu-build-system)
760 (arguments
761 `(#:tests? #f ; There are no tests
762 #:make-flags
763 (list "-f" "Makefile.Linux"
764 (string-append "GLOBAL_INSTALL_DIR="
765 (assoc-ref %outputs "out") "/bin")
766 (string-append "GLOBAL_RESOURCES_DIR="
767 (assoc-ref %outputs "out") "/share/antiword"))
768 #:phases
769 (modify-phases %standard-phases
770 (replace 'configure
771 (lambda* (#:key outputs #:allow-other-keys)
772 ;; Ensure that mapping files can be found in the actual package
773 ;; data directory.
774 (substitute* "antiword.h"
775 (("/usr/share/antiword")
776 (string-append (assoc-ref outputs "out") "/share/antiword")))
777 #t))
778 (replace 'install
779 (lambda* (#:key make-flags #:allow-other-keys)
780 (apply invoke "make" `("global_install" ,@make-flags)))))))
781 (home-page (string-append "https://web.archive.org/web/20220121050627/"
782 "http://www.winfield.demon.nl"))
783 (synopsis "Microsoft Word document reader")
784 (description "Antiword is an application for displaying Microsoft Word
785documents. It can also convert the document to PostScript or XML. Only
786documents made by MS Word version 2 and version 6 or later are supported. The
787name comes from: \"The antidote against people who send Microsoft Word files
788to everybody, because they believe that everybody runs Windows and therefore
789runs Word\".")
790 (license license:gpl2+)))
791
792(define-public catdoc
793 (package
794 (name "catdoc")
795 (version "0.95")
796 (source (origin
797 (method url-fetch)
798 (uri (string-append "http://ftp.wagner.pp.ru/pub/catdoc/"
799 "catdoc-" version ".tar.gz"))
800 (patches (search-patches "catdoc-CVE-2017-11110.patch"))
801 (sha256
802 (base32
803 "15h7v3bmwfk4z8r78xs5ih6vd0pskn0rj90xghvbzdjj0cc88jji"))))
804 (build-system gnu-build-system)
805 ;; TODO: Also build `wordview` which requires `tk` – make a separate
806 ;; package for this.
807 (arguments
808 '(#:tests? #f ; There are no tests
809 #:configure-flags '("--disable-wordview")
810 #:phases
811 (modify-phases %standard-phases
812 (add-before 'install 'fix-install
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let ((out (assoc-ref outputs "out")))
815 (mkdir-p (string-append out "/share/man/man1"))))))))
816 (home-page "https://www.wagner.pp.ru/~vitus/software/catdoc/")
817 (synopsis "MS-Word to TeX or plain text converter")
818 (description "@command{catdoc} extracts text from MS-Word files, trying to
819preserve as many special printable characters as possible. It supports
820everything up to Word-97. Also supported are MS Write documents and RTF
821files.
822
823@command{catdoc} does not preserve complex word formatting, but it can
824translate some non-ASCII characters into TeX escape codes. It's goal is to
825extract plain text and allow you to read it and, probably, reformat with TeX,
826according to TeXnical rules.
827
828This package also provides @command{xls2csv}, which extracts data from Excel
829spreadsheets and outputs it in comma-separated-value format, and
830@command{catppt}, which extracts data from PowerPoint presentations.")
831 (license license:gpl2+)))
832
833(define-public utfcpp
834 (package
835 (name "utfcpp")
836 (version "3.2.5")
837 (source (origin
838 (method git-fetch)
839 (uri (git-reference
840 (url "https://github.com/nemtrif/utfcpp")
841 (commit (string-append "v" version))))
842 (file-name (git-file-name name version))
843 (modules '((guix build utils)))
844 ;; Unbundle ftest
845 (snippet
846 '(begin
847 (delete-file-recursively "extern")
848 (substitute* (find-files "tests" "\\.cpp")
849 (("\"../extern/ftest/ftest.h\"")
850 "<ftest/ftest.h>"))))
851 (sha256
852 (base32
853 "195n47dblx765xas54vkgyin3xsvfnvcdc614njzqmcxybfpvix2"))))
854 (build-system cmake-build-system)
855 (native-inputs (list ftest))
856 (home-page "https://github.com/nemtrif/utfcpp")
857 (synopsis "Portable C++ library for handling UTF-8")
858 (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
859in a portable way.")
860 (license license:boost1.0)))
861
862(define-public utfcpp-2
863 (package
864 (inherit utfcpp)
865 (name (package-name utfcpp))
866 (version "2.3.5")
867 (source (origin
868 (method git-fetch)
869 (uri (git-reference
870 (url "https://github.com/nemtrif/utfcpp")
871 (commit (string-append "v" version))))
872 (file-name (git-file-name name version))
873 (sha256
874 (base32
875 "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
876 (build-system cmake-build-system)
877 (arguments
878 `(#:out-of-source? #f
879 #:phases
880 (modify-phases %standard-phases
881 (replace 'install ; no install target
882 (lambda* (#:key outputs #:allow-other-keys)
883 (let* ((out (assoc-ref outputs "out"))
884 (include (string-append out "/include"))
885 (doc (string-append out "/share/doc/" ,name)))
886 (copy-recursively "source" include)
887 (install-file "README.md" doc)))))))
888 (native-inputs '())))
889
890
891(define-public dbacl
892 (package
893 (name "dbacl")
894 (version "1.14.1")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (string-append "mirror://sourceforge/dbacl/dbacl/" version "/"
899 "dbacl-" version ".tar.gz"))
900 (sha256
901 (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
902 (patches (search-patches "dbacl-include-locale.h.patch"
903 "dbacl-icheck-multiple-definitions.patch"))))
904 (build-system gnu-build-system)
905 (arguments
906 `(#:make-flags
907 (list
908 (string-append "-I" (assoc-ref %build-inputs "slang")
909 "/include/slang")
910 (string-append "-I" (assoc-ref %build-inputs "ncurses")
911 "/include/ncurses"))
912 #:phases
913 (modify-phases %standard-phases
914 (add-after 'unpack 'delete-sample6-and-japanese
915 (lambda _
916 (substitute* "doc/Makefile.am"
917 (("sample6.txt") "")
918 (("japanese.txt") ""))
919 (delete-file "doc/sample6.txt")
920 (delete-file "doc/japanese.txt")
921 (substitute* (list "src/tests/Makefile.am"
922 "src/tests/Makefile.in")
923 (("dbacl-jap.shin") "")
924 (("dbacl-jap.sh") ""))
925 #t))
926 (add-after 'unpack 'delete-test
927 ;; See comments about the license.
928 (lambda _
929 (delete-file "src/tests/dbacl-jap.shin")
930 #t))
931 (add-after 'unpack 'fix-test-files
932 (lambda* (#:key inputs outputs #:allow-other-keys)
933 (let* ((out (assoc-ref outputs "out"))
934 (bin (string-append out "/bin")))
935 (substitute* (find-files "src/tests/" "\\.shin$")
936 (("PATH=/bin:/usr/bin")
937 "#PATH=/bin:/usr/bin")
938 (("diff") (string-append (which "diff")))
939 (("tr") (string-append (which "tr"))))
940 #t)))
941 (replace 'bootstrap
942 (lambda _
943 (invoke "autoreconf" "-vif")
944 #t)))))
945 (inputs
946 (list ncurses perl readline slang))
947 (native-inputs
948 (list libtool autoconf automake pkg-config))
949 (home-page "https://www.lbreyer.com/dbacl.html")
950 (synopsis "Bayesian text and email classifier")
951 (description
952 "dbacl is a fast Bayesian text and email classifier. It builds a variety
953of language models using maximum entropy (minimum divergence) principles, and
954these can then be used to categorize input data automatically among multiple
955categories.")
956 ;; The software is licensed as GPLv3 or later, but
957 ;; includes various sample texts in the doc dir:
958 ;; - sample1.txt, sample3 and sampe5.txt are in the public domain,
959 ;; by Mark Twain.
960 ;; - sample2.txt, sample4.txt are in the public domain, by Aristotle.
961 ;; - sample6.txt is a forwarded email, copyright unknown.
962 ;; Guix does exclude sample6.txt.
963 ;; - japanese.txt is a Japanese unofficial translation of the
964 ;; GNU General Public License, (c) by the Free Software Foundation.
965 ;; Guix excludes this file.
966 (license (list license:gpl3+ license:public-domain))))
967
968(define-public dotconf
969 (package
970 (name "dotconf")
971 (version "1.3")
972 (source (origin
973 (method git-fetch)
974 (uri (git-reference
975 (url "https://github.com/williamh/dotconf")
976 (commit (string-append "v" version))))
977 (file-name (git-file-name name version))
978 (sha256
979 (base32
980 "1sc95hw5k2xagpafny0v35filmcn05k1ds5ghkldfpf6xw4hakp7"))))
981 (build-system gnu-build-system)
982 (arguments `(#:tests? #f)) ; FIXME maketest.sh does not work.
983 (native-inputs
984 (list autoconf automake libtool))
985 (home-page "https://github.com/williamh/dotconf")
986 (synopsis "Configuration file parser library")
987 (description
988 "C library for creating and parsing configuration files.")
989 (license (list license:lgpl2.1 ; Main distribution.
990 license:asl1.1)))) ; src/readdir.{c,h}
991
992(define-public drm-tools
993 (package
994 (name "drm-tools")
995 (version "1.1.33")
996 (source (origin
997 (method url-fetch)
998 (uri (string-append "mirror://sourceforge/drmtools/drm_tools-"
999 version ".tar.gz"))
1000 (sha256
1001 (base32
1002 "187zbxw21zcg8gpyc13gxlycfw0n05a6rmqq6im5wr9zk1v1wj80"))))
1003 (build-system cmake-build-system)
1004 (arguments
1005 `(#:tests? #f ;the test suite fails
1006 #:phases (modify-phases %standard-phases
1007 (add-after 'unpack 'set-install-prefixes
1008 (lambda* (#:key outputs #:allow-other-keys)
1009 (let* ((out (assoc-ref outputs "out")))
1010 (substitute* "CMakeLists.txt"
1011 (("tmp/testinstall")
1012 (string-drop out 1))
1013 (("/man/man1")
1014 "/share/man/man1"))
1015 #t)))
1016 (add-after 'unpack 'adjust-test-paths
1017 (lambda _
1018 (substitute* '("test_extract_increment.sh"
1019 "test_extract_features.sh"
1020 "test_extract_features2.sh"
1021 "test_dmath.sh")
1022 (("\\./extract") "extract")
1023 (("\\./dmath") "dmath")
1024 (("/usr/local/bin/") "")
1025 (("/bin/rm") "rm")
1026 (("/bin/cp") "cp"))
1027 #t))
1028 (delete 'check)
1029 ;; The produced binaries are written directly to %output/bin.
1030 (delete 'install)
1031 (add-after 'build 'check
1032 (lambda* (#:key outputs tests? #:allow-other-keys)
1033 (when tests?
1034 (let* ((out (assoc-ref outputs "out"))
1035 (bin (string-append out "/bin")))
1036 (setenv "PATH" (string-append bin ":"
1037 (getenv "PATH")))
1038 (with-directory-excursion
1039 (format #f "../drm_tools-~a" ,version)
1040 (invoke "sh" "test_all.sh")))))))))
1041 (native-inputs (list which)) ;for tests
1042 (inputs (list pcre))
1043 (home-page "https://drmtools.sourceforge.net/")
1044 (synopsis "Utilities to manipulate text and binary files")
1045 (description "The drm_tools package contains the following commands:
1046@table @command
1047@item accudate
1048An extended version of the \"date\" program that has sub-second accuracy.
1049@item binformat
1050Format complex binary data into text.
1051@item binload
1052Load data into a binary file using simple commands from the input.
1053@item binorder
1054Sort, merge, search, retrieve or generate test data consisting of fixed size
1055binary records.
1056@item binreplace
1057Find or find/replace in binary files.
1058@item binsplit
1059Split test data consisting of fixed size binary records into one or more
1060output streams.
1061@item chardiff
1062Find changes between two files at the character level. Unlike \"diff\", it
1063lists just the characters that differ, so if the 40,000th character is
1064different only that one character will be shown, not the entire line.
1065@item columnadd
1066Add columns of integers, decimals, and/or times.
1067@item datasniffer
1068A utility for formatting binary data dumps.
1069@item dmath
1070Double precision interactive command line math calculator.
1071@item extract
1072Extract and emit data from text files based on character or token position.
1073@item execinput
1074A utility that reads from STDIN and executes each line as a command in a
1075sub-process.
1076@item indexed_text
1077A utility for rapid retrieval of text by line numbers, in any order, from a
1078text file.
1079@item mdump
1080Format binary data.
1081@item msgqueue
1082Create message queues and send/receive messages.
1083@item mbin
1084@itemx mbout
1085Multiple buffer in and out. Used for buffering a lot of data between a slow
1086device and a fast device. Mostly for buffering streaming tape drives for use
1087with slower network connections, so that streaming is maintained as much as
1088possible to minimize wear on the tape device.
1089@item pockmark
1090Corrupt data streams - useful for testing error correction and data recovery.
1091@item tarsieve
1092Filter, list, or split a tar file.
1093@end table")
1094 (license license:gpl2+)))
1095
1096(define-public java-rsyntaxtextarea
1097 (package
1098 (name "java-rsyntaxtextarea")
1099 (version "3.4.0")
1100 (source (origin
1101 (method git-fetch)
1102 (uri (git-reference
1103 (url "https://github.com/bobbylight/RSyntaxTextArea")
1104 (commit version)))
1105 (file-name (git-file-name name version))
1106 (sha256
1107 (base32
1108 "0ad3cmfxwz9963kbh5ryba9jp88hsx03jsl8r4qinwhy6aahx6f3"))))
1109 (build-system ant-build-system)
1110 (arguments
1111 (list
1112 #:jar-name "rsyntaxtextarea.jar"
1113 #:source-dir "RSyntaxTextArea/src/main/java"
1114 #:test-dir "RSyntaxTextArea/src/test"
1115 #:tests? #false ;requires junit5
1116 #:phases
1117 '(modify-phases %standard-phases
1118 (add-before 'build 'copy-resources
1119 (lambda _
1120 (copy-recursively "RSyntaxTextArea/src/main/resources" "build/classes")))
1121 #;
1122 (add-before 'check 'start-xorg-server
1123 (lambda _
1124 ;; The test suite requires a running X server.
1125 (system "Xvfb :1 &")
1126 (setenv "DISPLAY" ":1")
1127 ;; Prevent irrelevant errors that cause test output mismatches:
1128 ;; ‘Fontconfig error: No writable cache directories’
1129 (setenv "XDG_CACHE_HOME" (getcwd)))))))
1130 (native-inputs
1131 (list java-hamcrest-core
1132 xorg-server-for-tests))
1133 (home-page "https://bobbylight.github.io/RSyntaxTextArea/")
1134 (synopsis "Syntax highlighting text component for Java Swing")
1135 (description "RSyntaxTextArea is a syntax highlighting, code folding text
1136component for Java Swing. It extends @code{JTextComponent} so it integrates
1137completely with the standard @code{javax.swing.text} package. It is fast and
1138efficient, and can be used in any application that needs to edit or view
1139source code.")
1140 (license license:bsd-3)))
1141
1142(define-public java-autocomplete
1143 (package
1144 (name "java-autocomplete")
1145 (version "3.3.1")
1146 (source (origin
1147 (method git-fetch)
1148 (uri (git-reference
1149 (url "https://github.com/bobbylight/AutoComplete")
1150 (commit version)))
1151 (file-name (git-file-name name version))
1152 (sha256
1153 (base32
1154 "0ksa3k3xkdjpyq9sbsvchyhfzzpb67pv8xzbpljj8rqilgk8ysy0"))))
1155 (build-system ant-build-system)
1156 (arguments
1157 (list
1158 #:tests? #false ;needs junit5
1159 #:jar-name "autocomplete.jar"
1160 #:source-dir "AutoComplete/src/main/java"
1161 #:test-dir "AutoComplete/src/test"
1162 #:phases
1163 '(modify-phases %standard-phases
1164 (add-before 'build 'copy-resources
1165 (lambda _
1166 (copy-recursively "AutoComplete/src/main/resources" "build/classes"))))))
1167 (propagated-inputs
1168 (list java-rsyntaxtextarea))
1169 (native-inputs
1170 (list java-hamcrest-core))
1171 (home-page "https://github.com/bobbylight/AutoComplete")
1172 (synopsis "Text completion library")
1173 (description "AutoComplete is a library allowing you to add IDE-like
1174auto-completion (aka \"code completion\" or \"Intellisense\") to any Swing
1175JTextComponent. Special integration is added for @code{RSyntaxTextArea},
1176since this feature is commonly needed when editing source code. Features
1177include: Drop-down completion choice list. Optional companion \"description\"
1178window, complete with full HTML support and navigable with hyperlinks.
1179Optional parameter completion assistance for functions and methods, ala
1180Eclipse and NetBeans. Completion information is typically specified in an XML
1181file, but can even be dynamic.")
1182 (license license:bsd-3)))
1183
1184(define-public tldr
1185 (package
1186 (name "tldr")
1187 (version "3.4.3")
1188 (source
1189 (origin
1190 (method git-fetch)
1191 (uri (git-reference
1192 (url "https://github.com/tldr-pages/tldr-python-client")
1193 (commit version)))
1194 (file-name (git-file-name name version))
1195 (sha256
1196 (base32 "06rhpywaypqwakw8v187cdf52yl5c7fm19f1q7nbbsydbs0ndmb1"))))
1197 (build-system pyproject-build-system)
1198 (arguments
1199 (list
1200 ;; This test fails. It tries to open a network socket.
1201 #:test-flags #~(list "-k" "not test_error_message")
1202 #:phases
1203 #~(modify-phases %standard-phases
1204 (add-after 'build 'build-doc
1205 (lambda _
1206 (invoke "make" "-C" "docs"))))))
1207 (native-inputs
1208 (list python-hatchling
1209 python-pytest
1210 python-sphinx-argparse))
1211 (inputs
1212 (list python-colorama
1213 python-termcolor
1214 python-shtab))
1215 (home-page "https://github.com/tldr-pages/tldr-python-client")
1216 (synopsis "Command-line client for tldr pages")
1217 (description "This package provides the @code{tldr} command allowing users
1218to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
1219effort to simplify the man pages with practical examples described in
1220@url{https://tldr.sh/}.")
1221 (license license:expat)))
1222
1223(define-public txt2tags
1224 (package
1225 (name "txt2tags")
1226 (version "3.9")
1227 (source
1228 (origin
1229 (method git-fetch)
1230 (uri (git-reference
1231 (url "https://github.com/txt2tags/txt2tags")
1232 (commit version)))
1233 (file-name (git-file-name name version))
1234 (sha256
1235 (base32 "1nfps6c3jchjkbwzh8v919fxql91l1lxa6q1vssprxivk0jcc0rz"))))
1236 (build-system pyproject-build-system)
1237 (arguments
1238 (list #:test-backend #~'custom
1239 #:test-flags #~(list "test/run.py")))
1240 (native-inputs
1241 (list python-setuptools))
1242 (home-page "https://txt2tags.org")
1243 (synopsis "Convert between markup languages")
1244 (description
1245 "txt2tags is a document generator. It reads a text file with minimal
1246markup and converts it to multiple formats.")
1247 (license license:gpl2)))
1248
1249(define-public docx2txt
1250 (package
1251 (name "docx2txt")
1252 (version "1.4")
1253 (source (origin
1254 (method url-fetch)
1255 (uri (string-append
1256 "mirror://sourceforge/docx2txt/docx2txt/v"
1257 version "/docx2txt-" version ".tgz"))
1258 (sha256
1259 (base32
1260 "06vdikjvpj6qdb41d8wzfnyj44jpnknmlgbhbr1w215420lpb5xj"))))
1261 (build-system gnu-build-system)
1262 (inputs
1263 (list unzip perl))
1264 (arguments
1265 `(#:tests? #f ; No tests.
1266 #:make-flags (list (string-append "BINDIR="
1267 (assoc-ref %outputs "out") "/bin")
1268 (string-append "CONFIGDIR="
1269 (assoc-ref %outputs "out") "/etc")
1270 ;; Makefile seems to be a bit dumb at guessing.
1271 (string-append "INSTALL=install")
1272 (string-append "PERL=perl"))
1273 #:phases
1274 (modify-phases %standard-phases
1275 (delete 'configure)
1276 (add-after 'install 'fix-install
1277 (lambda* (#:key outputs inputs #:allow-other-keys)
1278 (let* ((out (assoc-ref outputs "out"))
1279 (bin (string-append out "/bin"))
1280 (config (string-append out "/etc/docx2txt.config"))
1281 (unzip (assoc-ref inputs "unzip")))
1282 ;; According to INSTALL, the .sh wrapper can be skipped.
1283 (delete-file (string-append bin "/docx2txt.sh"))
1284 (rename-file (string-append bin "/docx2txt.pl")
1285 (string-append bin "/docx2txt"))
1286 (substitute* config
1287 (("config_unzip => '/usr/bin/unzip',")
1288 (string-append "config_unzip => '"
1289 unzip
1290 "/bin/unzip',")))
1291 ;; Makefile is wrong.
1292 (chmod config #o644)
1293 #t))))))
1294 (synopsis "Recover text from @file{.docx} files, with good formatting")
1295 (description
1296 "@command{docx2txt} is a Perl based command line utility to convert
1297Microsoft Office @file{.docx} documents to equivalent text documents. Latest
1298version supports following features during text extraction.
1299
1300@itemize
1301@item Character conversions; currency characters are converted to respective
1302names like Euro.
1303@item Capitalisation of text blocks.
1304@item Center and right justification of text fitting in a line of
1305(configurable) 80 columns.
1306@item Horizontal ruler, line breaks, paragraphs separation, tabs.
1307@item Indicating hyperlinked text along with the hyperlink (configurable).
1308@item Handling (bullet, decimal, letter, roman) lists along with (attempt at)
1309indentation.
1310@end itemize\n")
1311 (home-page "https://docx2txt.sourceforge.net")
1312 (license license:gpl3+)))
1313
1314(define-public html2text
1315 ;; Use commit directly to get the fixes to the installation phase
1316 ;; that are not in a release yet.
1317 (let ((commit "05364c1028026a87d6f45130a8e86e1ee67704d2")
1318 (revision "1"))
1319 (package
1320 (name "html2text")
1321 (version (git-version "2.0.1_pre" revision commit))
1322 (source
1323 (origin
1324 (method git-fetch)
1325 (uri (git-reference
1326 (url "https://github.com/grobian/html2text")
1327 (commit (string-append commit))))
1328 (file-name (git-file-name name version))
1329 (sha256
1330 (base32 "0n6pl0nijcn4z3p0dvf3gmvvpjq261pagnk84s9f78c4c55bw5cm"))))
1331 (build-system gnu-build-system)
1332 (arguments
1333 `(#:make-flags
1334 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1335 #:phases
1336 (modify-phases %standard-phases
1337 (replace 'configure
1338 ;; The configure script is not from autotools and does not accept
1339 ;; ‘--style’ options. There is no proper error handling.
1340 (lambda* (#:key outputs #:allow-other-keys)
1341 (invoke "./configure"
1342 (string-append "CXX=" ,(cxx-for-target))))))))
1343 (home-page "https://github.com/grobian/html2text")
1344 (synopsis "HTML to plain text converter")
1345 (description
1346 "@code{html2text} is a command line utility that converts HTML
1347documents into plain text.")
1348 (license (list license:bsd-4 ; cmp_nocase.cpp & sgml.h
1349 license:gpl2+))))) ; everything else
1350
1351(define-public odt2txt
1352 (package
1353 (name "odt2txt")
1354 (version "0.5")
1355 (source
1356 (origin
1357 (method git-fetch)
1358 (uri (git-reference
1359 (url "https://github.com/dstosberg/odt2txt/")
1360 (commit (string-append "v" version))))
1361 (file-name (git-file-name name version))
1362 (sha256
1363 (base32
1364 "0im3kzvhxkjlx57w6h13mc9584c74ma1dyymgvpq2y61av3gc35v"))))
1365 (build-system gnu-build-system)
1366 (arguments
1367 (list #:tests? #f ; no make check
1368 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1369 (string-append "DESTDIR=" #$output))
1370 #:phases
1371 #~(modify-phases %standard-phases
1372 ;; no configure script
1373 (delete 'configure))))
1374 (inputs
1375 (list zlib))
1376 (home-page "https://github.com/dstosberg/odt2txt/")
1377 (synopsis "Converter from OpenDocument Text to plain text")
1378 (description "odt2txt is a command-line tool which extracts the text out
1379of OpenDocument Texts, as produced by OpenOffice.org, KOffice, StarOffice and
1380others.
1381
1382odt2txt can also extract text from some file formats similar to OpenDocument
1383Text, such as OpenOffice.org XML (*.sxw), which was used by OpenOffice.org
1384version 1.x and older StarOffice versions. To a lesser extent, odt2txt may be
1385useful to extract content from OpenDocument spreadsheets (*.ods) and
1386OpenDocument presentations (*.odp).")
1387 (license license:gpl2)))
1388
1389(define-public cobib
1390 (package
1391 (name "cobib")
1392 (version "6.0.1")
1393 (source
1394 (origin
1395 (method git-fetch)
1396 (uri (git-reference
1397 (url "https://gitlab.com/cobib/cobib")
1398 (commit (string-append "v" version))))
1399 (file-name (git-file-name name version))
1400 (sha256
1401 (base32 "0fsbhhkghjs6frbfz1x152ypd32vpkn8na9v54gldfhjk5xfzkmg"))))
1402 (build-system pyproject-build-system)
1403 (arguments
1404 (list
1405 ;; tests: 563 passed, 33 skipped
1406 #:test-flags
1407 #~(list
1408 ;; Most of the tests fail to compare "/tmp" and "~/" paths.
1409 #$@(map (lambda (file) (string-append "--ignore=" "tests/" file))
1410 (list "commands/test_add.py"
1411 "commands/test_lint.py"
1412 "commands/test_man.py"
1413 "commands/test_open.py"
1414 "database/test_entry.py"
1415 "importers/test_bibtex.py"
1416 "ui/shell/test_general.py"
1417 "ui/tui/test_general.py"
1418 "ui/tui/test_list.py"
1419 "ui/tui/test_note.py"
1420 "ui/tui/test_search.py"
1421 "ui/tui/test_select.py"
1422 "utils/test_rel_path.py")))
1423 #:phases
1424 #~(modify-phases %standard-phases
1425 (add-before 'check 'pre-check
1426 (lambda _
1427 (setenv "COBIB_CONFIG" "0")
1428 (setenv "GIT_AUTHOR_EMAIL" "[email protected]")
1429 (setenv "GIT_AUTHOR_NAME" "Your Name")
1430 (setenv "GIT_COMMITTER_EMAIL" "[email protected]")
1431 (setenv "GIT_COMMITTER_NAME" "Your Name")
1432 (setenv "HOME" "/tmp")
1433 (setenv "TERM" "linux")
1434 (setenv "TMPDIR" "/tmp")
1435 (invoke "git" "config" "--global" "user.email" "[email protected]")
1436 (invoke "git" "config" "--global" "user.name" "Your Name")
1437 (invoke "git" "init"))))))
1438 (native-inputs
1439 (list git-minimal/pinned
1440 nss-certs-for-test
1441 python-pytest
1442 python-pytest-asyncio
1443 python-pytest-textual-snapshot
1444 python-setuptools))
1445 (inputs
1446 (list python-beautifulsoup4
1447 python-bibtexparser-for-cobib
1448 python-lxml
1449 python-mdit-py-plugins ;XXX: for sanity-check
1450 python-natsort
1451 python-pylatexenc
1452 python-requests
1453 python-rich
1454 python-ruamel.yaml
1455 python-text-unidecode
1456 python-textual
1457 python-typing-extensions))
1458 (home-page "https://gitlab.com/cobib/cobib")
1459 (synopsis "Terminal-based bibliography management tool")
1460 (description
1461 "@command{cobib} is a command-line based bibliography management tool.
1462It uses a plain-text database, a location-independent library, and features
1463git integration, command-line support, and a curses-based TUI.")
1464 (license license:expat)))
1465
1466(define-public bibutils
1467 (package
1468 (name "bibutils")
1469 (version "7.2")
1470 (source (origin
1471 (method url-fetch)
1472 (uri (string-append "mirror://sourceforge/bibutils/"
1473 "bibutils_" version "_src.tgz"))
1474
1475 (sha256
1476 (base32
1477 "1hxmwjjzw48w6hdh2x7ybkrhi1xngd55i67hrrd3wswa3vpql0kf"))))
1478 (build-system gnu-build-system)
1479 (arguments
1480 (list #:configure-flags
1481 #~(list "--install-dir" (string-append #$output "/bin")
1482 "--install-lib" (string-append #$output "/lib")
1483 "--dynamic")
1484 #:make-flags
1485 #~(list (string-append "CC=" #+(cc-for-target))
1486 (string-append "LDFLAGSIN=-Wl,-rpath=" #$output "/lib"))
1487 #:test-target "test"
1488 #:phases
1489 '(modify-phases %standard-phases
1490 (replace 'configure
1491 (lambda* (#:key configure-flags #:allow-other-keys)
1492 ;; configure script is ill-formed, invoke it manually
1493 (apply invoke "sh" "./configure" configure-flags))))))
1494 (home-page "https://bibutils.sourceforge.io/")
1495 (synopsis "Convert between various bibliography formats")
1496 (description "This package provides converters for various bibliography
1497formats (e.g. Bibtex, RIS, etc.) using a common XML intermediate.")
1498 (license license:gpl2)))
1499
1500(define-public goawk
1501 (package
1502 (name "goawk")
1503 (version "1.31.0")
1504 (source
1505 (origin
1506 (method git-fetch)
1507 (uri (git-reference
1508 (url "https://github.com/benhoyt/goawk")
1509 (commit (string-append "v" version))))
1510 (file-name (git-file-name name version))
1511 (sha256
1512 (base32 "14nswcp1abg3g3xxsniwk17s2c6zxrlncizjzj2rl866hdpgmv1f"))))
1513 (build-system go-build-system)
1514 (arguments
1515 (list
1516 #:install-source? #f
1517 #:import-path "github.com/benhoyt/goawk"
1518 #:test-flags
1519 #~(list "-vet=off" ;[email protected] forces vet, but tests are not ready yet.
1520 ;; XXX: The most of the tests passed but some of the group fails
1521 ;; to find additional commands or compare output of test data.
1522 "-skip" "TestCommandLine|TestInterp|TestExecute")
1523 #:phases
1524 #~(modify-phases %standard-phases
1525 (add-before 'check 'pre-check
1526 (lambda* (#:key import-path #:allow-other-keys)
1527 (with-directory-excursion (string-append "src/" import-path)
1528 (substitute* (list "interp/interp.go"
1529 "interp/interp_test.go"
1530 "goawk_test.go")
1531 (("/bin/cat") (which "cat"))
1532 (("/bin/echo") (which "echo"))
1533 (("/bin/sh") (which "sh")))
1534 (substitute* "goawk_test.go"
1535 ;; During tests goawk tries to write to existing files,
1536 ;; point to an empty directory instead.
1537 (("/testdata/output") "/testdata/output-tmp"))
1538 (mkdir "testdata/output-tmp"))))
1539 (add-after 'check 'post-check-remove-output-temp
1540 (lambda* (#:key import-path #:allow-other-keys)
1541 (with-directory-excursion (string-append "src/" import-path)
1542 (delete-file-recursively "testdata/output-tmp")))))))
1543 (home-page "https://github.com/benhoyt/goawk")
1544 (synopsis "AWK interpreter with CSV support")
1545 (description
1546 "GoAWK is a POSIX-compatible version of AWK that also has a CSV mode for
1547reading and writing CSV and TSV files.")
1548 (license license:expat)))
1549
1550(define-public gron
1551 (package
1552 (name "gron")
1553 (version "0.7.1")
1554 (source
1555 (origin
1556 (method git-fetch)
1557 (uri (git-reference
1558 (url "https://github.com/tomnomnom/gron")
1559 (commit (string-append "v" version))))
1560 (file-name (git-file-name name version))
1561 (sha256
1562 (base32 "1sj34b6yv0qigy3aq7qmwf8bqxp1a8qh9p10lzkpw58s1c0iyh36"))))
1563 (build-system go-build-system)
1564 (arguments
1565 (list
1566 #:install-source? #f
1567 #:import-path "github.com/tomnomnom/gron"
1568 #:test-flags #~(list "-vet=off")))
1569 (native-inputs
1570 (list go-github-com-fatih-color
1571 go-github-com-mattn-go-colorable
1572 go-github-com-nwidger-jsoncolor
1573 go-github-com-pkg-errors))
1574 (home-page "https://github.com/tomnomnom/gron")
1575 (synopsis "Transform JSON to make it easier to grep")
1576 (description
1577 "This package transforms JSON into discrete assignments to make it easier
1578to use line-based tools such as grep to search for what you want and see the
1579absolute \"path\" to it.")
1580 (license license:expat)))
1581
1582(define-public opencc
1583 (package
1584 (name "opencc")
1585 (version "1.1.1")
1586 (source
1587 (origin
1588 (method git-fetch)
1589 (uri (git-reference
1590 (url "https://github.com/BYVoid/OpenCC")
1591 (commit (string-append "ver." version))))
1592 (file-name (git-file-name name version))
1593 (sha256
1594 (base32
1595 "07y0pvxjlmpcnym229j87qcfwnfm7vi10dad0a20xy6as55a9j3d"))
1596 (modules '((guix build utils)))
1597 (snippet
1598 '(begin
1599 ;; TODO: Unbundle tclap, darts-clone, gtest
1600 (delete-file-recursively "deps/rapidjson-1.1.0") #t))))
1601 (build-system cmake-build-system)
1602 (arguments
1603 ;; Required to locate the install script properly.
1604 (list
1605 #:out-of-source? #f
1606 #:tests? #f
1607 #:parallel-build? #f ;occasionally failed.
1608 #:imported-modules (append %cmake-build-system-modules
1609 %pyproject-build-system-modules)
1610 #:modules '((guix build cmake-build-system)
1611 ((guix build pyproject-build-system) #:prefix py:)
1612 (guix build utils))
1613 #:phases
1614 #~(modify-phases %standard-phases
1615 (add-after 'unpack 'prevent-rebuild-during-installation
1616 (lambda _
1617 (substitute* "python/setup.py"
1618 (("'build_py': BuildPyCommand,") ""))))
1619 (add-after 'unpack 'patch-3rd-party-references
1620 (lambda* (#:key inputs #:allow-other-keys)
1621 (substitute* "src/CMakeLists.txt"
1622 (("../deps/rapidjson-1.1.0")
1623 (search-input-directory inputs "/include/rapidjson")))))
1624 (add-before 'configure 'patch-python-binding-installation
1625 (lambda _
1626 (substitute* "python/opencc/__init__.py"
1627 (("(_libopenccfile =).*$" _ prefix)
1628 (format #f "~a os.path.join('~a/lib', _libopenccfilename)~%"
1629 prefix #$output))
1630 (("(_opencc_share_dir =).*$" _ prefix)
1631 (format #f "~a '~a/share/opencc'~%" prefix #$output)))))
1632 (add-after 'install 'install-python-binding
1633 (lambda* (#:key outputs inputs #:allow-other-keys)
1634 (let ((dist (py:site-packages inputs outputs)))
1635 (chdir "python")
1636 (mkdir-p dist)
1637 (setenv "PYTHONPATH"
1638 (string-append dist ":" (getenv "GUIX_PYTHONPATH")))
1639 (invoke "python" "setup.py" "install"
1640 "--root=/" "--single-version-externally-managed"
1641 (string-append "--prefix=" #$output)))))
1642 (add-before 'install-python-binding 'enable-bytecode-determinism
1643 (assoc-ref py:%standard-phases 'enable-bytecode-determinism)))))
1644 (native-inputs
1645 (list python-wrapper
1646 rapidjson
1647 python-setuptools))
1648 (home-page "https://github.com/BYVoid/OpenCC")
1649 (synopsis "Convert between Traditional Chinese and Simplified Chinese")
1650 (description "Open Chinese Convert (OpenCC) converts between Traditional
1651Chinese and Simplified Chinese, supporting character-level conversion,
1652phrase-level conversion, variant conversion, and regional idioms among
1653Mainland China, Taiwan, and Hong-Kong.")
1654 (license license:asl2.0)))
1655
1656(define-public nkf
1657 (let ((commit "08043eadf4abdddcf277842217e3c77a24740dc2")
1658 (revision "1"))
1659 (package
1660 (name "nkf")
1661 ;; The commits corresponding to specific versions are published
1662 ;; here:
1663 ;; https://ja.osdn.net/projects/nkf/scm/git/nkf/
1664 (version "2.1.5")
1665 (source (origin
1666 (method git-fetch)
1667 (uri (git-reference
1668 (url "https://github.com/nurse/nkf")
1669 (commit commit)))
1670 (file-name (git-file-name name version))
1671 (sha256
1672 (base32
1673 "0anw0knr1iy4p9w3d3b3pbwzh1c43p1i2q4c28kw9zviw8kx2rly"))))
1674 (build-system gnu-build-system)
1675 (arguments
1676 (list #:tests? #f ; test for perl module
1677 #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
1678 "CFLAGS=-O2 -Wall -pedantic"
1679 (string-append "prefix=" #$output)
1680 "MKDIR=mkdir -p")
1681 #:phases
1682 #~(modify-phases %standard-phases
1683 (delete 'configure)))) ; No ./configure script
1684 (home-page "https://ja.osdn.net/projects/nkf/")
1685 (synopsis "Network Kanji Filter")
1686 (description "Nkf is yet another kanji code converter among networks,
1687hosts and terminals. It converts input kanji code to designated kanji code
1688such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 or UTF-32.")
1689 (license license:zlib))))
1690
1691(define-public aha
1692 (package
1693 (name "aha")
1694 (version "0.5.1")
1695 (source
1696 (origin
1697 (method git-fetch)
1698 (uri (git-reference
1699 (url "https://github.com/theZiz/aha")
1700 (commit version)))
1701 (sha256
1702 (base32 "1gywad0rvvz3c5balz8cxsnx0562hj2ngzqyr8zsy2mb4pn0lpgv"))
1703 (file-name (git-file-name name version))))
1704 (build-system gnu-build-system)
1705 (arguments
1706 `(#:phases
1707 (modify-phases %standard-phases
1708 (delete 'configure))
1709 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1710 (string-append "PREFIX="
1711 (assoc-ref %outputs "out")))
1712 #:tests? #f)) ; no test suite
1713 (home-page "https://github.com/theZiz/aha")
1714 (synopsis "Converts terminal escape sequences to HTML")
1715 (description "@command{aha} (Ansi Html Adapter) converts ANSI escape sequences
1716of a Unix terminal to HTML code.")
1717 (license (list license:lgpl2.0+ license:mpl1.1))))
1718
1719(define-public vale
1720 (package
1721 (name "vale")
1722 (version "3.13.0")
1723 (source
1724 (origin
1725 (method git-fetch)
1726 (uri (git-reference
1727 (url "https://github.com/errata-ai/vale")
1728 (commit (string-append "v" version))))
1729 (sha256
1730 (base32 "0qa1maav2zf6z5ij1yg6i3gbkknngqhlrhlkxrypzdf7q10558kr"))
1731 (file-name (git-file-name name version))))
1732 (build-system go-build-system)
1733 (arguments
1734 (list
1735 #:install-source? #f
1736 #:embed-files #~(list ".*\\.gob")
1737 #:import-path "github.com/errata-ai/vale/cmd/vale"
1738 #:unpack-path "github.com/errata-ai/vale"
1739 ;; Disable tests requiring network access: Get
1740 ;; "https://raw.githubusercontent.com/errata-ai/styles/master/library.json":
1741 ;; dial tcp: lookup raw.githubusercontent.com on [::1]:53: read udp
1742 ;; [::1]:52621->[::1]:53: read: connection refused.
1743 #:test-flags
1744 #~(list "-skip" (string-join
1745 (list "TestLibrary"
1746 "TestNoPkgFound"
1747 "TestSymlinkFixture")
1748 "|"))
1749 #:test-subdirs
1750 #~(list "../../...") ; test whole library, starting from import-path
1751 #:phases
1752 #~(modify-phases %standard-phases
1753 (add-before 'check 'pre-check
1754 (lambda _
1755 (setenv "HOME" "/tmp"))))))
1756 (native-inputs
1757 (list go-github-com-adrg-frontmatter
1758 go-github-com-adrg-strutil
1759 go-github-com-adrg-xdg
1760 go-github-com-bmatcuk-doublestar-v4
1761 go-github-com-d5-tengo-v2
1762 go-github-com-errata-ai-ini
1763 go-github-com-errata-ai-regexp2
1764 go-github-com-expr-lang-expr
1765 go-github-com-gobwas-glob
1766 go-github-com-jdkato-go-tree-sitter-julia
1767 go-github-com-jdkato-twine
1768 go-github-com-masterminds-sprig-v3
1769 go-github-com-mitchellh-mapstructure
1770 go-github-com-niklasfasching-go-org
1771 go-github-com-olekukonko-tablewriter-0.0.5
1772 go-github-com-otiai10-copy
1773 go-github-com-pelletier-go-toml-v2
1774 go-github-com-pterm-pterm
1775 go-github-com-remeh-sizedwaitgroup
1776 go-github-com-smacker-go-tree-sitter
1777 go-github-com-spf13-pflag
1778 go-github-com-tomwright-dasel-v2
1779 go-github-com-yuin-goldmark
1780 go-golang-org-x-exp
1781 go-golang-org-x-net
1782 go-golang-org-x-sys
1783 go-gopkg-in-yaml-v2))
1784 (home-page "https://github.com/errata-ai/vale")
1785 (synopsis "Fully customizable syntax-aware linter that focuses on your style")
1786 (description
1787 "Vale is a fully extensible linter that focuses on your own writing style
1788by making use of rules in individual YAML files. It is syntax-aware on markup
1789languages such as HTML, Markdown, Asciidoc, and reStructuredText. The
1790community around it also has a list of style guides implemented with Vale in
1791@url{https://github.com/errata-ai/styles, their styles repo}.")
1792 (license license:expat)))
1793
1794(define-public utf-8-lineseparator
1795 (package
1796 (name "utf-8-lineseparator")
1797 (version "8")
1798 (source (origin
1799 (method git-fetch)
1800 (uri (git-reference
1801 (url "https://github.com/pflanze/utf-8-lineseparator")
1802 (commit (string-append "cj" version))))
1803 (file-name (git-file-name name version))
1804 (sha256
1805 (base32
1806 "0rw34r0aiab55mqks9sjzjyskfwgn7mfhy65px1lljyrs2xvvzp5"))))
1807 (build-system gnu-build-system)
1808 (arguments
1809 `(#:make-flags
1810 (list
1811 (string-append "CC=" ,(cc-for-target)))
1812 #:phases
1813 (modify-phases %standard-phases
1814 (delete 'configure)
1815 (replace 'install
1816 (lambda* (#:key inputs outputs #:allow-other-keys)
1817 (let* ((out (assoc-ref outputs "out"))
1818 (bin (string-append out "/bin")))
1819 (install-file "utf-8-lineseparator" bin)))))))
1820 (home-page "https://github.com/pflanze/utf-8-lineseparator")
1821 (synopsis "Line ending detection library")
1822 (description
1823"@code{utf-8-lineseparator} provides a tool to efficiently check text
1824files for valid UTF-8 use and to report which line endings they use.")
1825 (license license:expat)))
1826
1827(define-public csvdiff
1828 (package
1829 (name "csvdiff")
1830 (version "1.4.0")
1831 (source
1832 (origin
1833 (method git-fetch)
1834 (uri (git-reference
1835 (url "https://github.com/aswinkarthik/csvdiff")
1836 (commit (string-append "v" version))))
1837 (file-name (git-file-name name version))
1838 (sha256
1839 (base32
1840 "0cd1ikxsypjqisfnmr7zix3g7x8p892w77086465chyd39gpk97b"))))
1841 (build-system go-build-system)
1842 (arguments
1843 (list
1844 #:install-source? #f
1845 #:import-path "github.com/aswinkarthik/csvdiff"))
1846 (native-inputs
1847 (list go-github-com-cespare-xxhash
1848 go-github-com-fatih-color
1849 go-github-com-spf13-afero
1850 go-github-com-spf13-cobra
1851 go-github-com-stretchr-testify))
1852 (home-page "https://github.com/aswinkarthik/csvdiff")
1853 (synopsis "Fast diff tool for comparing CSV files")
1854 (description "@code{csvdiff} is a diff tool to compute changes between two
1855CSV files. It can compare CSV files with a million records in under 2
1856seconds. It is specifically suited for comparing CSV files dumped from
1857database tables. GNU Diff is orders of magnitude faster for comparing line by
1858line. @code{csvdiff} supports
1859
1860@itemize
1861@item Selective comparison of fields in a row
1862@item Specifying group of columns as primary-key to uniquely identify a row
1863@item Ignoring columns
1864@item Several output formats including colored git style output or
1865JSON for post-processing
1866@end itemize")
1867 (license license:expat)))
1868
1869(define-public miller
1870 (package
1871 (name "miller")
1872 (version "6.17.0")
1873 (source
1874 (origin
1875 (method git-fetch)
1876 (uri (git-reference
1877 (url "https://github.com/johnkerl/miller")
1878 (commit (string-append "v" version))))
1879 (file-name (git-file-name name version))
1880 (sha256
1881 (base32 "065izww0f0qb80z95zvzpbr4mmcs8vrzgv10rjwfqyry9kzknpkb"))))
1882 (build-system go-build-system)
1883 (arguments
1884 (list
1885 #:install-source? #f
1886 #:import-path "github.com/johnkerl/miller/cmd/mlr"
1887 #:unpack-path "github.com/johnkerl/miller"
1888 #:phases
1889 #~(modify-phases %standard-phases
1890 ;; TODO: Build all provided documentation.
1891 (add-after 'install 'install-man-pages
1892 (lambda* (#:key unpack-path #:allow-other-keys)
1893 (with-directory-excursion (string-append "src/" unpack-path)
1894 (invoke "make" (string-append "PREFIX=" #$output)
1895 "-C" "man" "install")))))))
1896 (native-inputs
1897 (list go-github-com-facette-natsort
1898 go-github-com-johnkerl-lumin
1899 go-github-com-kballard-go-shellquote
1900 go-github-com-klauspost-compress
1901 go-github-com-kshedden-statmodel
1902 go-github-com-lestrrat-go-strftime
1903 go-github-com-mattn-go-isatty
1904 go-github-com-pkg-profile
1905 go-github-com-stretchr-testify
1906 go-golang-org-x-sys
1907 go-golang-org-x-term
1908 go-golang-org-x-text
1909 go-gopkg-in-yaml-v3
1910 go-pault-ag-go-debian
1911 python-wrapper
1912 ruby))
1913 (home-page "https://miller.readthedocs.io/")
1914 (synopsis "Text-formatted data processing tool")
1915 (description
1916 "Miller (@command{mlr}) is like @command{awk}, @command{sed},
1917@command{cut}, @command{join}, and @command{sort} for data formats such as
1918CSV, TSV, JSON, JSON Lines, and positionally-indexed. It supports format
1919conversion and pretty-printing.")
1920 (license license:bsd-2)))
1921
1922(define-public ack
1923 (package
1924 (name "ack")
1925 (version "3.9.0")
1926 (source
1927 (origin
1928 (method git-fetch)
1929 (uri
1930 (git-reference
1931 (url "https://github.com/beyondgrep/ack3")
1932 (commit (string-append "v" version))))
1933 (file-name (git-file-name name version))
1934 (sha256
1935 (base32 "1iisc7lw6qw3gg1411xnwh2rnc7vjz3nqsdk1cgc98mavn112rvv"))))
1936 (build-system perl-build-system)
1937 (arguments
1938 (list
1939 #:phases
1940 #~(modify-phases %standard-phases
1941 (add-after 'patch-generated-file-shebangs 'patch-more-shebangs
1942 (lambda* (#:key inputs outputs #:allow-other-keys)
1943 (let ((perl (string-append
1944 #$(this-package-input "perl")
1945 "/bin/perl"))
1946 (site-perl
1947 (lambda (input)
1948 (format #false "~a/lib/perl5/site_perl/~a"
1949 input
1950 #$(package-version perl)))))
1951 (substitute* "t/ack-type.t"
1952 (("/usr/bin/perl") perl)
1953 (("/usr/bin/env perl") perl))
1954 ;; Add @INC include directories to perl calls
1955 (substitute* "ack"
1956 (("/bin/perl")
1957 (string-append "/bin/perl"
1958 " -I "
1959 (site-perl #$(this-package-input "perl-file-next"))
1960 " -I "
1961 (site-perl #$output))))))))))
1962 (inputs
1963 (list perl
1964 perl-file-next))
1965 (native-inputs
1966 (list perl-io-pty
1967 perl-yaml-pp))
1968 (home-page "https://beyondgrep.com/")
1969 (synopsis "Code-searching tool for programmers with large source trees")
1970 (description "ack is a tool for finding text inside files. It is designed for
1971hackers and programmers by being fast, ignoring VCS directories, letting a user
1972easily specify file types, match highlighting, Perl-Compatible Regular
1973Expressions, and being faster to type than grep.")
1974 (license license:artistic2.0)))
1975
1976(define-public pandoc-include
1977 (package
1978 (name "pandoc-include")
1979 (version "1.4.3")
1980 (source
1981 (origin
1982 (method git-fetch)
1983 (uri (git-reference
1984 (url "https://github.com/DCsunset/pandoc-include")
1985 (commit (string-append "v" version))))
1986 (file-name (git-file-name name version))
1987 (sha256
1988 (base32 "1db7fhdvhl3jnzwbi5s76jnlgkf0ifw9ngfv63dij4y21g5lhmzj"))))
1989 (build-system pyproject-build-system)
1990 (arguments
1991 ;; XXX: Test can be run with "test/run.py" but fail with error:
1992 ;; json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
1993 (list #:tests? #f))
1994 (native-inputs
1995 (list python-setuptools))
1996 (inputs
1997 (list python-lxml
1998 python-natsort
1999 python-panflute))
2000 (home-page "https://github.com/DCsunset/pandoc-include")
2001 (synopsis "Pandoc filter to allow file and header includes")
2002 (description "@code{pandoc-include} extends Pandoc to support:
2003
2004@enumerate
2005@item include as raw blocks
2006@item indent and dedent included contents
2007@item partial include
2008@item code include
2009@item Unix style pathname
2010@item recursive include
2011@item Yaml header merging
2012@item header include
2013@end enumerate")
2014 (license license:expat)))
2015
2016(define-public yq
2017 (package
2018 (name "yq")
2019 (version "4.52.4")
2020 (source
2021 (origin
2022 (method git-fetch)
2023 (uri (git-reference
2024 (url "https://github.com/mikefarah/yq")
2025 (commit (string-append "v" version))))
2026 (file-name (git-file-name name version))
2027 (sha256
2028 (base32 "1gha586k0gscgq8jjx3nna70bc0xjy3b8d8gg62wgl9gra6ymfxx"))))
2029 (build-system go-build-system)
2030 (arguments
2031 (list
2032 #:install-source? #f
2033 ;; Go provides the binary as the name of the last directory in the
2034 ;; import-path unless the file names is something else than main.go.
2035 ;; The real import-path is "github.com/mikefarah/yq/v4".
2036 #:import-path "github.com/mikefarah/yq"
2037 #:phases
2038 #~(modify-phases %standard-phases
2039 ;; Tests need this.
2040 (add-after 'unpack 'fix-access-to-doc
2041 (lambda* (#:key import-path #:allow-other-keys)
2042 (with-directory-excursion (string-append "src/" import-path)
2043 (for-each make-file-writable
2044 (find-files "./pkg/yqlib/doc" "\\.md"))))))))
2045 (native-inputs
2046 (list go-github-com-a8m-envsubst
2047 go-github-com-alecthomas-participle-v2
2048 go-github-com-alecthomas-repr
2049 go-github-com-dimchansky-utfbom
2050 go-github-com-elliotchance-orderedmap
2051 go-github-com-fatih-color
2052 go-github-com-go-ini-ini
2053 go-github-com-goccy-go-json
2054 go-github-com-goccy-go-yaml
2055 go-github-com-hashicorp-hcl-v2
2056 go-github-com-jinzhu-copier
2057 go-github-com-magiconair-properties
2058 go-github-com-pelletier-go-toml-v2
2059 go-github-com-pkg-diff
2060 go-github-com-spf13-cobra
2061 go-github-com-spf13-pflag
2062 go-github-com-yuin-gopher-lua
2063 go-github-com-zclconf-go-cty
2064 go-go-yaml-in-yaml-v4
2065 go-golang-org-x-net
2066 go-golang-org-x-text
2067 go-gopkg-in-op-go-logging-v1))
2068 (home-page "https://mikefarah.gitbook.io/yq/")
2069 (synopsis "Command-line YAML, JSON, XML, CSV, TOML and properties processor")
2070 (description
2071 "This package provides @code{yq}, a command-line YAML, JSON and XML
2072processor. It uses @code{jq}-like syntax but works with YAML files as well as
2073JSON, XML, properties, CSV and TSV.")
2074 (license license:expat)))