projects/guix·blob java-team · refs

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