gnu: r-zellkonverter: Update to 1.6.5.
[jackhill/guix/guix.git] / gnu / packages / textutils.scm
index 8510c6d..2264e3c 100644 (file)
@@ -1,24 +1,30 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
-;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016 ng0 <ng0@n0.is>
-;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Nikita <nikita@n0.is>
+;;; Copyright © 2016, 2020 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2017,2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
-;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
 ;;; Copyright © 2019 Yoshinori Arai <kumagusu08@gmail.com>
 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
+;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages java)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages slang)
+  #:use-module (gnu packages syncthing)
   #:use-module (gnu packages web))
 
 (define-public dos2unix
   (package
     (name "dos2unix")
-    (version "7.4.1")
+    (version "7.4.3")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://waterlan.home.xs4all.nl/dos2unix/"
                            "dos2unix-" version ".tar.gz"))
        (sha256
-        (base32 "08w6yywzirsxq8bh87jycvvw922ybhc2l426j2iqzliyn1h8mm8w"))))
+        (base32 "0wnacvz99rnlx0ayf5jrxwljvh801r8k1ai3hj137yfsaqcv93dn"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:make-flags (list "CC=gcc"
-                          (string-append "prefix=" (assoc-ref %outputs "out")))
+     `(#:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "prefix=" (assoc-ref %outputs "out")))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)))) ; no configure script
@@ -102,8 +118,7 @@ to DOS format and vice versa.")
         (base32 "0m59sd1ca0zw1aydpc3m8sw03nc885knmccqryg7byzmqs585ia6"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("python" ,python)
-       ("python-cython" ,python-cython)))
+     (list python python-cython))
     (home-page "https://github.com/rrthomas/recode")
     (synopsis "Text encoding converter")
     (description "The Recode library converts files between character sets and
@@ -140,7 +155,7 @@ libenca and several charset conversion libraries and tools.")
 (define-public utf8proc
   (package
     (name "utf8proc")
-    (version "2.4.0")
+    (version "2.5.0")
     (source
      (origin
        (method git-fetch)
@@ -149,26 +164,29 @@ libenca and several charset conversion libraries and tools.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1i42hqwc8znqii9brangwkxk5cyc2lk95ip405fg88zr7z2ncr34"))))
+        (base32 "1xlkazhdnja4lksn5c9nf4bln5gjqa35a8gwlam5r0728w0h83qq"))))
     (build-system gnu-build-system)
-    (native-inputs           ;test data that is otherwise downloaded with curl
-     `(("NormalizationTest.txt"
-        ,(origin
-           (method url-fetch)
-           (uri (string-append "https://www.unicode.org/Public/12.1.0/ucd/"
-                               "NormalizationTest.txt"))
-           (sha256
-            (base32 "0hb97k9xv1lr847hwz0719ksqy39s47xw6k01dgs1368jdibvawc"))))
-       ("GraphemeBreakTest.txt"
-        ,(origin
-           (method url-fetch)
-           (uri (string-append "https://www.unicode.org/Public/12.1.0/ucd/"
-                               "auxiliary/GraphemeBreakTest.txt"))
-           (sha256
-            (base32 "0qc90ppmrwfn3y9cdn8jcjrn7qpdf0fhxkwh945yp4rvh37mbgcm"))))
+    (native-inputs
+     (let ((UNICODE_VERSION "13.0.0"))  ; defined in data/Makefile
+       ;; Test data that is otherwise downloaded with curl.
+       `(("NormalizationTest.txt"
+          ,(origin
+             (method url-fetch)
+             (uri (string-append "https://www.unicode.org/Public/"
+                                 UNICODE_VERSION "/ucd/NormalizationTest.txt"))
+             (sha256
+              (base32 "07g0ya4f6zfzvpp24ccxkb2yq568kh83gls85rjl950nv5fya3nn"))))
+         ("GraphemeBreakTest.txt"
+          ,(origin
+             (method url-fetch)
+             (uri (string-append "https://www.unicode.org/Public/"
+                                 UNICODE_VERSION
+                                 "/ucd/auxiliary/GraphemeBreakTest.txt"))
+             (sha256
+              (base32 "07f8rrvcsq4pibdz6zxggxy8w7zjjqyw2ggclqlhalyv45yv7prj"))))
 
-       ;; For tests.
-       ("perl" ,perl)))
+         ;; For tests.
+         ("perl" ,perl))))
     (arguments
      '(#:make-flags (list "CC=gcc"
                           (string-append "prefix=" (assoc-ref %outputs "out")))
@@ -192,10 +210,50 @@ normalization, case-folding, and other operations for data in the UTF-8
 encoding, supporting Unicode version 9.0.0.")
     (license license:expat)))
 
+(define-public utf8proc-2.6.1
+  (package
+    (inherit utf8proc)
+    (name "utf8proc")
+    (version "2.6.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaStrings/utf8proc")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1zqc6airkzkssbjxanx5v8blfk90180gc9id0dx8ncs54f1ib8w7"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments utf8proc)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'check-data
+             (lambda* (#:key inputs native-inputs #:allow-other-keys)
+               (display native-inputs)
+               (for-each (lambda (i)
+                           (copy-file (assoc-ref (or native-inputs inputs) i)
+                                      (string-append "data/" i)))
+                         '("NormalizationTest.txt" "GraphemeBreakTest.txt"
+                           "DerivedCoreProperties.txt"))))))))
+    (native-inputs
+     (append
+      (package-native-inputs utf8proc)
+      (let ((UNICODE_VERSION "13.0.0"))
+        `(("DerivedCoreProperties.txt"
+           ,(origin
+              (method url-fetch)
+              (uri (string-append "https://www.unicode.org/Public/"
+                                  UNICODE_VERSION "/ucd/DerivedCoreProperties.txt"))
+              (sha256
+               (base32 "0j12x112cd8fpgazkc8izxnhhpia44p1m36ff8yapslxndcmzm55"))))
+          ;; For tests
+          ("ruby" ,ruby)))))))
+
 (define-public libconfuse
   (package
     (name "libconfuse")
-    (version "3.2.2")
+    (version "3.3")
     (source
      (origin
        (method url-fetch)
@@ -203,8 +261,10 @@ encoding, supporting Unicode version 9.0.0.")
                            "releases/download/v" version
                            "/confuse-" version ".tar.xz"))
        (sha256
-        (base32 "02r1mmzik2m0iigbc2da3y754vj24i18r3ml5p2wzs027mjhn959"))))
+        (base32 "043hqqykpprgrkw9s2hbdlxr308a7yxwsgxj4m8aadg1401hmm8x"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("--disable-static")))
     (home-page "https://github.com/martinh/libconfuse")
     (synopsis "Configuration file parser library")
     (description "libconfuse is a configuration file parser library.  It
@@ -228,14 +288,25 @@ nested include statements).")
         (base32 "0jiybkb2z58wa2msvllnphr4js2hvjvh988pavb3mzkgr6ihwbkr"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (replace 'bootstrap
-           (lambda _ (invoke "sh" "reconf"))))))
+           (lambda _ (invoke "sh" "reconf")))
+         (add-after 'set-paths 'hide-default-gcc
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs "gcc")))
+               ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
+               ;; conflicts with the GCC 5 input.
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gcc "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
+                        ":"))
+               #t))))))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
-       ("gcc" ,gcc-5) ;; doesn't build with later versions
+       ("gcc@5" ,gcc-5) ; doesn't build with later versions
        ("libtool" ,libtool)))
     (home-page "https://github.com/agordon/libgtextutils")
     (synopsis "Gordon's text utils library")
