projects/guix·blob python-team · refs

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