gnu: r-maldiquant: Move to (gnu packages cran).
[jackhill/guix/guix.git] / gnu / packages / textutils.scm
CommitLineData
7939e70a
TUBK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
73092df4 3;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
a64a8c46 4;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
e522d840 5;;; Copyright © 2015 Roel Janssen <roel@gnu.org>
2d8cf0b3 6;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
f17a5447 7;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
30024a1e 8;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3c986a7d 9;;; Copyright © 2016 Nikita <nikita@n0.is>
07d6003b 10;;; Copyright © 2016, 2020 Marius Bakke <marius@gnu.org>
5353cea0 11;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
7fdca77e 12;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
7577ab55 13;;; Copyright © 2017,2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
3c8ba11a 14;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
bfcdf887 15;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
9a71213e 16;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4715f92e 17;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
1a0363cf 18;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
933ac939 19;;; Copyright © 2019 Yoshinori Arai <kumagusu08@gmail.com>
f9488b70 20;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
24719e8a 21;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
7f05493d 22;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
7939e70a
TUBK
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
39(define-module (gnu packages textutils)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix git-download)
ff3f6766 44 #:use-module (guix build-system ant)
7939e70a 45 #:use-module (guix build-system gnu)
03f801aa 46 #:use-module (guix build-system go)
c8d969b5 47 #:use-module (guix build-system cmake)
03639d03 48 #:use-module (guix build-system python)
3a176be0 49 #:use-module (guix utils)
9116f126 50 #:use-module (gnu packages)
f571e1c3 51 #:use-module (gnu packages autotools)
a6baae74 52 #:use-module (gnu packages base)
148585c2 53 #:use-module (gnu packages compression)
f9488b70 54 #:use-module (gnu packages gcc)
2f6e988d 55 #:use-module (gnu packages gettext)
ff3f6766 56 #:use-module (gnu packages java)
8888fe82 57 #:use-module (gnu packages ncurses)
7f05493d 58 #:use-module (gnu packages pcre)
8888fe82 59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
f17a5447 61 #:use-module (gnu packages python)
44d10b1f 62 #:use-module (gnu packages python-xyz)
8888fe82 63 #:use-module (gnu packages readline)
1506d491
EF
64 #:use-module (gnu packages slang)
65 #:use-module (gnu packages web))
7939e70a 66
2f6e988d
KK
67(define-public dos2unix
68 (package
69 (name "dos2unix")
ac95bd97 70 (version "7.4.1")
2f6e988d
KK
71 (source
72 (origin
73 (method url-fetch)
96b96ec6
TGR
74 (uri (string-append "https://waterlan.home.xs4all.nl/dos2unix/"
75 "dos2unix-" version ".tar.gz"))
2f6e988d 76 (sha256
ac95bd97 77 (base32 "08w6yywzirsxq8bh87jycvvw922ybhc2l426j2iqzliyn1h8mm8w"))))
2f6e988d
KK
78 (build-system gnu-build-system)
79 (arguments
80 '(#:make-flags (list "CC=gcc"
81 (string-append "prefix=" (assoc-ref %outputs "out")))
82 #:phases
83 (modify-phases %standard-phases
84 (delete 'configure)))) ; no configure script
85 (native-inputs
86 `(("gettext" ,gettext-minimal)
87 ("perl" ,perl)))
88 (home-page "https://waterlan.home.xs4all.nl/dos2unix.html")
89 (synopsis "DOS/Mac to Unix and vice versa text file format converter")
90 (description
91 "dos2unix is a tool to convert line breaks in a text file from Unix format
92to DOS format and vice versa.")
93 (license license:bsd-2)))
94
7939e70a
TUBK
95(define-public recode
96 (package
97 (name "recode")
f4a1de00 98 (version "3.7.6")
7939e70a
TUBK
99 (source
100 (origin
20a792b5
EF
101 (method url-fetch)
102 (uri (string-append "https://github.com/rrthomas/recode/releases/"
6f2f7bc8 103 "download/v" version "/recode-" version ".tar.gz"))
7939e70a 104 (sha256
f4a1de00 105 (base32 "0m59sd1ca0zw1aydpc3m8sw03nc885knmccqryg7byzmqs585ia6"))))
7939e70a 106 (build-system gnu-build-system)
20a792b5 107 (native-inputs
5ca1900b
TGR
108 `(("python" ,python)
109 ("python-cython" ,python-cython)))
20a792b5 110 (home-page "https://github.com/rrthomas/recode")
7939e70a
TUBK
111 (synopsis "Text encoding converter")
112 (description "The Recode library converts files between character sets and
113usages. It recognises or produces over 200 different character sets (or about
114300 if combined with an iconv library) and transliterates files between almost
115any pair. When exact transliteration are not possible, it gets rid of
116offending characters or falls back on approximations. The recode program is a
117handy front-end to the library.")
20a792b5 118 (license license:gpl3+)))
688fe865
TUBK
119
120(define-public enca
121 (package
122 (name "enca")
1462b456 123 (version "1.19")
688fe865
TUBK
124 (source
125 (origin
30024a1e
EF
126 (method git-fetch)
127 (uri (git-reference
128 (url "https://github.com/nijel/enca")
129 (commit version)))
130 (file-name (git-file-name name version))
688fe865 131 (sha256
30024a1e 132 (base32 "19q7cwwxmmk5j9438bsqdpjvdjawsd3zmw1zyqgi7s4m0rasr3ah"))))
688fe865 133 (build-system gnu-build-system)
1462b456
EF
134 ;; enca-1.19 tests fail with recent recode.
135 ;(inputs `(("recode" ,recode)))
688fe865
TUBK
136 (home-page "https://github.com/nijel/enca")
137 (synopsis "Text encoding detection tool")
138 (description "Enca (Extremely Naive Charset Analyser) consists of libenca,
139an encoding detection library, and enca, a command line frontend, integrating
140libenca and several charset conversion libraries and tools.")
141 (license license:gpl2)))
cd15ad82
RW
142
143(define-public utf8proc
144 (package
145 (name "utf8proc")
cbae2049 146 (version "2.5.0")
cd15ad82
RW
147 (source
148 (origin
39ff1d89
MB
149 (method git-fetch)
150 (uri (git-reference
151 (url "https://github.com/JuliaStrings/utf8proc")
152 (commit (string-append "v" version))))
153 (file-name (git-file-name name version))
cd15ad82 154 (sha256
cbae2049 155 (base32 "1xlkazhdnja4lksn5c9nf4bln5gjqa35a8gwlam5r0728w0h83qq"))))
cd15ad82 156 (build-system gnu-build-system)
63f2de03 157 (native-inputs
cbae2049 158 (let ((UNICODE_VERSION "13.0.0")) ; defined in data/Makefile
63f2de03
TGR
159 ;; Test data that is otherwise downloaded with curl.
160 `(("NormalizationTest.txt"
161 ,(origin
162 (method url-fetch)
163 (uri (string-append "https://www.unicode.org/Public/"
164 UNICODE_VERSION "/ucd/NormalizationTest.txt"))
165 (sha256
cbae2049 166 (base32 "07g0ya4f6zfzvpp24ccxkb2yq568kh83gls85rjl950nv5fya3nn"))))
63f2de03
TGR
167 ("GraphemeBreakTest.txt"
168 ,(origin
169 (method url-fetch)
170 (uri (string-append "https://www.unicode.org/Public/"
171 UNICODE_VERSION
172 "/ucd/auxiliary/GraphemeBreakTest.txt"))
173 (sha256
cbae2049 174 (base32 "07f8rrvcsq4pibdz6zxggxy8w7zjjqyw2ggclqlhalyv45yv7prj"))))
99293380 175
63f2de03
TGR
176 ;; For tests.
177 ("perl" ,perl))))
cd15ad82 178 (arguments
5353cea0 179 '(#:make-flags (list "CC=gcc"
f1e3a8ae 180 (string-append "prefix=" (assoc-ref %outputs "out")))
cd15ad82 181 #:phases
f1e3a8ae 182 (modify-phases %standard-phases
5353cea0
EB
183 (delete 'configure)
184 (add-before 'check 'check-data
185 (lambda* (#:key inputs #:allow-other-keys)
186 (for-each (lambda (i)
187 (copy-file (assoc-ref inputs i)
188 (string-append "data/" i)))
189 '("NormalizationTest.txt" "GraphemeBreakTest.txt"))
190 (substitute* "data/GraphemeBreakTest.txt"
191 (("÷") "/")
99293380
MB
192 (("×") "+"))
193 #t)))))
22cc598b 194 (home-page "https://juliastrings.github.io/utf8proc/")
cd15ad82
RW
195 (synopsis "C library for processing UTF-8 Unicode data")
196 (description "utf8proc is a small C library that provides Unicode
197normalization, case-folding, and other operations for data in the UTF-8
9b72ce60 198encoding, supporting Unicode version 9.0.0.")
cd15ad82 199 (license license:expat)))
f571e1c3 200
205df739
TGR
201(define-public libconfuse
202 (package
203 (name "libconfuse")
07d6003b 204 (version "3.3")
205df739
TGR
205 (source
206 (origin
207 (method url-fetch)
208 (uri (string-append "https://github.com/martinh/libconfuse/"
209 "releases/download/v" version
210 "/confuse-" version ".tar.xz"))
211 (sha256
07d6003b 212 (base32 "043hqqykpprgrkw9s2hbdlxr308a7yxwsgxj4m8aadg1401hmm8x"))))
205df739 213 (build-system gnu-build-system)
e36c4d0b
MB
214 (arguments
215 '(#:configure-flags '("--disable-static")))
205df739
TGR
216 (home-page "https://github.com/martinh/libconfuse")
217 (synopsis "Configuration file parser library")
218 (description "libconfuse is a configuration file parser library. It
219supports sections and (lists of) values (strings, integers, floats, booleans
220or other sections), as well as some other features (such as
221single/double-quoted strings, environment variable expansion, functions and
222nested include statements).")
223 (license license:isc)))
224
f571e1c3
RW
225(define-public libgtextutils
226 (package
227 (name "libgtextutils")
228 (version "0.7")
229 (source
230 (origin
231 (method url-fetch)
232 (uri (string-append
233 "https://github.com/agordon/libgtextutils/releases/download/"
234 version "/libgtextutils-" version ".tar.gz"))
235 (sha256
236 (base32 "0jiybkb2z58wa2msvllnphr4js2hvjvh988pavb3mzkgr6ihwbkr"))))
237 (build-system gnu-build-system)
e005ddc2 238 (arguments
73092df4 239 `(#:phases
e005ddc2
EF
240 (modify-phases %standard-phases
241 (replace 'bootstrap
73092df4
RW
242 (lambda _ (invoke "sh" "reconf")))
243 (add-after 'set-paths 'hide-default-gcc
244 (lambda* (#:key inputs #:allow-other-keys)
245 (let ((gcc (assoc-ref inputs "gcc")))
246 ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
247 ;; conflicts with the GCC 5 input.
248 (setenv "CPLUS_INCLUDE_PATH"
249 (string-join
250 (delete (string-append gcc "/include/c++")
251 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
252 ":"))
253 #t))))))
f571e1c3
RW
254 (native-inputs
255 `(("autoconf" ,autoconf)
256 ("automake" ,automake)
73092df4 257 ("gcc@5" ,gcc-5) ; doesn't build with later versions
f571e1c3
RW
258 ("libtool" ,libtool)))
259 (home-page "https://github.com/agordon/libgtextutils")
260 (synopsis "Gordon's text utils library")
261 (description
262 "libgtextutils is a text utilities library used by the fastx toolkit from
263the Hannon Lab.")
264 (license license:agpl3+)))
aae2b445
BW
265
266(define-public cityhash
a64a8c46 267 (let ((commit "8af9b8c"))
aae2b445
BW
268 (package
269 (name "cityhash")
a64a8c46 270 (version (string-append "1.1-2." commit))
aae2b445
BW
271 (source (origin
272 (method git-fetch)
273 (uri (git-reference
b0e7b699 274 (url "https://github.com/google/cityhash")
aae2b445
BW
275 (commit commit)))
276 (file-name (string-append name "-" version ".tar.gz"))
277 (sha256
278 (base32
279 "0n6skf5dv8yfl1ckax8dqhvsbslkwc9158zf2ims0xqdvzsahbi6"))))
a64a8c46
BW
280 (build-system gnu-build-system)
281 (arguments
282 '(#:make-flags (list "CXXFLAGS=-g -O3")
283 #:phases
284 (modify-phases %standard-phases
285 ;; citycrc is not installed by default but is used by some
286 ;; programs.
287 (add-after 'install 'install-citycrc
288 (lambda* (#:key outputs #:allow-other-keys)
289 (let* ((out (assoc-ref outputs "out"))
290 (include (string-append out "/include")))
291 (install-file "src/citycrc.h" include))
292 #t)))))
293 (home-page "https://github.com/google/cityhash")
294 (synopsis "C++ hash functions for strings")
295 (description
296 "CityHash provides hash functions for strings. The functions mix the
aae2b445 297input bits thoroughly but are not suitable for cryptography.")
a64a8c46 298 (license license:expat))))
e522d840 299
9128db21
RW
300(define-public ustr
301 (package
302 (name "ustr")
303 (version "1.0.4")
304 (source (origin
305 (method url-fetch)
306 (uri (string-append "http://www.and.org/ustr/" version
307 "/ustr-" version ".tar.bz2"))
308 (sha256
309 (base32
7fdca77e
RS
310 "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx"))
311 (patches (search-patches "ustr-fix-build-with-gcc-5.patch"))))
9128db21
RW
312 (build-system gnu-build-system)
313 (arguments
314 `(#:make-flags
315 (list "CC=gcc"
316 "HIDE="
317 ;; Override "/sbin/ldconfig" with "echo" because we don't need
318 ;; "ldconfig".
319 "LDCONFIG=echo"
320 (string-append "prefix=" (assoc-ref %outputs "out"))
321 "all-shared")
322 #:phases
323 (modify-phases %standard-phases
324 (add-after 'unpack 'disable-check-for-stdint
325 (lambda _
326 ;; Of course we have stdint.h, just not in /usr/include
327 (substitute* '("Makefile"
328 "ustr-import.in")
329 (("-f \"/usr/include/stdint.h\"") "-z \"\""))
330 #t))
331 ;; No configure script
332 (delete 'configure))))
333 (home-page "http://www.and.org/ustr/")
334 (synopsis "String library with very low memory overhead")
335 (description
336 "Ustr is a string library for C with very low memory overhead.")
337 ;; Quoted from the home page: "The License for the code is MIT, new-BSD,
338 ;; LGPL, etc. ... if you need another license to help compatibility, just
339 ;; ask for it. It's basically public domain, without all the legal
340 ;; problems for everyone that trying to make something public domain
341 ;; entails."
342 (license license:public-domain)))
343
7577ab55
HG
344(define-public ascii2binary
345 (package
346 (name "ascii2binary")
347 (version "2.14")
348 (source
349 (origin
350 (method url-fetch)
351 (uri (string-append "http://billposer.org/Software/Downloads/"
352 "ascii2binary-" version ".tar.bz2"))
353 (sha256
354 (base32 "0dc9fxcdmppbs9s06jvq61zbk552laxps0xyk098gj41697ihd96"))))
355 (build-system gnu-build-system)
356 (native-inputs
357 `(("gettext" ,gettext-minimal)))
358 (home-page "https://billposer.org/Software/a2b.html")
359 (synopsis "Convert between ASCII, hexadecimal and binary representations")
360 (description "The two programs are useful for generating test data, for
361inspecting binary files, and for interfacing programs that generate textual
362output to programs that require binary input and conversely. They can also be
363useful when it is desired to reformat numbers.
364
365@itemize
366
367@item @command{ascii2binary} reads input consisting of ascii or hexadecimal
368 representation numbers separated by whitespace and produces as output
369 the binary equivalents. The type and precision of the binary output
370 is selected using command line flags.
371
372@item @command{binary2ascii} reads input consisting of binary numbers
373 and converts them to their ascii or hexadecimal representation.
374 Command line flags specify the type and size of the binary numbers
375 and provide control over the format of the output.
376 Unsigned integers may be written out in binary, octal, decimal,
377 or hexadecimal.
378
379 Signed integers may be written out only in binary or decimal. Floating
380 point numbers may be written out only decimal, either in standard or
381 scientific notation. (If you want to examine the binary representation
382 of floating point numbers, just treat the input as a sequence of unsigned
383 characters.)
384
a6baae74
HG
385@end itemize")
386 (license license:gpl3)))
387
388(define-public uniutils
389 (package
390 (name "uniutils")
391 (version "2.27")
392 (source
393 (origin
394 (method url-fetch)
395 (uri (string-append "http://billposer.org/Software/Downloads/"
396 "uniutils-" version ".tar.bz2"))
397 (sha256
398 (base32 "19w1510w87gx7n4qy3zsb0m467a4rn5scvh4ajajg7jh6x5xri08"))))
399 (build-system gnu-build-system)
400 (arguments
401 '(#:configure-flags '("--disable-dependency-tracking")
402 #:phases
403 (modify-phases %standard-phases
404 (add-after 'build 'fix-paths
405 (lambda* (#:key outputs inputs #:allow-other-keys)
406 (let ((out (assoc-ref outputs "out"))
407 (a2b (assoc-ref inputs "ascii2binary"))
408 (iconv (assoc-ref inputs "libiconv")))
409 (substitute* "utf8lookup"
410 (("^ascii2binary ") (string-append a2b "/bin/ascii2binary "))
411 (("^uniname ") (string-append out "/bin/uniname "))
412 (("^iconv ") (string-append iconv "/bin/iconv ")))
413 #t))))))
414 (inputs
415 `(("ascii2binary" ,ascii2binary)
416 ("libiconv" ,libiconv)))
417 (home-page "https://billposer.org/Software/unidesc.html")
418 (synopsis "Find out what is in a Unicode file")
419 (description "Useful tools when working with Unicode files when one
420doesn't know the writing system, doesn't have the necessary font, needs to
421inspect invisible characters, needs to find out whether characters have been
422combined or in what order they occur, or needs statistics on which characters
423occur.
424
425@itemize
426
427@item @command{uniname} defaults to printing the character offset of each
428character, its byte offset, its hex code value, its encoding, the glyph
429itself, and its name. It may also be used to validate UTF-8 input.
430
431@item @command{unidesc} reports the character ranges to which different
432portions of the text belong. It can also be used to identify Unicode encodings
433(e.g. UTF-16be) flagged by magic numbers.
434
435@item @command{unihist} generates a histogram of the characters in its input.
436
437@item @command{ExplicateUTF8} is intended for debugging or for learning about
438Unicode. It determines and explains the validity of a sequence of bytes as a
439UTF8 encoding.
440
441@item @command{utf8lookup} provides a handy way to look up Unicode characters
442from the command line.
443
444@item @command{unireverse} reverse each line of UTF-8 input
445character-by-character.
446
7577ab55
HG
447@end itemize")
448 (license license:gpl3)))
449
e522d840
RJ
450(define-public libconfig
451 (package
452 (name "libconfig")
1b362016
MB
453 (version "1.7.2")
454 (home-page "https://hyperrealm.github.io/libconfig/")
e522d840
RJ
455 (source (origin
456 (method url-fetch)
1b362016
MB
457 (uri (string-append home-page "/dist/libconfig-"
458 version ".tar.gz"))
e522d840
RJ
459 (sha256
460 (base32
1b362016 461 "1ngs2qx3cx5cbwinc5mvadly0b5n7s86zsc68c404czzfff7lg3w"))))
e522d840 462 (build-system gnu-build-system)
e522d840
RJ
463 (synopsis "C/C++ configuration file library")
464 (description
465 "Libconfig is a simple library for manipulating structured configuration
466files. This file format is more compact and more readable than XML. And
467unlike XML, it is type-aware, so it is not necessary to do string parsing in
468application code.")
469 (license license:lgpl2.1+)))
c8d969b5
PP
470
471(define-public pfff
472 (package
473 (name "pfff")
474 (version "1.0")
475 (source (origin
bc117787
EF
476 (method git-fetch)
477 (uri (git-reference
478 (url "https://github.com/pfff/pfff")
479 (commit (string-append "v" version))))
480 (file-name (git-file-name name version))
c8d969b5
PP
481 (sha256
482 (base32
bc117787 483 "1nxkfm7zliq3rmr7yp871sppwfnz71iz364m2sgazny71pzykggc"))))
c8d969b5 484 (build-system cmake-build-system)
86bbfc50 485 (home-page "https://biit.cs.ut.ee/pfff/")
c8d969b5
PP
486 (synopsis "Probabilistic fast file fingerprinting tool")
487 (description
488 "pfff is a tool for calculating a compact digital fingerprint of a file
489by sampling randomly from the file instead of reading it in full.
490Consequently, the computation has a flat performance characteristic,
491correlated with data variation rather than file size. pfff can be as reliable
492as existing hashing techniques, with provably negligible risk of collisions.")
493 (license license:bsd-3)))
2d8cf0b3
JL
494
495(define-public oniguruma
496 (package
497 (name "oniguruma")
7eb823c6 498 (version "6.9.5-rev1")
2d8cf0b3
JL
499 (source (origin
500 (method url-fetch)
501 (uri (string-append "https://github.com/kkos/"
7eb823c6
MB
502 "oniguruma/releases/download/v"
503 ;; If there is a "-" in the version, convert
504 ;; to underscore for this part of the URI.
505 (string-map (lambda (c) (if (char=? #\- c) #\_ c))
506 version)
2d8cf0b3
JL
507 "/onig-" version ".tar.gz"))
508 (sha256
509 (base32
7eb823c6 510 "17m92k1n6bvza6m35fpd5g36zwpwm3hfz3478iwj5bvj2sfq8g6k"))))
2d8cf0b3 511 (build-system gnu-build-system)
28b55a51 512 (arguments '(#:configure-flags '("--disable-static")))
2d8cf0b3
JL
513 (home-page "https://github.com/kkos/oniguruma")
514 (synopsis "Regular expression library")
515 (description "Oniguruma is a regular expressions library. The special
516characteristic of this library is that different character encoding for every
517regular expression object can be specified.")
518 (license license:bsd-2)))
1b90e57e
RW
519
520(define-public antiword
521 (package
522 (name "antiword")
523 (version "0.37")
524 (source (origin
525 (method url-fetch)
526 (uri (string-append "http://www.winfield.demon.nl/linux"
527 "/antiword-" version ".tar.gz"))
528 (sha256
529 (base32
9116f126
EF
530 "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f"))
531 (patches (search-patches "antiword-CVE-2014-8123.patch"))))
1b90e57e
RW
532 (build-system gnu-build-system)
533 (arguments
534 `(#:tests? #f ; There are no tests
535 #:make-flags
536 (list "-f" "Makefile.Linux"
537 (string-append "GLOBAL_INSTALL_DIR="
538 (assoc-ref %outputs "out") "/bin")
539 (string-append "GLOBAL_RESOURCES_DIR="
540 (assoc-ref %outputs "out") "/share/antiword"))
541 #:phases
542 (modify-phases %standard-phases
b28e05d4
RW
543 (replace 'configure
544 (lambda* (#:key outputs #:allow-other-keys)
545 ;; Ensure that mapping files can be found in the actual package
546 ;; data directory.
547 (substitute* "antiword.h"
548 (("/usr/share/antiword")
549 (string-append (assoc-ref outputs "out") "/share/antiword")))
550 #t))
1b90e57e
RW
551 (replace 'install
552 (lambda* (#:key make-flags #:allow-other-keys)
0ad0ecee 553 (apply invoke "make" `("global_install" ,@make-flags)))))))
1b90e57e
RW
554 (home-page "http://www.winfield.demon.nl/")
555 (synopsis "Microsoft Word document reader")
556 (description "Antiword is an application for displaying Microsoft Word
557documents. It can also convert the document to PostScript or XML. Only
558documents made by MS Word version 2 and version 6 or later are supported. The
559name comes from: \"The antidote against people who send Microsoft Word files
560to everybody, because they believe that everybody runs Windows and therefore
561runs Word\".")
562 (license license:gpl2+)))
f17a5447 563
d0abaf89
HG
564(define-public catdoc
565 (package
566 (name "catdoc")
567 (version "0.95")
568 (source (origin
569 (method url-fetch)
570 (uri (string-append "http://ftp.wagner.pp.ru/pub/catdoc/"
571 "catdoc-" version ".tar.gz"))
bfcdf887 572 (patches (search-patches "catdoc-CVE-2017-11110.patch"))
d0abaf89
HG
573 (sha256
574 (base32
575 "15h7v3bmwfk4z8r78xs5ih6vd0pskn0rj90xghvbzdjj0cc88jji"))))
576 (build-system gnu-build-system)
577 ;; TODO: Also build `wordview` which requires `tk` – make a separate
578 ;; package for this.
579 (arguments
580 '(#:tests? #f ; There are no tests
581 #:configure-flags '("--disable-wordview")
582 #:phases
583 (modify-phases %standard-phases
584 (add-before 'install 'fix-install
585 (lambda* (#:key outputs #:allow-other-keys)
586 (let ((out (assoc-ref outputs "out")))
587 (mkdir-p (string-append out "/share/man/man1"))))))))
13607002 588 (home-page "https://www.wagner.pp.ru/~vitus/software/catdoc/")
d0abaf89
HG
589 (synopsis "MS-Word to TeX or plain text converter")
590 (description "@command{catdoc} extracts text from MS-Word files, trying to
591preserve as many special printable characters as possible. It supports
592everything up to Word-97. Also supported are MS Write documents and RTF files.
593
594@command{catdoc} does not preserve complex word formatting, but it can
595translate some non-ASCII characters into TeX escape codes. It's goal is to
596extract plain text and allow you to read it and, probably, reformat with TeX,
597according to TeXnical rules.
598
599This package also provides @command{xls2csv}, which extracts data from Excel
600spreadsheets and outputs it in comma-separated-value format, and
601@command{catppt}, which extracts data from PowerPoint presentations.")
602 (license license:gpl2+)))
603
f17a5447
AG
604(define-public utfcpp
605 (package
606 (name "utfcpp")
f9c84cd4 607 (version "2.3.5")
f17a5447 608 (source (origin
d0f3ccf6
EF
609 (method git-fetch)
610 (uri (git-reference
611 (url "https://github.com/nemtrif/utfcpp")
612 (commit (string-append "v" version))))
613 (file-name (git-file-name name version))
f17a5447
AG
614 (sha256
615 (base32
d0f3ccf6 616 "1gr98d826z6wa58r1s5i7rz7q2x3r31v7zj0pjjlrc7gfxwklr4s"))))
f9c84cd4 617 (build-system cmake-build-system)
f17a5447 618 (arguments
f9c84cd4
TGR
619 `(#:out-of-source? #f
620 #:phases
621 (modify-phases %standard-phases
622 (replace 'install ; no install target
623 (lambda* (#:key outputs #:allow-other-keys)
624 (let* ((out (assoc-ref outputs "out"))
625 (include (string-append out "/include"))
626 (doc (string-append out "/share/doc/" ,name)))
627 (copy-recursively "source" include)
628 (install-file "README.md" doc)
629 #t))))))
f17a5447
AG
630 (home-page "https://github.com/nemtrif/utfcpp")
631 (synopsis "Portable C++ library for handling UTF-8")
632 (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
633in a portable way.")
634 (license license:boost1.0)))
8888fe82 635
636(define-public dbacl
637 (package
638 (name "dbacl")
9a71213e 639 (version "1.14.1")
8888fe82 640 (source
641 (origin
642 (method url-fetch)
9a71213e 643 (uri (string-append "mirror://sourceforge/dbacl/dbacl/" version "/"
50b01dcf 644 "dbacl-" version ".tar.gz"))
8888fe82 645 (sha256
9a71213e
TGR
646 (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
647 (patches (search-patches "dbacl-include-locale.h.patch"))))
8888fe82 648 (build-system gnu-build-system)
649 (arguments
650 `(#:make-flags
651 (list
652 (string-append "-I" (assoc-ref %build-inputs "slang")
653 "/include/slang")
654 (string-append "-I" (assoc-ref %build-inputs "ncurses")
655 "/include/ncurses"))
656 #:phases
657 (modify-phases %standard-phases
658 (add-after 'unpack 'delete-sample6-and-japanese
659 (lambda _
660 (substitute* "doc/Makefile.am"
661 (("sample6.txt") "")
662 (("japanese.txt") ""))
663 (delete-file "doc/sample6.txt")
664 (delete-file "doc/japanese.txt")
665 (substitute* (list "src/tests/Makefile.am"
666 "src/tests/Makefile.in")
667 (("dbacl-jap.shin") "")
668 (("dbacl-jap.sh") ""))
669 #t))
670 (add-after 'unpack 'delete-test
671 ;; See comments about the license.
672 (lambda _
db317b38
TGR
673 (delete-file "src/tests/dbacl-jap.shin")
674 #t))
8888fe82 675 (add-after 'unpack 'fix-test-files
676 (lambda* (#:key inputs outputs #:allow-other-keys)
677 (let* ((out (assoc-ref outputs "out"))
678 (bin (string-append out "/bin")))
679 (substitute* (find-files "src/tests/" "\\.shin$")
680 (("PATH=/bin:/usr/bin")
681 "#PATH=/bin:/usr/bin")
682 (("diff") (string-append (which "diff")))
683 (("tr") (string-append (which "tr"))))
9a71213e
TGR
684 #t)))
685 (replace 'bootstrap
686 (lambda _
687 (invoke "autoreconf" "-vif")
688 #t)))))
8888fe82 689 (inputs
690 `(("ncurses" ,ncurses)
691 ("perl" ,perl)
692 ("readline" ,readline)
693 ("slang" ,slang)))
694 (native-inputs
695 `(("libtool" ,libtool)
696 ("autoconf" ,autoconf)
697 ("automake" ,automake)
698 ("pkg-config" ,pkg-config)))
7314a547 699 (home-page "https://www.lbreyer.com/dbacl.html")
8888fe82 700 (synopsis "Bayesian text and email classifier")
701 (description
702 "dbacl is a fast Bayesian text and email classifier. It builds a variety
703of language models using maximum entropy (minimum divergence) principles, and
704these can then be used to categorize input data automatically among multiple
705categories.")
706 ;; The software is licensed as GPLv3 or later, but
707 ;; includes various sample texts in the doc dir:
708 ;; - sample1.txt, sample3 and sampe5.txt are in the public domain,
709 ;; by Mark Twain.
710 ;; - sample2.txt, sample4.txt are in the public domain, by Aristotle.
711 ;; - sample6.txt is a forwarded email, copyright unknown.
712 ;; Guix does exclude sample6.txt.
713 ;; - japanese.txt is a Japanese unoffical translation of the
714 ;; GNU General Public License, (c) by the Free Software Foundation.
715 ;; Guix excludes this file.
716 (license (list license:gpl3+ license:public-domain))))
0905048a
MB
717
718(define-public dotconf
719 (package
720 (name "dotconf")
721 (version "1.3")
722 (source (origin
08bc7f26
RW
723 (method git-fetch)
724 (uri (git-reference
b0e7b699 725 (url "https://github.com/williamh/dotconf")
08bc7f26
RW
726 (commit (string-append "v" version))))
727 (file-name (git-file-name name version))
0905048a
MB
728 (sha256
729 (base32
08bc7f26 730 "1sc95hw5k2xagpafny0v35filmcn05k1ds5ghkldfpf6xw4hakp7"))))
0905048a 731 (build-system gnu-build-system)
7a52d0e0 732 (arguments `(#:tests? #f)) ; FIXME maketest.sh does not work.
0905048a
MB
733 (native-inputs
734 `(("autoconf" ,autoconf)
735 ("automake" ,automake)
736 ("libtool" ,libtool)))
737 (home-page "https://github.com/williamh/dotconf")
738 (synopsis "Configuration file parser library")
739 (description
740 "C library for creating and parsing configuration files.")
741 (license (list license:lgpl2.1 ; Main distribution.
742 license:asl1.1)))) ; src/readdir.{c,h}
ff3f6766 743
7f05493d
MC
744(define-public drm-tools
745 (package
746 (name "drm-tools")
747 (version "1.1.33")
748 (source (origin
749 (method url-fetch)
750 (uri (string-append "mirror://sourceforge/drmtools/drm_tools-"
751 version ".tar.gz"))
752 (sha256
753 (base32
754 "187zbxw21zcg8gpyc13gxlycfw0n05a6rmqq6im5wr9zk1v1wj80"))))
755 (build-system cmake-build-system)
756 (arguments
757 `(#:tests? #f ;the test suite fails
758 #:phases (modify-phases %standard-phases
759 (add-after 'unpack 'set-install-prefixes
760 (lambda* (#:key outputs #:allow-other-keys)
761 (let* ((out (assoc-ref outputs "out")))
762 (substitute* "CMakeLists.txt"
763 (("tmp/testinstall")
764 (string-drop out 1))
765 (("/man/man1")
766 "/share/man/man1"))
767 #t)))
768 (add-after 'unpack 'adjust-test-paths
769 (lambda _
770 (substitute* '("test_extract_increment.sh"
771 "test_extract_features.sh"
772 "test_extract_features2.sh"
773 "test_dmath.sh")
774 (("\\./extract") "extract")
775 (("\\./dmath") "dmath")
776 (("/usr/local/bin/") "")
777 (("/bin/rm") "rm")
778 (("/bin/cp") "cp"))
779 #t))
780 (delete 'check)
781 ;; The produced binaries are written directly to %output/bin.
782 (delete 'install)
783 (add-after 'build 'check
784 (lambda* (#:key outputs tests? #:allow-other-keys)
785 (when tests?
786 (let* ((out (assoc-ref outputs "out"))
787 (bin (string-append out "/bin")))
788 (setenv "PATH" (string-append bin ":"
789 (getenv "PATH")))
790 (with-directory-excursion
791 (format #f "../drm_tools-~a" ,version)
792 (invoke "sh" "test_all.sh")))))))))
793 (native-inputs `(("which" ,which))) ;for tests
794 (inputs `(("pcre" ,pcre)))
795 (home-page "http://drmtools.sourceforge.net/")
796 (synopsis "Utilities to manipulate text and binary files")
797 (description "The drm_tools package contains the following commands:
798@table @command
799@item accudate
800An extended version of the \"date\" program that has sub-second accuracy.
801@item binformat
802Format complex binary data into text.
803@item binload
804Load data into a binary file using simple commands from the input.
805@item binorder
806Sort, merge, search, retrieve or generate test data consisting of fixed size
807binary records.
808@item binreplace
809Find or find/replace in binary files.
810@item binsplit
811Split test data consisting of fixed size binary records into one or more
812output streams.
813@item chardiff
814Find changes between two files at the character level. Unlike \"diff\", it
815lists just the characters that differ, so if the 40,000th character is
816different only that one character will be shown, not the entire line.
817@item columnadd
818Add columns of integers, decimals, and/or times.
819@item datasniffer
820A utility for formatting binary data dumps.
821@item dmath
822Double precision interactive command line math calculator.
823@item extract
824Extract and emit data from text files based on character or token position.
825@item execinput
826A utility that reads from STDIN and executes each line as a command in a
827sub-process.
828@item indexed_text
829A utility for rapid retrieval of text by line numbers, in any order, from a
830text file.
831@item mdump
832Format binary data.
833@item msgqueue
834Create message queues and send/receive messages.
835@item mbin
836@itemx mbout
837Multiple buffer in and out. Used for buffering a lot of data between a slow
838device and a fast device. Mostly for buffering streaming tape drives for use
839with slower network connections, so that streaming is maintained as much as
840possible to minimize wear on the tape device.
841@item pockmark
842Corrupt data streams - useful for testing error correction and data recovery.
843@item tarsieve
844Filter, list, or split a tar file.
845@end table")
846 (license license:gpl2+)))
847
ff3f6766
RW
848(define-public java-rsyntaxtextarea
849 (package
850 (name "java-rsyntaxtextarea")
851 (version "2.6.1")
852 (source (origin
853 (method url-fetch)
854 (uri (string-append "https://github.com/bobbylight/"
855 "RSyntaxTextArea/archive/"
856 version ".tar.gz"))
857 (file-name (string-append name "-" version ".tar.gz"))
858 (sha256
859 (base32
860 "0c5mqg2klj5rvf8fhycrli8rf6s37l9p7a8knw9gpp65r1c120q2"))))
861 (build-system ant-build-system)
862 (arguments
863 `(;; FIXME: some tests fail because locale resources cannot be found.
864 ;; Even when I add them to the class path,
865 ;; RSyntaxTextAreaEditorKitDumbCompleteWordActionTest fails.
866 #:tests? #f
867 #:jar-name "rsyntaxtextarea.jar"))
868 (native-inputs
869 `(("java-junit" ,java-junit)
870 ("java-hamcrest-core" ,java-hamcrest-core)))
871 (home-page "https://bobbylight.github.io/RSyntaxTextArea/")
872 (synopsis "Syntax highlighting text component for Java Swing")
873 (description "RSyntaxTextArea is a syntax highlighting, code folding text
874component for Java Swing. It extends @code{JTextComponent} so it integrates
875completely with the standard @code{javax.swing.text} package. It is fast and
876efficient, and can be used in any application that needs to edit or view
877source code.")
878 (license license:bsd-3)))
03639d03
RW
879
880;; We use the sources from git instead of the tarball from pypi, because the
881;; latter does not include the Cython source file from which bycython.cpp is
882;; generated.
883(define-public python-editdistance
884 (let ((commit "3ea84a7dd3258c76aa3be851ef3d50e59c886846")
885 (revision "1"))
886 (package
887 (name "python-editdistance")
888 (version (string-append "0.3.1-" revision "." (string-take commit 7)))
889 (source
890 (origin
891 (method git-fetch)
892 (uri (git-reference
b0e7b699 893 (url "https://github.com/aflc/editdistance")
03639d03 894 (commit commit)))
54335b59 895 (file-name (git-file-name name version))
03639d03
RW
896 (sha256
897 (base32
898 "1l43svsv12crvzphrgi6x435z6xg8m086c64armp8wzb4l8ccm7g"))))
899 (build-system python-build-system)
900 (arguments
901 `(#:phases
902 (modify-phases %standard-phases
903 (add-after 'unpack 'build-cython-code
904 (lambda _
905 (with-directory-excursion "editdistance"
906 (delete-file "bycython.cpp")
54d5b27e 907 (invoke "cython" "--cplus" "bycython.pyx")))))))
03639d03
RW
908 (native-inputs
909 `(("python-cython" ,python-cython)))
910 (home-page "https://www.github.com/aflc/editdistance")
911 (synopsis "Fast implementation of the edit distance (Levenshtein distance)")
912 (description
913 "This library simply implements Levenshtein distance algorithm with C++
914and Cython.")
915 (license license:expat))))
03f801aa
CB
916
917(define-public go-github.com-mattn-go-runewidth
d050000a
BL
918 (let ((commit "703b5e6b11ae25aeb2af9ebb5d5fdf8fa2575211")
919 (version "0.0.4")
920 (revision "1"))
921 (package
922 (name "go-github.com-mattn-go-runewidth")
923 (version (git-version version revision commit))
924 (source
925 (origin
926 (method git-fetch)
927 (uri (git-reference
928 (url "https://github.com/mattn/runewidth")
929 (commit commit)))
930 (file-name (git-file-name name version))
931 (sha256
932 (base32
933 "0znpyz71gajx3g0j2zp63nhjj2c07g16885vxv4ykwnrfmzbgk4w"))))
934 (build-system go-build-system)
935 (arguments
936 '(#:import-path "github.com/mattn/go-runewidth"))
937 (synopsis "@code{runewidth} provides Go functions to work with string widths")
938 (description
939 "The @code{runewidth} library provides Go functions for padding,
940measuring and checking the width of strings, with support for East Asian
941text.")
942 (home-page "https://github.com/mattn/runewidth")
943 (license license:expat))))
74fa77e9
PN
944
945(define-public docx2txt
946 (package
947 (name "docx2txt")
948 (version "1.4")
949 (source (origin
950 (method url-fetch)
951 (uri (string-append
952 "mirror://sourceforge/docx2txt/docx2txt/v"
953 version "/docx2txt-" version ".tgz"))
954 (sha256
955 (base32
956 "06vdikjvpj6qdb41d8wzfnyj44jpnknmlgbhbr1w215420lpb5xj"))))
957 (build-system gnu-build-system)
958 (inputs
959 `(("unzip" ,unzip)
960 ("perl" ,perl)))
961 (arguments
962 `(#:tests? #f ; No tests.
963 #:make-flags (list (string-append "BINDIR="
964 (assoc-ref %outputs "out") "/bin")
965 (string-append "CONFIGDIR="
966 (assoc-ref %outputs "out") "/etc")
967 ;; Makefile seems to be a bit dumb at guessing.
968 (string-append "INSTALL=install")
969 (string-append "PERL=perl"))
970 #:phases
971 (modify-phases %standard-phases
972 (delete 'configure)
973 (add-after 'install 'fix-install
974 (lambda* (#:key outputs inputs #:allow-other-keys)
975 (let* ((out (assoc-ref outputs "out"))
976 (bin (string-append out "/bin"))
977 (config (string-append out "/etc/docx2txt.config"))
978 (unzip (assoc-ref inputs "unzip")))
979 ;; According to INSTALL, the .sh wrapper can be skipped.
980 (delete-file (string-append bin "/docx2txt.sh"))
981 (rename-file (string-append bin "/docx2txt.pl")
982 (string-append bin "/docx2txt"))
983 (substitute* config
984 (("config_unzip => '/usr/bin/unzip',")
985 (string-append "config_unzip => '"
986 unzip
987 "/bin/unzip',")))
988 ;; Makefile is wrong.
f6ccb95a
TGR
989 (chmod config #o644)
990 #t))))))
74fa77e9
PN
991 (synopsis "Recover text from @file{.docx} files, with good formatting")
992 (description
993 "@command{docx2txt} is a Perl based command line utility to convert
994Microsoft Office @file{.docx} documents to equivalent text documents. Latest
995version supports following features during text extraction.
996
997@itemize
998@item Character conversions; currency characters are converted to respective
999names like Euro.
1000@item Capitalisation of text blocks.
1001@item Center and right justification of text fitting in a line of
1002(configurable) 80 columns.
1003@item Horizontal ruler, line breaks, paragraphs separation, tabs.
1004@item Indicating hyperlinked text along with the hyperlink (configurable).
1005@item Handling (bullet, decimal, letter, roman) lists along with (attempt at)
1006indentation.
1007@end itemize\n")
1008 (home-page "http://docx2txt.sourceforge.net")
1009 (license license:gpl3+)))
1a0363cf 1010
bc5aa386
VC
1011(define-public odt2txt
1012 (package
1013 (name "odt2txt")
1014 (version "0.5")
1015 (source
1016 (origin
1017 (method git-fetch)
1018 (uri (git-reference
1019 (url "https://github.com/dstosberg/odt2txt/")
1020 (commit (string-append "v" version))))
1021 (file-name (git-file-name name version))
1022 (sha256
1023 (base32
1024 "0im3kzvhxkjlx57w6h13mc9584c74ma1dyymgvpq2y61av3gc35v"))))
1025 (build-system gnu-build-system)
1026 (arguments
1027 `(#:tests? #f ; no make check
1028 #:make-flags (list "CC=gcc"
1029 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
1030 #:phases
1031 (modify-phases %standard-phases
1032 ;; no configure script
1033 (delete 'configure))))
1034 (inputs
1035 `(("zlib" ,zlib)))
1036 (home-page "https://github.com/dstosberg/odt2txt/")
1037 (synopsis "Converter from OpenDocument Text to plain text")
1038 (description "odt2txt is a command-line tool which extracts the text out
1039of OpenDocument Texts, as produced by OpenOffice.org, KOffice, StarOffice and
1040others.
1041
1042odt2txt can also extract text from some file formats similar to OpenDocument
1043Text, such as OpenOffice.org XML (*.sxw), which was used by OpenOffice.org
1044version 1.x and older StarOffice versions. To a lesser extent, odt2txt may be
1045useful to extract content from OpenDocument spreadsheets (*.ods) and
1046OpenDocument presentations (*.odp).")
1047 (license license:gpl2)))
1048
1a0363cf
MP
1049(define-public opencc
1050 (package
1051 (name "opencc")
1052 (version "1.0.5")
1053 (source
1054 (origin
bf5af934
EF
1055 (method git-fetch)
1056 (uri (git-reference
1057 (url "https://github.com/BYVoid/OpenCC")
1058 (commit (string-append "ver." version))))
1059 (file-name (git-file-name name version))
1a0363cf 1060 (sha256
1506d491
EF
1061 (base32
1062 "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4"))
1063 (modules '((guix build utils)))
1064 (snippet
1065 '(begin
1066 ;; TODO: Unbundle tclap, darts-clone, gtest
1067 (delete-file-recursively "deps/rapidjson-0.11") #t))))
1a0363cf 1068 (build-system cmake-build-system)
1506d491
EF
1069 (arguments
1070 '(#:phases
1071 (modify-phases %standard-phases
1072 (add-after 'unpack 'patch-3rd-party-references
1073 (lambda* (#:key inputs #:allow-other-keys)
1074 (let ((rapidjson (assoc-ref inputs "rapidjson")))
1075 (substitute* "src/CMakeLists.txt"
1076 (("../deps/rapidjson-0.11")
1077 (string-append rapidjson "/include/rapidjson")))
1078 #t))))))
1a0363cf 1079 (native-inputs
1506d491
EF
1080 `(("python" ,python-wrapper)
1081 ("rapidjson" ,rapidjson)))
1a0363cf
MP
1082 (home-page "https://github.com/BYVoid/OpenCC")
1083 (synopsis "Convert between Traditional Chinese and Simplified Chinese")
1084 (description "Open Chinese Convert (OpenCC) converts between Traditional
1085Chinese and Simplified Chinese, supporting character-level conversion,
1086phrase-level conversion, variant conversion, and regional idioms among
1087Mainland China, Taiwan, and Hong-Kong.")
1088 (license license:asl2.0)))
933ac939
YA
1089
1090(define-public nkf
1091 (let ((commit "08043eadf4abdddcf277842217e3c77a24740dc2")
1092 (revision "1"))
1093 (package
1094 (name "nkf")
1095 ;; The commits corresponding to specific versions are published
1096 ;; here:
1097 ;; https://ja.osdn.net/projects/nkf/scm/git/nkf/
1098 (version "2.1.5")
1099 (source (origin
1100 (method git-fetch)
1101 (uri (git-reference
b0e7b699 1102 (url "https://github.com/nurse/nkf")
933ac939
YA
1103 (commit commit)))
1104 (file-name (git-file-name name version))
1105 (sha256
1106 (base32
1107 "0anw0knr1iy4p9w3d3b3pbwzh1c43p1i2q4c28kw9zviw8kx2rly"))))
1108 (build-system gnu-build-system)
1109 (arguments
1110 `(#:tests? #f ; test for perl module
1111 #:make-flags (list "CC=gcc" "CFLAGS=-O2 -Wall -pedantic"
1112 (string-append "prefix=" %output)
1113 "MKDIR=mkdir -p")
1114 #:phases
1115 (modify-phases %standard-phases
1116 (delete 'configure)))) ; No ./configure script
1117 (home-page "https://ja.osdn.net/projects/nkf/")
1118 (synopsis "Network Kanji Filter")
1119 (description "Nkf is yet another kanji code converter among networks,
1120hosts and terminals. It converts input kanji code to designated kanji code
1121such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 or UTF-32.")
1122 (license license:zlib))))
74247b80
NG
1123
1124(define-public python-pandocfilters
1125 (package
1126 (name "python-pandocfilters")
1127 (version "1.4.2")
1128 (source
1129 (origin
1130 (method url-fetch)
1131 (uri (pypi-uri "pandocfilters" version))
1132 (sha256
1133 (base32
1134 "1a8d9b7s48gmq9zj0pmbyv2sivn5i7m6mybgpkk4jm5vd7hp1pdk"))))
1135 (build-system python-build-system)
1136 (home-page "https://github.com/jgm/pandocfilters")
1137 (synopsis "Python module for writing Pandoc filters")
1138 (description "Pandoc is a powerful utility to transform various
1139input formats into a wide range of output formats. To alter the
1140exported output document, Pandoc allows the usage of filters, which
1141are pipes that read a JSON serialization of the Pandoc AST from stdin,
1142transform it in some way, and write it to stdout. It allows therefore
1143to alter the processing of Pandoc's supported input formats, for
1144instance one can add new syntax elements to markdown, etc.
1145
1146This package provides Python bindings.")
1147 (license license:bsd-3)))
24719e8a
1148
1149(define-public aha
1150 (package
1151 (name "aha")
7d98468c 1152 (version "0.5.1")
24719e8a
1153 (source
1154 (origin
1155 (method git-fetch)
1156 (uri (git-reference
1157 (url "https://github.com/theZiz/aha")
1158 (commit version)))
1159 (sha256
7d98468c 1160 (base32 "1gywad0rvvz3c5balz8cxsnx0562hj2ngzqyr8zsy2mb4pn0lpgv"))
24719e8a
1161 (file-name (git-file-name name version))))
1162 (build-system gnu-build-system)
1163 (arguments
3a176be0 1164 `(#:phases
24719e8a
1165 (modify-phases %standard-phases
1166 (delete 'configure))
3a176be0 1167 #:make-flags (list (string-append "CC=" ,(cc-for-target))
24719e8a
1168 (string-append "PREFIX="
1169 (assoc-ref %outputs "out")))
7d98468c 1170 #:tests? #f)) ; no test suite
24719e8a
1171 (home-page "https://github.com/theZiz/aha")
1172 (synopsis "Converts terminal escape sequences to HTML")
1173 (description "@command{aha} (Ansi Html Adapter) converts ANSI escape sequences
1174of a Unix terminal to HTML code.")
1175 (license (list license:lgpl2.0+ license:mpl1.1))))