@@ -252,7 +323,7 @@ the Hannon Lab.")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-                      (url "https://github.com/google/cityhash.git")
+                      (url "https://github.com/google/cityhash")
                       (commit commit)))
                 (file-name (string-append name "-" version ".tar.gz"))
                 (sha256
@@ -293,7 +364,7 @@ input bits thoroughly but are not suitable for cryptography.")
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
-       (list "CC=gcc"
+       (list (string-append "CC=" ,(cc-for-target))
              "HIDE="
              ;; Override "/sbin/ldconfig" with "echo" because we don't need
              ;; "ldconfig".
@@ -302,6 +373,23 @@ input bits thoroughly but are not suitable for cryptography.")
              "all-shared")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-cross-compilation
+           ;; The Makefile contains more insults than cross-compilation support.
+           ;; It poorly reinvents autotools by compiling C programmes with $CC,
+           ;; then tries to run them during the build.  Hard-code the results.
+           (lambda _
+             (substitute* "Makefile"
+               (("\\./autoconf_64b")
+                ,(if (target-64bit? (or (%current-target-system)
+                                        (%current-system)))
+                     "echo 1"
+                     "echo 0"))
+               (("\\./autoconf_vsnprintf") "echo 0"))))
+         (add-after 'unpack 'omit-static-libraries
+           ;; These are needed to build & test ustr, but don't install them.
+           (lambda _
+             (substitute* "Makefile"
+               ((".*install.*LIB_STATIC.*") ""))))
          (add-after 'unpack 'disable-check-for-stdint
            (lambda _
              ;; Of course we have stdint.h, just not in /usr/include
@@ -335,7 +423,7 @@ input bits thoroughly but are not suitable for cryptography.")
         (base32 "0dc9fxcdmppbs9s06jvq61zbk552laxps0xyk098gj41697ihd96"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("gettext" ,gettext-minimal)))
+     (list gettext-minimal))
     (home-page "https://billposer.org/Software/a2b.html")
     (synopsis "Convert between ASCII, hexadecimal and binary representations")
     (description "The two programs are useful for generating test data, for
@@ -393,8 +481,7 @@ useful when it is desired to reformat numbers.
                  (("^iconv ") (string-append iconv "/bin/iconv ")))
              #t))))))
     (inputs
-     `(("ascii2binary" ,ascii2binary)
-       ("libiconv" ,libiconv)))
+     (list ascii2binary libiconv))
     (home-page "https://billposer.org/Software/unidesc.html")
     (synopsis "Find out what is in a Unicode file")
     (description "Useful tools when working with Unicode files when one
@@ -431,7 +518,7 @@ character-by-character.
 (define-public libconfig
   (package
     (name "libconfig")
-    (version "1.7.2")
+    (version "1.7.3")
     (home-page "https://hyperrealm.github.io/libconfig/")
     (source (origin
               (method url-fetch)
@@ -439,7 +526,7 @@ character-by-character.
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1ngs2qx3cx5cbwinc5mvadly0b5n7s86zsc68c404czzfff7lg3w"))))
+                "1rqynfxl1zxwk4b42sniz9xlw285aidcrsfih51p8dy0rbb6clal"))))
     (build-system gnu-build-system)
     (synopsis "C/C++ configuration file library")
     (description
@@ -476,16 +563,21 @@ as existing hashing techniques, with provably negligible risk of collisions.")
 (define-public oniguruma
   (package
     (name "oniguruma")
-    (version "6.9.4")
+    (version "6.9.5-rev1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/kkos/"
-                                  "oniguruma/releases/download/v" version
+                                  "oniguruma/releases/download/v"
+                                  ;; If there is a "-" in the version, convert
+                                  ;; to underscore for this part of the URI.
+                                  (string-map (lambda (c) (if (char=? #\- c) #\_ c))
+                                              version)
                                   "/onig-" version ".tar.gz"))
               (sha256
                (base32
-                "0lvd1rpp49i0k1icblb0i76lj2cwmhf1c5p1jdz2m6g0ywpx4sa6"))))
+                "17m92k1n6bvza6m35fpd5g36zwpwm3hfz3478iwj5bvj2sfq8g6k"))))
     (build-system gnu-build-system)
+    (arguments '(#:configure-flags '("--disable-static")))
     (home-page "https://github.com/kkos/oniguruma")
     (synopsis "Regular expression library")
     (description "Oniguruma is a regular expressions library.  The special
@@ -612,15 +704,15 @@ in a portable way.")
 (define-public dbacl
   (package
     (name "dbacl")
-    (version "1.14")
+    (version "1.14.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "http://www.lbreyer.com/gpl/"
+       (uri (string-append "mirror://sourceforge/dbacl/dbacl/" version "/"
                            "dbacl-" version ".tar.gz"))
        (sha256
-        (base32
-         "0224g6x71hyvy7jikfxmgcwww1r5lvk0jx36cva319cb9nmrbrq7"))))
+        (base32 "1gas0112wqjvwn9qg3hxnawk7h3prr0w9b2h68f3p1ifd1kzn3gz"))
+       (patches (search-patches "dbacl-include-locale.h.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
@@ -648,10 +740,6 @@ in a portable way.")
            (lambda _
              (delete-file "src/tests/dbacl-jap.shin")
              #t))
-         (add-after 'delete-sample6-and-japanese 'autoreconf
-           (lambda _
-             (invoke "autoreconf" "-vif")
-             #t))
          (add-after 'unpack 'fix-test-files
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -661,17 +749,15 @@ in a portable way.")
                   "#PATH=/bin:/usr/bin")
                  (("diff") (string-append (which "diff")))
                  (("tr") (string-append (which "tr"))))
-               #t))))))
+               #t)))
+         (replace 'bootstrap
+           (lambda _
+             (invoke "autoreconf" "-vif")
+             #t)))))
     (inputs
-     `(("ncurses" ,ncurses)
-       ("perl" ,perl)
-       ("readline" ,readline)
-       ("slang" ,slang)))
+     (list ncurses perl readline slang))
     (native-inputs
-     `(("libtool" ,libtool)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("pkg-config" ,pkg-config)))
+     (list libtool autoconf automake pkg-config))
     (home-page "https://www.lbreyer.com/dbacl.html")
     (synopsis "Bayesian text and email classifier")
     (description
@@ -698,7 +784,7 @@ categories.")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/williamh/dotconf.git")
+                    (url "https://github.com/williamh/dotconf")
                     (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
@@ -707,9 +793,7 @@ categories.")
     (build-system gnu-build-system)
     (arguments `(#:tests? #f))  ; FIXME maketest.sh does not work.
     (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)))
+     (list autoconf automake libtool))
     (home-page "https://github.com/williamh/dotconf")
     (synopsis "Configuration file parser library")
     (description
@@ -717,19 +801,123 @@ categories.")
     (license (list license:lgpl2.1         ; Main distribution.
                    license:asl1.1))))      ; src/readdir.{c,h}
 
+(define-public drm-tools
+  (package
+    (name "drm-tools")
+    (version "1.1.33")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/drmtools/drm_tools-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "187zbxw21zcg8gpyc13gxlycfw0n05a6rmqq6im5wr9zk1v1wj80"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;the test suite fails
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'set-install-prefixes
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (substitute* "CMakeLists.txt"
+                          (("tmp/testinstall")
+                           (string-drop out 1))
+                          (("/man/man1")
+                           "/share/man/man1"))
+                        #t)))
+                  (add-after 'unpack 'adjust-test-paths
+                    (lambda _
+                      (substitute* '("test_extract_increment.sh"
+                                     "test_extract_features.sh"
+                                     "test_extract_features2.sh"
+                                     "test_dmath.sh")
+                        (("\\./extract") "extract")
+                        (("\\./dmath") "dmath")
+                        (("/usr/local/bin/") "")
+                        (("/bin/rm") "rm")
+                        (("/bin/cp") "cp"))
+                      #t))
+                  (delete 'check)
+                  ;; The produced binaries are written directly to %output/bin.
+                  (delete 'install)
+                  (add-after 'build 'check
+                    (lambda* (#:key outputs tests? #:allow-other-keys)
+                      (when tests?
+                        (let* ((out (assoc-ref outputs "out"))
+                               (bin (string-append out "/bin")))
+                          (setenv "PATH" (string-append bin ":"
+                                                        (getenv "PATH")))
+                          (with-directory-excursion
+                              (format #f "../drm_tools-~a" ,version)
+                            (invoke "sh" "test_all.sh")))))))))
+    (native-inputs (list which)) ;for tests
+    (inputs (list pcre))
+    (home-page "http://drmtools.sourceforge.net/")
+    (synopsis "Utilities to manipulate text and binary files")
+    (description "The drm_tools package contains the following commands:
+@table @command
+@item accudate
+An extended version of the \"date\" program that has sub-second accuracy.
+@item binformat
+Format complex binary data into text.
+@item binload
+Load data into a binary file using simple commands from the input.
+@item binorder
+Sort, merge, search, retrieve or generate test data consisting of fixed size
+binary records.
+@item binreplace
+Find or find/replace in binary files.
+@item binsplit
+Split test data consisting of fixed size binary records into one or more
+output streams.
+@item chardiff
+Find changes between two files at the character level.  Unlike \"diff\", it
+lists just the characters that differ, so if the 40,000th character is
+different only that one character will be shown, not the entire line.
+@item columnadd
+Add columns of integers, decimals, and/or times.
+@item datasniffer
+A utility for formatting binary data dumps.
+@item dmath
+Double precision interactive command line math calculator.
+@item extract
+Extract and emit data from text files based on character or token position.
+@item execinput
+A utility that reads from STDIN and executes each line as a command in a
+sub-process.
+@item indexed_text
+A utility for rapid retrieval of text by line numbers, in any order, from a
+text file.
+@item mdump
+Format binary data.
+@item msgqueue
+Create message queues and send/receive messages.
+@item mbin
+@itemx mbout
+Multiple buffer in and out.  Used for buffering a lot of data between a slow
+device and a fast device.  Mostly for buffering streaming tape drives for use
+with slower network connections, so that streaming is maintained as much as
+possible to minimize wear on the tape device.
+@item pockmark
+Corrupt data streams - useful for testing error correction and data recovery.
+@item tarsieve
+Filter, list, or split a tar file.
+@end table")
+    (license license:gpl2+)))
+
 (define-public java-rsyntaxtextarea
   (package
     (name "java-rsyntaxtextarea")
     (version "2.6.1")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/bobbylight/"
-                                  "RSyntaxTextArea/archive/"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/bobbylight/RSyntaxTextArea")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0c5mqg2klj5rvf8fhycrli8rf6s37l9p7a8knw9gpp65r1c120q2"))))
+                "0dyflzvxq2wvs0rgqfyi5yzzrb6r4bzw2dm8cl304dakxk38ddys"))))
     (build-system ant-build-system)
     (arguments
      `(;; FIXME: some tests fail because locale resources cannot be found.
@@ -738,8 +926,7 @@ categories.")
        #:tests? #f
        #:jar-name "rsyntaxtextarea.jar"))
     (native-inputs
-     `(("java-junit" ,java-junit)
-       ("java-hamcrest-core" ,java-hamcrest-core)))
+     (list java-junit java-hamcrest-core))
     (home-page "https://bobbylight.github.io/RSyntaxTextArea/")
     (synopsis "Syntax highlighting text component for Java Swing")
     (description "RSyntaxTextArea is a syntax highlighting, code folding text
@@ -762,7 +949,7 @@ source code.")
        (origin
          (method git-fetch)
          (uri (git-reference
-               (url "https://github.com/aflc/editdistance.git")
+               (url "https://github.com/aflc/editdistance")
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
@@ -778,7 +965,7 @@ source code.")
                  (delete-file "bycython.cpp")
                  (invoke "cython" "--cplus" "bycython.pyx")))))))
       (native-inputs
-       `(("python-cython" ,python-cython)))
+       (list python-cython))
       (home-page "https://www.github.com/aflc/editdistance")
       (synopsis "Fast implementation of the edit distance (Levenshtein distance)")
       (description
@@ -786,6 +973,25 @@ source code.")
 and Cython.")
       (license license:expat))))
 
+(define-public txt2tags
+  (package
+    (name "txt2tags")
+    (version "3.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "txt2tags" version))
+              (sha256
+               (base32
+                "12hpnvdy7dgarq6ini9jp7dp2zcmvpax04zbl3jb84kd423r75i7"))))
+    (build-system python-build-system)
+    (native-inputs (list python-tox))
+    (home-page "https://txt2tags.org")
+    (synopsis "Convert between markup languages")
+    (description
+     "txt2tags is a document generator.  It reads a text file with minimal
+markup and converts it to multiple formats.")
+    (license license:gpl2)))
+
 (define-public go-github.com-mattn-go-runewidth
   (let ((commit "703b5e6b11ae25aeb2af9ebb5d5fdf8fa2575211")
         (version "0.0.4")
@@ -828,8 +1034,7 @@ text.")
                 "06vdikjvpj6qdb41d8wzfnyj44jpnknmlgbhbr1w215420lpb5xj"))))
     (build-system gnu-build-system)
     (inputs
-     `(("unzip" ,unzip)
-       ("perl" ,perl)))
+     (list unzip perl))
     (arguments
      `(#:tests? #f                      ; No tests.
        #:make-flags (list (string-append "BINDIR="
@@ -880,6 +1085,43 @@ indentation.
     (home-page "http://docx2txt.sourceforge.net")
     (license license:gpl3+)))
 
+(define-public html2text
+  ;; Use commit directly to get the fixes to the installation phase
+  ;; that are not in a release yet.
+  (let ((commit "05364c1028026a87d6f45130a8e86e1ee67704d2")
+        (revision "1"))
+    (package
+      (name "html2text")
+      (version (git-version "2.0.1_pre" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/grobian/html2text")
+               (commit (string-append commit))))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0n6pl0nijcn4z3p0dvf3gmvvpjq261pagnk84s9f78c4c55bw5cm"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags
+         (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             ;; The configure script is not from autotools and does not accept
+             ;; ‘--style’ options.  There is no proper error handling.
+             (lambda* (#:key outputs #:allow-other-keys)
+               (invoke "./configure"
+                       (string-append "CXX=" ,(cxx-for-target))))))))
+      (home-page "https://github.com/grobian/html2text")
+      (synopsis "HTML to plain text converter")
+      (description
+       "@code{html2text} is a command line utility that converts HTML
+documents into plain text.")
+      (license (list license:bsd-4      ; cmp_nocase.cpp & sgml.h
+                     license:gpl2+))))) ; everything else
+
 (define-public odt2txt
   (package
     (name "odt2txt")
@@ -904,7 +1146,7 @@ indentation.
          ;; no configure script
          (delete 'configure))))
     (inputs
-     `(("zlib" ,zlib)))
+     (list zlib))
     (home-page "https://github.com/dstosberg/odt2txt/")
     (synopsis "Converter from OpenDocument Text to plain text")
     (description "odt2txt is a command-line tool which extracts the text out
@@ -918,39 +1160,116 @@ useful to extract content from OpenDocument spreadsheets (*.ods) and
 OpenDocument presentations (*.odp).")
     (license license:gpl2)))
 
+(define-public bibutils
+  (package
+    (name "bibutils")
+    (version "7.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/bibutils/"
+                                  "bibutils_" version "_src.tgz"))
+
+              (sha256
+               (base32
+                "1hxmwjjzw48w6hdh2x7ybkrhi1xngd55i67hrrd3wswa3vpql0kf"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "--install-dir" (string-append #$output "/bin")
+                   "--install-lib" (string-append #$output "/lib")
+                   "--dynamic")
+           #:make-flags
+           #~(list (string-append "CC=" #+(cc-for-target))
+                   (string-append "LDFLAGSIN=-Wl,-rpath=" #$output "/lib"))
+           #:test-target "test"
+           #:phases
+           '(modify-phases %standard-phases
+              (replace 'configure
+                (lambda* (#:key configure-flags #:allow-other-keys)
+                  ;; configure script is ill-formed, invoke it manually
+                  (apply invoke "sh" "./configure" configure-flags))))))
+    (home-page "https://bibutils.sourceforge.io/")
+    (synopsis "Convert between various bibliography formats")
+    (description "This package provides converters for various bibliography
+formats (e.g. Bibtex, RIS, ...) using a common XML intermediate.")
+    (license license:gpl2)))
+
 (define-public opencc
   (package
     (name "opencc")
-    (version "1.0.5")
+    (version "1.1.1")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
-              (url "https://github.com/BYVoid/OpenCC")
-              (commit (string-append "ver." version))))
+             (url "https://github.com/BYVoid/OpenCC")
+             (commit (string-append "ver." version))))
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4"))
+         "07y0pvxjlmpcnym229j87qcfwnfm7vi10dad0a20xy6as55a9j3d"))
        (modules '((guix build utils)))
        (snippet
         '(begin
            ;; TODO: Unbundle tclap, darts-clone, gtest
-           (delete-file-recursively "deps/rapidjson-0.11") #t))))
+           (delete-file-recursively "deps/rapidjson-1.1.0") #t))))
     (build-system cmake-build-system)
     (arguments
-     '(#:phases
+     ;; Required to locate the install script properly.
+     `(#:out-of-source? #f
+       #:parallel-build? #f             ;occasionally failed.
+       #:imported-modules
+       (,@%cmake-build-system-modules
+        (guix build python-build-system))
+       #:modules ((guix build cmake-build-system)
+                  ((guix build python-build-system) #:prefix python:)
+                  (guix build utils))
+       #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'prevent-rebuild-during-installation
+           (lambda _
+             (substitute* "python/setup.py"
+               (("'build_py': BuildPyCommand,") ""))
+             #t))
          (add-after 'unpack 'patch-3rd-party-references
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((rapidjson (assoc-ref inputs "rapidjson")))
                (substitute* "src/CMakeLists.txt"
-                 (("../deps/rapidjson-0.11")
+                 (("../deps/rapidjson-1.1.0")
                   (string-append rapidjson "/include/rapidjson")))
-             #t))))))
+               #t)))
+         (add-before 'configure 'patch-python-binding-installation
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "python/opencc/__init__.py"
+                 (("(_libopenccfile =).*$" _ prefix)
+                  (format #f "~a os.path.join('~a/lib', _libopenccfilename)~%"
+                          prefix out))
+                 (("(_opencc_share_dir =).*$" _ prefix)
+                  (format #f "~a '~a/share/opencc'~%" prefix out))))
+             #t))
+         (add-after 'install 'install-python-binding
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (dist (string-append
+                           out "/lib/python"
+                           ,(version-major+minor (package-version python))
+                           "/site-packages")))
+               (chdir "python")
+               (mkdir-p dist)
+               (setenv "PYTHONPATH"
+                       (string-append dist ":" (getenv "GUIX_PYTHONPATH")))
+               (invoke "python" "setup.py" "install"
+                       "--root=/" "--single-version-externally-managed"
+                       (string-append "--prefix=" out))
+               #t)))
+         (add-before 'install-python-binding 'enable-bytecode-determinism
+           (assoc-ref python:%standard-phases 'enable-bytecode-determinism)))))
     (native-inputs
      `(("python" ,python-wrapper)
-       ("rapidjson" ,rapidjson)))
+       ("rapidjson" ,rapidjson)
+       ("python-setuptools" ,python-setuptools)
+       ("python-wheel" ,python-wheel)))
     (home-page "https://github.com/BYVoid/OpenCC")
     (synopsis "Convert between Traditional Chinese and Simplified Chinese")
     (description "Open Chinese Convert (OpenCC) converts between Traditional
@@ -971,7 +1290,7 @@ Mainland China, Taiwan, and Hong-Kong.")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-                      (url "https://github.com/nurse/nkf.git")
+                      (url "https://github.com/nurse/nkf")
                       (commit commit)))
                 (file-name (git-file-name name version))
                 (sha256
@@ -996,14 +1315,13 @@ such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 or UTF-32.")
 (define-public python-pandocfilters
   (package
     (name "python-pandocfilters")
-    (version "1.4.2")
+    (version "1.5.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pandocfilters" version))
        (sha256
-        (base32
-         "1a8d9b7s48gmq9zj0pmbyv2sivn5i7m6mybgpkk4jm5vd7hp1pdk"))))
+        (base32 "0f3sb8q85dbwliv46cc1yvpy4r00qp4by5x8751kn8vx6c1rarqb"))))
     (build-system python-build-system)
     (home-page "https://github.com/jgm/pandocfilters")
     (synopsis "Python module for writing Pandoc filters")
@@ -1021,7 +1339,7 @@ This package provides Python bindings.")
 (define-public aha
   (package
     (name "aha")
-    (version "0.5")
+    (version "0.5.1")
     (source
      (origin
        (method git-fetch)
@@ -1029,21 +1347,178 @@ This package provides Python bindings.")
              (url "https://github.com/theZiz/aha")
              (commit version)))
        (sha256
-        (base32
-         "0byml4rmpiaalwx69jcixl3yvpvwmwiss1jzgsqwshilb2p4qnmz"))
+        (base32 "1gywad0rvvz3c5balz8cxsnx0562hj2ngzqyr8zsy2mb4pn0lpgv"))
        (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (delete 'configure))
-       #:make-flags (list "CC=gcc"
+       #:make-flags (list (string-append "CC=" ,(cc-for-target))
                           (string-append "PREFIX="
                                          (assoc-ref %outputs "out")))
-       ;; no check target
-       #:tests? #f))
+       #:tests? #f))                    ; no test suite
     (home-page "https://github.com/theZiz/aha")
     (synopsis "Converts terminal escape sequences to HTML")
     (description "@command{aha} (Ansi Html Adapter) converts ANSI escape sequences
 of a Unix terminal to HTML code.")
     (license (list license:lgpl2.0+ license:mpl1.1))))
+
+(define-public go-github-com-errata-ai-vale
+  (package
+    (name "go-github-com-errata-ai-vale")
+    (version "2.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/errata-ai/vale")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0d07fwha2220m8j24h527xl0gnl3svvyaywflgk5292d6g49ach2"))
+       (file-name (git-file-name name version))))
+    (build-system go-build-system)
+    (native-inputs
+     `(("github.com/sp13/afero" ,go-github-com-spf13-afero)
+       ("github.com/urfave/cli" ,go-github-com-urfave-cli)
+       ("github.com/olekukonko/tablewriter" ,go-github-com-olekukonko-tablewriter)
+       ("github.com/mitchellh/mapstructure" ,go-github-com-mitchellh-mapstructure)))
+    (arguments
+     `(#:import-path "github.com/errata-ai/vale"
+       #:install-source? #f))
+    (home-page "https://github.com/errata-ai/vale")
+    (synopsis "Fully customizable syntax-aware linter that focuses on your style")
+    (description
+     "Vale is a fully extensible linter that focuses on your own writing style
+by making use of rules in individual YAML files.  It is syntax-aware on markup
+languages such as HTML, Markdown, Asciidoc, and reStructuredText.  The community
+around it also has a list of style guides implemented with Vale in
+@url{https://github.com/errata-ai/styles, their styles repo}.")
+    (license license:expat)))
+
+(define-public utf-8-lineseparator
+  (package
+    (name "utf-8-lineseparator")
+    (version "8")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pflanze/utf-8-lineseparator")
+                    (commit (string-append "cj" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0rw34r0aiab55mqks9sjzjyskfwgn7mfhy65px1lljyrs2xvvzp5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list
+         (string-append "CC=" ,(cc-for-target)))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "utf-8-lineseparator" bin)))))))
+    (home-page "https://github.com/pflanze/utf-8-lineseparator")
+    (synopsis "Line ending detection library")
+    (description
+"@code{utf-8-lineseparator} provides a tool to efficiently check text
+files for valid UTF-8 use and to report which line endings they use.")
+    (license license:expat)))
+
+(define-public csvdiff
+  (package
+    (name "csvdiff")
+    (version "1.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/aswinkarthik/csvdiff")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0cd1ikxsypjqisfnmr7zix3g7x8p892w77086465chyd39gpk97b"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/aswinkarthik/csvdiff"))
+    (propagated-inputs
+     (list go-golang-org-x-sys
+           go-github-com-stretchr-testify
+           go-github-com-spf13-cobra
+           go-github-com-spf13-afero
+           go-github-com-spaolacci-murmur3
+           go-github-com-mattn-go-colorable
+           go-github-com-fatih-color
+           go-github-com-cespare-xxhash
+           go-github-com-oneofone-xxhash))
+    (home-page "https://github.com/aswinkarthik/csvdiff")
+    (synopsis "Fast diff tool for comparing CSV files")
+    (description "@code{csvdiff} is a diff tool to compute changes between two
+CSV files.  It can compare CSV files with a million records in under 2
+seconds.  It is specifically suited for comparing CSV files dumped from
+database tables.  GNU Diff is orders of magnitude faster for comparing line by
+line.  @code{csvdiff} supports
+
+@itemize
+@item Selective comparison of fields in a row
+@item Specifying group of columns as primary-key to uniquely identify a row
+@item Ignoring columns
+@item Several output formats including colored git style output or
+JSON for post-processing
+@end itemize")
+    (license license:expat)))
+
+(define-public go-github-com-aswinkarthik-csvdiff
+  (deprecated-package "go-github-com-aswinkarthik-csvdiff" csvdiff))
+
+(define-public ack
+  (package
+    (name "ack")
+    (version "3.5.0")
+    (source (origin
+              (method git-fetch)
+              (uri
+               (git-reference
+                (url "https://github.com/beyondgrep/ack3")
+                (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "00131vqjbzcn6w22m0h3j6x9kp59dimfnnqhpmi78vbcj0jws1dv"))))
+    (build-system perl-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-generated-file-shebangs 'patch-more-shebangs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((perl (string-append
+                          (assoc-ref inputs "perl")
+                          "/bin/perl"))
+                   (site-perl
+                    (lambda (input)
+                      (format #false "~a/lib/perl5/site_perl/~a"
+                              input
+                              ,(package-version perl)))))
+               (substitute* "t/ack-type.t"
+                 (("/usr/bin/perl") perl)
+                 (("/usr/bin/env perl") perl))
+               (substitute* "ack"
+                 (("/bin/perl") ;; add @INC include directories to perl calls
+                  (string-append "/bin/perl -I "
+                                 (site-perl
+                                  (assoc-ref inputs "perl-file-next"))
+                                 " -I "
+                                 (site-perl
+                                  (assoc-ref outputs "out")))))))))))
+    (inputs (list perl-file-next))
+    (home-page "https://beyondgrep.com/")
+    (synopsis "Code-searching tool for programmers with large source trees")
+    (description "ack is a tool for finding text inside files.  It is designed for
+hackers and programmers by being fast, ignoring VCS directories, letting a user
+easily specify file types, match highlighting, Perl-Compatible Regular
+Expressions, and being faster to type than grep.")
+    (license license:artistic2.0)))