projects/guix·blob java-team · refs

2242 lines · 88.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013-2016, 2018-2019, 2022 Ludovic Courtès <[email protected]>
3;;; Copyright © 2013, 2015 Andreas Enge <[email protected]>
4;;; Copyright © 2015 Eric Bavier <[email protected]>
5;;; Copyright © 2015 Sou Bunnbu <[email protected]>
6;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <[email protected]>
7;;; Copyright © 2015, 2016, 2017 Mark H Weaver <[email protected]>
8;;; Copyright © 2015-2018, 2020-2022, 2024 Efraim Flashner <[email protected]>
9;;; Copyright © 2015 Raimon Grau <[email protected]>
10;;; Copyright © 2016 Mathieu Lirzin <[email protected]>
11;;; Copyright © 2016, 2017 Leo Famulari <[email protected]>
12;;; Copyright © 2016 Ben Woodcroft <[email protected]>
13;;; Copyright © 2016, 2024 Janneke Nieuwenhuizen <[email protected]>
14;;; Copyright © 2016, 2017 Nikita <[email protected]>
15;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <[email protected]>
16;;; Copyright © 2016-2022 Marius Bakke <[email protected]>
17;;; Copyright © 2017 Adriano Peluso <[email protected]>
18;;; Copyright © 2017 Gregor Giesen <[email protected]>
19;;; Copyright © 2017 Alex Vong <[email protected]>
20;;; Copyright © 2017 Petter <[email protected]>
21;;; Copyright © 2017 Stefan Reichör <[email protected]>
22;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
23;;; Copyright © 2018 Jack Hill <[email protected]>
24;;; Copyright © 2019 Giacomo Leidi <[email protected]>
25;;; Copyright © 2020 Paul Garlick <[email protected]>
26;;; Copyright © 2020 Edouard Klein <[email protected]>
27;;; Copyright © 2020 Brett Gilio <[email protected]>
28;;; Copyright © 2020 Pierre Langlois <[email protected]>
29;;; Copyright © 2021 Michael Rohleder <[email protected]>
30;;; Copyright © 2021-2023, 2025 Maxim Cournoyer <[email protected]>
31;;; Copyright © 2021 Julien Lepiller <[email protected]>
32;;; Copyright © 2021, 2023 Felix Gruber <[email protected]>
33;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
34;;; Copyright © 2021 David Larsson <[email protected]>
35;;; Copyright © 2021 Matthew James Kraai <[email protected]>
36;;; Copyright © 2023 Bruno Victal <[email protected]>
37;;; Copyright © 2024 Nicolas Graves <[email protected]>
38;;; Copyright © 2024 gemmaro <[email protected]>
39;;; Copyright © 2025 Antoine Côté <[email protected]>
40;;; Copyright © 2025 John Kehayias <[email protected]>
41;;; Copyright © 2025 Remco van 't Veer <[email protected]>
42;;; Copyright © 2025 pinoaffe <[email protected]>
43;;; Copyright © 2025, 2026 zhengjunjie <[email protected]>
44;;;
45;;; This file is part of GNU Guix.
46;;;
47;;; GNU Guix is free software; you can redistribute it and/or modify it
48;;; under the terms of the GNU General Public License as published by
49;;; the Free Software Foundation; either version 3 of the License, or (at
50;;; your option) any later version.
51;;;
52;;; GNU Guix is distributed in the hope that it will be useful, but
53;;; WITHOUT ANY WARRANTY; without even the implied warranty of
54;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55;;; GNU General Public License for more details.
56;;;
57;;; You should have received a copy of the GNU General Public License
58;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
59
60(define-module (gnu packages xml)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages autotools)
64 #:use-module (gnu packages check)
65 #:use-module (gnu packages compression)
66 #:use-module (gnu packages curl)
67 #:use-module (gnu packages docbook)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages gnupg)
73 #:use-module (gnu packages graphviz)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages nss)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages perl-check)
78 #:use-module (gnu packages python-build)
79 #:use-module (gnu packages python)
80 #:use-module (gnu packages python-xyz)
81 #:use-module (gnu packages tls)
82 #:use-module (gnu packages web)
83 #:use-module ((guix licenses) #:prefix license:)
84 #:use-module (guix gexp)
85 #:use-module (guix packages)
86 #:use-module (guix download)
87 #:use-module (guix git-download)
88 #:use-module (guix build-system cmake)
89 #:use-module (guix build-system copy)
90 #:use-module (guix build-system gnu)
91 #:use-module (guix build-system meson)
92 #:use-module (guix build-system perl)
93 #:use-module (guix build-system pyproject)
94 #:use-module (guix deprecation)
95 #:use-module (guix utils)
96 #:use-module (guix search-paths)
97 #:use-module (gnu packages linux)
98 #:use-module (gnu packages pkg-config))
99
100(define-public libxmlb
101 (package
102 (name "libxmlb")
103 (version "0.3.14")
104 (source
105 (origin
106 (method git-fetch)
107 (uri
108 (git-reference
109 (url "https://github.com/hughsie/libxmlb")
110 (commit version)))
111 (file-name (git-file-name name version))
112 (sha256
113 (base32 "0qcp881s559wc73db91vjccrv0d3zva87l5jdp5w0ygzz6bmg5cn"))))
114 (build-system meson-build-system)
115 (arguments
116 `(#:glib-or-gtk? #t))
117 (native-inputs
118 (list gobject-introspection gtk-doc/stable pkg-config))
119 (inputs
120 (list appstream-glib glib))
121 (propagated-inputs
122 (list xz `(,zstd "lib"))) ; in Requires.private of xmlb.pc
123 (synopsis "Library to help create and query binary XML blobs")
124 (description "Libxmlb library takes XML source, and converts it to a
125structured binary representation with a deduplicated string table; where the
126strings have the NULs included. This allows an application to mmap the binary
127XML file, do an XPath query and return some strings without actually parsing
128the entire document.")
129 (home-page "https://github.com/hughsie/libxmlb")
130 (license license:lgpl2.1+)))
131
132(define-public expat
133 (package
134 (name "expat")
135 (version "2.7.1")
136 (replacement expat-2.8.4)
137 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
138 (origin
139 (method url-fetch)
140 (uri (list (string-append "mirror://sourceforge/expat/expat/"
141 version "/expat-" version ".tar.xz")
142 (string-append
143 "https://github.com/libexpat/libexpat/releases/download/R_"
144 (string-map dot->underscore version)
145 "/expat-" version ".tar.xz")))
146 (sha256
147 (base32
148 "0c3w446jrrnss3ccgx9z590lpwbpxiqdbxv2a0p036cg9da54i9m")))))
149 (build-system gnu-build-system)
150 (arguments
151 '(#:phases (modify-phases %standard-phases
152 (add-after 'install 'move-static-library
153 (lambda* (#:key outputs #:allow-other-keys)
154 (let ((out (assoc-ref outputs "out"))
155 (static (assoc-ref outputs "static")))
156 (mkdir-p (string-append static "/lib"))
157 (link (string-append out "/lib/libexpat.a")
158 (string-append static "/lib/libexpat.a"))
159 (delete-file (string-append out "/lib/libexpat.a"))
160 (substitute* (string-append out "/lib/libexpat.la")
161 (("old_library=.*")
162 "old_library=''"))))))))
163 (outputs '("out" "static"))
164 (home-page "https://libexpat.github.io/")
165 (synopsis "Stream-oriented XML parser library written in C")
166 (description
167 "Expat is an XML parser library written in C. It is a
168stream-oriented parser in which an application registers handlers for
169things the parser might find in the XML document (like start tags).")
170 (license license:expat)))
171
172(define expat-2.8.4
173 (hidden-package
174 (package
175 (inherit expat)
176 (name "expat")
177 (version "2.8.4")
178 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
179 (origin
180 (method url-fetch)
181 (uri (string-append
182 "https://github.com/libexpat/libexpat/releases/download/R_"
183 (string-map dot->underscore version)
184 "/expat-" version ".tar.xz"))
185 (sha256
186 (base32
187 "19w5k6q7ccw7v8wn5v60hj096hv27vrm9qml7d8ymd53ip6f2sk5"))))))))
188
189(define-public libebml
190 (package
191 (name "libebml")
192 (version "1.4.5")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (string-append "https://dl.matroska.org/downloads/libebml/"
197 "libebml-" version ".tar.xz"))
198 (sha256
199 (base32 "06r2md4jysp5q5lx108vgv8b7c596zhh7wr6sk12knlj0l5n8wa9"))))
200 (build-system cmake-build-system)
201 (arguments
202 `(#:configure-flags
203 (list "-DBUILD_SHARED_LIBS=YES")
204 #:tests? #f)) ; no test suite
205 (home-page "https://matroska-org.github.io/libebml/")
206 (synopsis "C++ library to parse EBML files")
207 (description "libebml is a C++ library to read and write @dfn{EBML}
208(Extensible Binary Meta Language) files. EBML was designed to be a simplified
209binary extension of XML for the purpose of storing and manipulating data in a
210hierarchical form with variable field lengths.")
211 (license license:lgpl2.1)))
212
213(define-public libxml2
214 (package
215 (name "libxml2")
216 (version "2.14.6")
217 (source (origin
218 (method url-fetch)
219 (uri (string-append "mirror://gnome/sources/libxml2/"
220 (version-major+minor version)"/libxml2-"
221 version ".tar.xz"))
222 (sha256
223 (base32
224 "0fi0jysncjpvhvp29qcx3bydndapwphgkx7ial5kzf7ymyh5ir3w"))
225 (patches (search-patches "python-libxml2-utf8.patch"))))
226 (build-system gnu-build-system)
227 (outputs '("out" "static" "doc"))
228 (arguments
229 (list
230 #:phases
231 #~(modify-phases %standard-phases
232 #$@(if (target-loongarch64?)
233 #~((add-after 'unpack 'update-config-scripts
234 (lambda* (#:key inputs native-inputs #:allow-other-keys)
235 ;; Replace outdated config.guess and config.sub.
236 (for-each (lambda (file)
237 (install-file
238 (search-input-file
239 (or native-inputs inputs)
240 (string-append "/bin/" file)) "."))
241 '("config.guess" "config.sub")))))
242 #~())
243 (add-before 'configure 'configure-python
244 (lambda _
245 (substitute* "python/setup.py.in"
246 ;; The build system ignores C_INCLUDE_PATH & co, so
247 ;; provide the absolute directory name.
248 (("/opt/include")
249 (string-append #$output "/include/libxml2")))))
250 (add-after 'install 'use-other-outputs
251 (lambda _
252 (let ((doc (string-append #$output:doc "/share/"))
253 (static (string-append #$output:static "/lib/")))
254 (for-each mkdir-p (list doc static))
255
256 (rename-file (string-append #$output "/share/gtk-doc")
257 (string-append doc "/gtk-doc"))
258
259 (for-each
260 (lambda (ar)
261 (rename-file ar
262 (string-append static (basename ar))))
263 (find-files (string-append #$output "/lib") "\\.a$"))
264
265 ;; Remove reference to the static library from the .la
266 ;; file such that Libtool does the right thing when both
267 ;; the shared and static variants are available.
268 (substitute* (string-append #$output "/lib/libxml2.la")
269 (("^old_library='libxml2.a'") "old_library=''"))))))))
270 (home-page "http://www.xmlsoft.org/")
271 (synopsis "C parser for XML")
272 ;; TODO: Remove python, xz and zlib when upgrading.
273 ;; See https://codeberg.org/guix/guix/pulls/3161#issuecomment-7521193
274 (inputs (list python-minimal xz))
275 (propagated-inputs (list zlib)) ; libxml2.la says '-lz'.
276 (native-inputs (append (if (target-loongarch64?)
277 (list config)
278 '())
279 (list perl pkg-config python-minimal)))
280 (native-search-paths
281 (list $SGML_CATALOG_FILES $XML_CATALOG_FILES))
282 (search-paths native-search-paths)
283 (description
284 "Libxml2 is the XML C parser and toolkit developed for the Gnome
285project (but it is usable outside of the Gnome platform).")
286 (license license:x11)))
287
288;; This is an old version (the most recent that works) of libxml2 solely for
289;; building librsvg-2.40.
290;; XXX: Remove once Rust (and thus newer librsvg) is supported on all
291;; platforms.
292(define-public libxml2-2.11
293 (hidden-package
294 (package
295 (inherit libxml2)
296 (version "2.11.9")
297 (source (origin
298 (inherit (package-source libxml2))
299 (uri (string-append "mirror://gnome/sources/libxml2/"
300 (version-major+minor version)"/libxml2-"
301 version ".tar.xz"))
302 (sha256
303 (base32
304 "17w0a622466k2hi5nln276la6rzfr9xaip3lqj71hmyvxyhmf0bq")))))))
305
306;; We need this for r-xml, which claims to support parsing gzipped XML files.
307;; This depends on the zlib feature, which is deprecated and will be removed
308;; in future releases of libxml2.
309(define-public libxml2-with-zlib
310 (hidden-package
311 (package/inherit libxml2
312 (arguments
313 (substitute-keyword-arguments arguments
314 ((#:configure-flags flags #~'())
315 #~(cons "--with-zlib" #$flags)))))))
316
317(define-public libxlsxwriter
318 (package
319 (name "libxlsxwriter")
320 (version "1.0.3")
321 (source
322 (origin
323 (method git-fetch)
324 (uri (git-reference
325 (url "https://github.com/jmcnamara/libxlsxwriter")
326 (commit (string-append "RELEASE_" version))))
327 (file-name (git-file-name name version))
328 (sha256
329 (base32 "14c5rgx87nhzasr0j7mcfr1w7ifz0gmdiqy2xq59di5xvcdrpxpv"))
330 (modules '((guix build utils)))
331 (snippet
332 ;; Remove bundled minizip source
333 '(begin
334 (delete-file-recursively "third_party/minizip")
335 #t))))
336 (build-system gnu-build-system)
337 (arguments
338 `(#:test-target "test"
339 #:make-flags
340 (list (string-append "CC=" ,(cc-for-target))
341 (string-append "PREFIX=" (assoc-ref %outputs "out"))
342 "USE_STANDARD_TMPFILE=1"
343 "USE_SYSTEM_MINIZIP=1")
344 #:phases
345 (modify-phases %standard-phases
346 (delete 'configure)))) ; no configure script
347 (native-inputs
348 (list python-pytest))
349 (inputs
350 (list minizip))
351 (home-page "https://github.com/jmcnamara/libxlsxwriter")
352 (synopsis "C library for creating Excel XLSX files")
353 (description
354 "Libxlsxwriter is a C library that can be used to write text, numbers,
355formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
356 (license (list license:bsd-2
357 license:public-domain)))) ; third_party/md5
358
359(define-public libxslt
360 (package
361 (name "libxslt")
362 (version "1.1.43")
363 (source (origin
364 (method url-fetch)
365 (uri (string-append "mirror://gnome/sources"
366 "/libxslt/" (version-major+minor version)
367 "/libxslt-" version ".tar.xz"))
368 (sha256
369 (base32
370 "0fhqy01x99iia8306czakxza4spzyn88w4bin4sw5bx57hw6ngas"))))
371 (build-system gnu-build-system)
372 (arguments
373 (list #:phases
374 #~(modify-phases %standard-phases
375 (add-before 'check 'disable-fuzz-tests
376 (lambda _
377 ;; Disable libFuzzer tests, because they require
378 ;; instrumentation builds of libxml2 and libxslt.
379 (substitute* "tests/Makefile"
380 (("exslt plugins fuzz")
381 "exslt plugins"))
382 ;; Also disable Python tests since they require
383 ;; libxml2 which would introduce a
384 ;; circular dependency.
385 (substitute* "python/Makefile"
386 (("cd tests && \\$\\(MAKE\\) tests")
387 "$(info Python tests are disabled by Guix.)")))))
388 #:configure-flags
389 (if (%current-target-system)
390 ;; 'configure.ac' uses 'AM_PATH_PYTHON', which looks for
391 ;; 'python' in $PATH and tries to run it. Skip all that when
392 ;; cross-compiling.
393 #~'("--without-python")
394 #~'())))
395 (home-page "http://xmlsoft.org/XSLT/index.html")
396 (synopsis "C library for applying XSLT stylesheets to XML documents")
397 (native-inputs (list pkg-config))
398 (inputs
399 (list libgcrypt
400 libxml2 ;TODO: Remove after propagated
401 python-minimal-wrapper
402 zlib
403 xz))
404 ;; TODO: Uncomment in an upcoming world rebuild
405 ;;(propagated-inputs (list libxml2)) ;libxml2-0.pc 'Requires' it
406 (native-search-paths %libxslt-search-paths)
407 (description
408 "Libxslt is an XSLT C library developed for the GNOME project. It is
409based on libxml for XML parsing, tree manipulation and XPath support.")
410 (license license:x11)))
411
412(define-public openjade
413 (package
414 (name "openjade")
415 (version "1.3.2")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append "mirror://sourceforge/openjade/openjade/"
419 version "/" name "-" version ".tar.gz"))
420 (sha256
421 (base32
422 "1l92sfvx1f0wmkbvzv1385y1gb3hh010xksi1iyviyclrjb7jb8x"))))
423 (build-system gnu-build-system)
424 (arguments
425 `(#:configure-flags
426 (list (string-append "--enable-spincludedir="
427 (assoc-ref %build-inputs "opensp")
428 "/include/OpenSP")
429 (string-append "--enable-splibdir="
430 (assoc-ref %build-inputs "opensp") "/lib")
431 ;; Workaround segfaults in OpenJade (see:
432 ;; https://bugs.launchpad.net/ubuntu/+source/openjade/+bug/1869734).
433 "CXXFLAGS=-O0")
434 #:parallel-build? #f ;build fails otherwise
435 ;; The test suite fails with diff errors between the actual and
436 ;; expected results, like: (char<? #\a #\A) returning #t rather than
437 ;; #f (see: https://sourceforge.net/p/openjade/bugs/150/).
438 #:tests? #f
439 #:phases
440 (modify-phases %standard-phases
441 (add-after 'unpack 'replace-deprecated-getopt
442 ;; See: https://sourceforge.net/p/openjade/bugs/140/.
443 (lambda _
444 (substitute* "msggen.pl"
445 (("use POSIX;") "use POSIX;\nuse Getopt::Std;")
446 (("do 'getopts.pl';") "")
447 (("&Getopts") "getopts"))
448 #t))
449 (add-after 'replace-deprecated-getopt 'fix-locale-lookup
450 ;; See: https://sourceforge.net/p/openjade/bugs/149/.
451 (lambda _
452 (substitute* "testsuite/expr-lang.dsl"
453 (("\\(language \"EN\" \"US\"\\)")
454 "(language \"EN\" \"US.UTF-8\")"))
455 #t))
456 (add-after 'install 'install-doc
457 (lambda* (#:key outputs #:allow-other-keys)
458 ;; TODO: Generate the manpage from source, with
459 ;; openjade-bootstrap and jadetex. See the file docsrc/Makefile.
460 (let* ((out (assoc-ref outputs "out"))
461 (man1 (string-append out "/share/man/man1")))
462 (install-file "docsrc/openjade.1" man1)
463 #t)))
464 (add-after 'install-doc 'install-dtds
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let* ((out (assoc-ref outputs "out"))
467 (dtd (string-append out "/sgml/dtd")))
468 (mkdir-p dtd)
469 (copy-recursively "dsssl" dtd)
470 #t)))
471 (delete 'check)
472 (add-after 'install 'check
473 (lambda* (#:key tests? out #:allow-other-keys)
474 (if tests?
475 (with-directory-excursion "testsuite"
476 (invoke "make"))
477 (format #t "test suite not run~%"))
478 #t)))))
479 (inputs
480 (list opensp))
481 (native-inputs
482 (list perl))
483 (home-page "https://openjade.sourceforge.net/")
484 (synopsis "ISO/IEC 10179:1996 standard DSSSL language implementation")
485 (description "OpenJade is an implementation of Document Style Semantics
486and Specification Language (DSSSL), a style language to format SGML or XML
487documents. It contains backends for various formats such as RTF, HTML, TeX,
488MIF, SGML2SGML, and FOT.")
489 (license (license:non-copyleft "file://COPYING"
490 "See COPYING in the distribution."))))
491
492(define-public xmlbird
493 (package
494 (name "xmlbird")
495 (version "1.2.14")
496 (source (origin
497 (method git-fetch)
498 (uri (git-reference
499 (url "https://github.com/johanmattssonm/xmlbird")
500 (commit (string-append "v" version))))
501 (file-name (git-file-name name version))
502 (sha256
503 (base32
504 "0wgdg6zlccfm4lz2yx8axxp38bhy2sxwbi7cb2p80bb8y81npb3v"))))
505 (build-system gnu-build-system)
506 (arguments (list
507 #:phases
508 #~(modify-phases %standard-phases
509 (replace 'configure
510 (lambda* (#:key outputs #:allow-other-keys)
511 (system* "python3" "configure"
512 "--libdir=/lib"
513 "--prefix" (assoc-ref outputs "out"))))
514 (replace 'build
515 (lambda _ (system* "doit")))
516 (replace 'check
517 (lambda* (#:key tests? #:allow-other-keys)
518 (when tests? (system* "doit" "test"))))
519 (replace 'install
520 (lambda _ (system* "python3" "install.py"))))))
521 (inputs (list vala glib))
522 (native-inputs (list python-wrapper python-doit pkg-config))
523 (home-page "https://github.com/johanmattssonm/xmlbird")
524 (synopsis "XML parser for Vala and C programs")
525 (description "XML Bird is an XML parser library for programs written in Vala or C.
526It is developed for use by the @code{birdfont} font editor.")
527 (license license:lgpl3)))
528
529(define-public perl-graph-readwrite
530 (package
531 (name "perl-graph-readwrite")
532 (version "2.09")
533 (source
534 (origin
535 (method url-fetch)
536 (uri (string-append
537 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
538 version
539 ".tar.gz"))
540 (sha256
541 (base32
542 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
543 (build-system perl-build-system)
544 (propagated-inputs
545 (list perl-graph perl-parse-yapp perl-xml-parser perl-xml-writer))
546 (home-page "https://metacpan.org/release/Graph-ReadWrite")
547 (synopsis "Modules for reading and writing directed graphs")
548 (description "This is a collection of perl classes for reading and writing
549directed graphs in a variety of file formats. The graphs are represented in
550Perl using Jarkko Hietaniemi's @code{Graph} classes.
551
552There are two base classes. @code{Graph::Reader} is the base class for classes
553which read a graph file and create an instance of the Graph class.
554@code{Graph::Writer} is the base class for classes which take an instance of
555the @code{Graph} class and write it out in a specific file format.")
556 (license license:perl-license)))
557
558(define-public perl-xml-atom
559 (package
560 (name "perl-xml-atom")
561 (version "0.43")
562 (source (origin
563 (method url-fetch)
564 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
565 "XML-Atom-" version ".tar.gz"))
566 (sha256
567 (base32
568 "0b8bpdnvz9sqwjhjkydbzy4karb7nn6i15b8g4mczrznlsb3hnaf"))))
569 (build-system perl-build-system)
570 (arguments
571 `(#:phases
572 (modify-phases %standard-phases
573 (add-before 'check 'set-perl-search-path
574 (lambda _
575 (setenv "PERL5LIB"
576 (string-append (getcwd) ":"
577 (getenv "PERL5LIB")))
578 #t)))))
579 (native-inputs
580 ;; TODO package: perl-datetime-format-atom
581 (list perl-html-tagset perl-module-build-tiny perl-module-install))
582 (propagated-inputs
583 (list perl-class-data-inheritable
584 perl-datetime
585 perl-datetime-timezone
586 perl-digest-sha1
587 perl-libwww
588 perl-uri
589 perl-xml-libxml
590 perl-xml-xpath))
591 (home-page "https://metacpan.org/release/XML-Atom")
592 (synopsis "Atom feed and API implementation")
593 (description
594 "Atom is a syndication, API, and archiving format for weblogs and other data.
595@code{XML::Atom} implements the feed format as well as a client for the API.")
596 (license license:perl-license)))
597
598(define-public perl-xml-descent
599 (package
600 (name "perl-xml-descent")
601 (version "1.04")
602 (source (origin
603 (method url-fetch)
604 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
605 "XML-Descent-" version ".tar.gz"))
606 (sha256
607 (base32
608 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
609 (build-system perl-build-system)
610 (native-inputs
611 (list perl-module-build))
612 (propagated-inputs
613 (list perl-test-differences perl-xml-tokeparser))
614 (home-page "https://metacpan.org/release/XML-Descent")
615 (synopsis "Recursive descent XML parsing")
616 (description
617 "The conventional models for parsing XML are either @dfn{DOM}
618(a data structure representing the entire document tree is created) or
619@dfn{SAX} (callbacks are issued for each element in the XML).
620
621XML grammar is recursive - so it's nice to be able to write recursive
622parsers for it. @code{XML::Descent} allows such parsers to be created.")
623 (license license:perl-license)))
624
625(define-public perl-xml-parser
626 (package
627 (name "perl-xml-parser")
628 (version "2.46")
629 (source (origin
630 (method url-fetch)
631 (uri (string-append
632 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
633 version ".tar.gz"))
634 (sha256
635 (base32
636 "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk"))))
637 (build-system perl-build-system)
638 (arguments `(#:make-maker-flags
639 (let ((expat (assoc-ref %build-inputs "expat")))
640 (list (string-append "EXPATLIBPATH=" expat "/lib")
641 (string-append "EXPATINCPATH=" expat "/include")))))
642 (inputs (list expat))
643 (license license:perl-license)
644 (synopsis "Perl bindings to the Expat XML parsing library")
645 (description
646 "This module provides ways to parse XML documents. It is built on top of
647XML::Parser::Expat, which is a lower level interface to James Clark's expat
648library. Each call to one of the parsing methods creates a new instance of
649XML::Parser::Expat which is then used to parse the document. Expat options
650may be provided when the XML::Parser object is created. These options are
651then passed on to the Expat object on each parse call. They can also be given
652as extra arguments to the parse methods, in which case they override options
653given at XML::Parser creation time.")
654 (home-page "https://metacpan.org/release/XML-Parser")))
655
656(define-public perl-xml-tokeparser
657 (package
658 (name "perl-xml-tokeparser")
659 (version "0.05")
660 (source (origin
661 (method url-fetch)
662 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
663 "XML-TokeParser-" version ".tar.gz"))
664 (sha256
665 (base32
666 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
667 (build-system perl-build-system)
668 (propagated-inputs (list perl-xml-parser))
669 (home-page "https://metacpan.org/release/XML-TokeParser")
670 (synopsis "Simplified interface to XML::Parser")
671 (description
672 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
673to @code{XML::Parser} in much the same way that Gisle Aas'
674@code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
675@code{XML::TokeParser} splits its XML input up into \"tokens\", each
676corresponding to an @code{XML::Parser} event.")
677 (license license:perl-license)))
678
679(define-public perl-libxml
680 (package
681 (name "perl-libxml")
682 (version "0.08")
683 (source (origin
684 (method url-fetch)
685 (uri (string-append
686 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
687 version ".tar.gz"))
688 (sha256
689 (base32
690 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
691 (build-system perl-build-system)
692 (propagated-inputs
693 (list perl-xml-parser))
694 (license license:perl-license)
695 (synopsis "Perl modules for working with XML")
696 (description
697 "A collection of smaller Perl modules, scripts, and documents for working
698with XML in Perl. libxml-perl software works in combination with
699@code{XML::Parser}, PerlSAX, @code{XML::DOM}, @code{XML::Grove}, and others.")
700 (home-page "https://metacpan.org/release/libxml-perl")))
701
702(define-public perl-xml-libxml
703 (package
704 (name "perl-xml-libxml")
705 (version "2.0134")
706 (source
707 (origin
708 (method url-fetch)
709 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
710 "XML-LibXML-" version ".tar.gz"))
711 (sha256
712 (base32
713 "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h"))
714 ;; Remove patch with update to version 2.0210.
715 (patches (search-patches "perl-xml-libxml-fix-function-prototypes.patch"))))
716 (build-system perl-build-system)
717 (arguments '(#:tests? #f)) ;FIXME: 2 test failures since updating libxml2
718 (propagated-inputs
719 (list perl-xml-namespacesupport perl-xml-sax))
720 (inputs
721 (list libxml2-2.11))
722 (home-page "https://metacpan.org/release/XML-LibXML")
723 (synopsis "Perl interface to libxml2")
724 (description "This module implements a Perl interface to the libxml2
725library which provides interfaces for parsing and manipulating XML files. This
726module allows Perl programmers to make use of the highly capable validating
727XML parser and the high performance DOM implementation.")
728 (license license:perl-license)))
729
730(define-public perl-xml-libxml-simple
731 (package
732 (name "perl-xml-libxml-simple")
733 (version "1.01")
734 (source (origin
735 (method url-fetch)
736 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
737 "XML-LibXML-Simple-" version ".tar.gz"))
738 (sha256
739 (base32
740 "19k50d80i9dipsl6ln0f4awv9wmdg0xm3d16z8mngmvh9c8ci66d"))))
741 (build-system perl-build-system)
742 (propagated-inputs
743 (list perl-file-slurp-tiny perl-xml-libxml))
744 (home-page "https://metacpan.org/release/XML-LibXML-Simple")
745 (synopsis "XML::LibXML based XML::Simple clone")
746 (description
747 "This package provides the same API as @code{XML::Simple} but is based on
748@code{XML::LibXML}.")
749 (license license:perl-license)))
750
751(define-public perl-xml-libxslt
752 (package
753 (name "perl-xml-libxslt")
754 (version "2.003000")
755 (source
756 (origin
757 (method url-fetch)
758 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
759 "XML-LibXSLT-" version ".tar.gz"))
760 (sha256
761 (base32
762 "11s5spf0x5h6qzajfsza28m62z50cilcpvl4iffyafzmfbp5makw"))))
763 (build-system perl-build-system)
764 (native-inputs (list pkg-config))
765 ;; FIXME: libxml2-2.11 is used instead of latest, due to test failures
766 ;; (see: <https://github.com/shlomif/perl-XML-LibXSLT/issues/8>).
767 (inputs (list libxml2-2.11 libxslt))
768 (propagated-inputs (list perl-xml-libxml))
769 (home-page "https://metacpan.org/release/XML-LibXSLT")
770 (synopsis "Perl bindings to GNOME libxslt library")
771 (description "This Perl module is an interface to the GNOME project's
772libxslt library.")
773 (license license:perl-license)))
774
775(define-public perl-xml-namespacesupport
776 (package
777 (name "perl-xml-namespacesupport")
778 (version "1.12")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
783 "XML-NamespaceSupport-" version ".tar.gz"))
784 (sha256
785 (base32
786 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
787 (build-system perl-build-system)
788 (home-page "https://metacpan.org/release/XML-NamespaceSupport")
789 (synopsis "XML namespace support class")
790 (description "This module offers a simple to process namespaced XML
791names (unames) from within any application that may need them. It also helps
792maintain a prefix to namespace URI map, and provides a number of basic
793checks.")
794 (license license:perl-license)))
795
796(define-public perl-xml-rss
797 (package
798 (name "perl-xml-rss")
799 (version "1.62")
800 (source (origin
801 (method url-fetch)
802 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
803 "XML-RSS-" version ".tar.gz"))
804 (sha256
805 (base32
806 "0klb8ghd405pdkmn25lp3i4j2lfydz8w581sk51p3zy788s0c9yk"))))
807 (build-system perl-build-system)
808 (native-inputs
809 (list perl-module-build perl-test-manifest perl-test-differences
810 perl-test-pod perl-test-pod-coverage))
811 ;; XXX: The test which uses this modules does not run, even when it is included
812 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
813 (inputs
814 (list perl-datetime perl-datetime-format-mail
815 perl-datetime-format-w3cdtf perl-html-parser perl-xml-parser))
816 (home-page "https://metacpan.org/release/XML-RSS")
817 (synopsis "Creates and updates RSS files")
818 (description
819 "This module provides a basic framework for creating and maintaining
820RDF Site Summary (RSS) files. This distribution also contains many examples
821that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
8221.0 version, and more.")
823 (license license:perl-license)))
824
825(define-public perl-xml-sax
826 (package
827 (name "perl-xml-sax")
828 (version "1.02")
829 (source
830 (origin
831 (method url-fetch)
832 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
833 "XML-SAX-" version ".tar.gz"))
834 (sha256
835 (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5"))))
836 (build-system perl-build-system)
837 (propagated-inputs
838 (list perl-xml-namespacesupport perl-xml-sax-base))
839 (arguments
840 `(#:phases (modify-phases %standard-phases
841 (add-before
842 'install 'augment-path
843 ;; The install target tries to load the newly-installed
844 ;; XML::SAX module, but can't find it, so we need to tell
845 ;; perl where to look.
846 (lambda* (#:key outputs #:allow-other-keys)
847 (setenv "PERL5LIB"
848 (string-append (getenv "PERL5LIB") ":"
849 (assoc-ref outputs "out")
850 "/lib/perl5/site_perl"))
851 #t)))))
852 (home-page "https://metacpan.org/release/XML-SAX")
853 (synopsis "Perl API for XML")
854 (description "XML::SAX consists of several framework classes for using and
855building Perl SAX2 XML parsers, filters, and drivers.")
856 (license license:perl-license)))
857
858(define-public perl-xml-sax-base
859 (package
860 (name "perl-xml-sax-base")
861 (version "1.09")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
866 "XML-SAX-Base-" version ".tar.gz"))
867 (sha256
868 (base32
869 "1l1ai9g1z11ja7mvnfl5mj346r13jyckbg9qlw6c2izglidkbjv6"))))
870 (build-system perl-build-system)
871 (home-page "https://metacpan.org/release/XML-SAX-Base")
872 (synopsis "Base class for SAX Drivers and Filters")
873 (description "This module has a very simple task - to be a base class for
874PerlSAX drivers and filters. Its default behaviour is to pass the input
875directly to the output unchanged. It can be useful to use this module as a
876base class so you don't have to, for example, implement the characters()
877callback.")
878 (license license:perl-license)))
879
880(define-public perl-xml-simple
881 (package
882 (name "perl-xml-simple")
883 (version "2.25")
884 (source (origin
885 (method url-fetch)
886 (uri (string-append
887 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
888 version ".tar.gz"))
889 (sha256
890 (base32
891 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
892 (build-system perl-build-system)
893 (propagated-inputs
894 (list perl-xml-parser perl-xml-sax))
895 (license license:perl-license)
896 (synopsis "Perl module for easy reading/writing of XML files")
897 (description
898 "The XML::Simple module provides a simple API layer on top of an
899underlying XML parsing module (either XML::Parser or one of the SAX2
900parser modules).")
901 (home-page "https://metacpan.org/release/XML-Simple")))
902
903(define-public perl-xml-regexp
904 (package
905 (name "perl-xml-regexp")
906 (version "0.04")
907 (source (origin
908 (method url-fetch)
909 (uri (string-append
910 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
911 version ".tar.gz"))
912 (sha256
913 (base32
914 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
915 (build-system perl-build-system)
916 (inputs
917 (list perl-xml-parser))
918 (license license:perl-license)
919 (synopsis "Perl regular expressions for XML tokens")
920 (description
921 "XML::RegExp contains regular expressions for the following XML tokens:
922BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
923EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
924 (home-page "https://metacpan.org/release/XML-RegExp")))
925
926(define-public perl-xml-dom
927 (package
928 (name "perl-xml-dom")
929 (version "1.46")
930 (source (origin
931 (method url-fetch)
932 (uri (string-append
933 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
934 version ".tar.gz"))
935 (sha256
936 (base32
937 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
938 (build-system perl-build-system)
939 (propagated-inputs
940 (list perl-libwww perl-libxml perl-xml-parser perl-xml-regexp))
941 (license license:perl-license)
942 (synopsis
943 "Perl module for building DOM Level 1 compliant document structures")
944 (description
945 "This module extends the XML::Parser module by Clark Cooper. The
946XML::Parser module is built on top of XML::Parser::Expat, which is a lower
947level interface to James Clark's expat library. XML::DOM::Parser is derived
948from XML::Parser. It parses XML strings or files and builds a data structure
949that conforms to the API of the Document Object Model.")
950 (home-page "https://metacpan.org/release/XML-DOM")))
951
952(define-public perl-xml-compile-tester
953 (package
954 (name "perl-xml-compile-tester")
955 (version "0.91")
956 (source (origin
957 (method url-fetch)
958 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
959 "XML-Compile-Tester-" version ".tar.gz"))
960 (sha256
961 (base32
962 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
963 (build-system perl-build-system)
964 (propagated-inputs
965 (list perl-log-report perl-test-deep))
966 (home-page "https://metacpan.org/release/XML-Compile-Tester")
967 (synopsis "XML::Compile related regression testing")
968 (description
969 "The @code{XML::Compile} module suite has extensive regression testing.
970This module provide functions which simplify writing tests for
971@code{XML::Compile} related distributions.")
972 (license license:perl-license)))
973
974(define-public perl-xml-compile
975 (package
976 (name "perl-xml-compile")
977 (version "1.63")
978 (source (origin
979 (method url-fetch)
980 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
981 "XML-Compile-" version ".tar.gz"))
982 (sha256
983 (base32
984 "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b"))))
985 (build-system perl-build-system)
986 (propagated-inputs
987 (list perl-log-report
988 perl-xml-compile-tester
989 perl-xml-libxml
990 perl-scalar-list-utils
991 perl-test-deep
992 perl-types-serialiser))
993 (home-page "https://metacpan.org/release/XML-Compile")
994 (synopsis "Compilation-based XML processing")
995 (description
996 "@code{XML::Compile} can be used to translate a Perl data-structure into
997XML or XML into a Perl data-structure, both directions under rigid control by
998a schema.")
999 (license license:perl-license)))
1000
1001(define-public perl-xml-compile-cache
1002 (package
1003 (name "perl-xml-compile-cache")
1004 (version "1.06")
1005 (source (origin
1006 (method url-fetch)
1007 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
1008 "XML-Compile-Cache-" version ".tar.gz"))
1009 (sha256
1010 (base32
1011 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
1012 (build-system perl-build-system)
1013 (propagated-inputs
1014 (list perl-log-report perl-xml-compile perl-xml-compile-tester
1015 perl-xml-libxml-simple))
1016 (home-page "https://metacpan.org/release/XML-Compile-Cache")
1017 (synopsis "Cache compiled XML translators")
1018 (description
1019 "This package provides methods to cache compiled XML translators.")
1020 (license license:perl-license)))
1021
1022(define-public perl-xml-compile-soap
1023 (package
1024 (name "perl-xml-compile-soap")
1025 (version "3.27")
1026 (source (origin
1027 (method url-fetch)
1028 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
1029 "XML-Compile-SOAP-" version ".tar.gz"))
1030 (sha256
1031 (base32
1032 "1a3650al287x781i3flylwbik1ss3xfw7sgdcaz5qrjqvhpn6mnn"))))
1033 (build-system perl-build-system)
1034 (propagated-inputs
1035 (list perl-file-slurper
1036 perl-libwww
1037 perl-log-report
1038 perl-xml-compile
1039 perl-xml-compile-cache
1040 perl-xml-compile-tester))
1041 (home-page "https://metacpan.org/release/XML-Compile-SOAP")
1042 (synopsis "Base-class for SOAP implementations")
1043 (description
1044 "This module provides a class to handle the SOAP protocol. The first
1045implementation is @url{SOAP1.1,
1046http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
1047used.")
1048 (license license:perl-license)))
1049
1050(define-public perl-xml-compile-wsdl11
1051 (package
1052 (name "perl-xml-compile-wsdl11")
1053 (version "3.07")
1054 (source (origin
1055 (method url-fetch)
1056 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
1057 "XML-Compile-WSDL11-" version ".tar.gz"))
1058 (sha256
1059 (base32
1060 "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba"))))
1061 (build-system perl-build-system)
1062 (propagated-inputs
1063 (list perl-log-report perl-xml-compile perl-xml-compile-cache
1064 perl-xml-compile-soap))
1065 (home-page "https://metacpan.org/release/XML-Compile-WSDL11")
1066 (synopsis "Create SOAP messages defined by WSDL 1.1")
1067 (description
1068 "This module understands WSDL version 1.1. A WSDL file defines a set of
1069messages to be send and received over SOAP connections. This involves
1070encoding of the message to be send into XML, sending the message to the
1071server, collect the answer, and finally decoding the XML to Perl.")
1072 (license license:perl-license)))
1073
1074(define-public perl-xml-feed
1075 (package
1076 (name "perl-xml-feed")
1077 (version "0.63")
1078 (source (origin
1079 (method url-fetch)
1080 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
1081 "XML-Feed-" version ".tar.gz"))
1082 (sha256
1083 (base32
1084 "04frqhikmyq0i9ldraisbvppyjhqg6gz83l2rqpmp4f2h9n9k2lw"))))
1085 (build-system perl-build-system)
1086 (native-inputs
1087 (list perl-module-build perl-uri perl-class-data-inheritable))
1088 (propagated-inputs
1089 (list perl-class-errorhandler
1090 perl-datetime
1091 perl-datetime-format-flexible
1092 perl-datetime-format-iso8601
1093 perl-datetime-format-mail
1094 perl-datetime-format-natural
1095 perl-datetime-format-w3cdtf
1096 perl-feed-find
1097 perl-html-parser
1098 perl-libwww
1099 perl-module-pluggable
1100 perl-uri-fetch
1101 perl-xml-atom
1102 perl-xml-libxml
1103 perl-xml-rss))
1104 (home-page "https://metacpan.org/release/XML-Feed")
1105 (synopsis "XML Syndication Feed Support")
1106 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
1107Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
1108@code{XML::Feed} supports the following syndication feed formats:
1109RSS 0.91, RSS 1.0, RSS 2.0, Atom")
1110 (license license:perl-license)))
1111
1112(define-public perl-xml-xpath
1113 (package
1114 (name "perl-xml-xpath")
1115 (version "1.48")
1116 (source (origin
1117 (method url-fetch)
1118 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
1119 "XML-XPath-" version ".tar.gz"))
1120 (sha256
1121 (base32
1122 "1kch6w4zk7rzfimbwakz8qyhjhrvnp97158af0p5p7i3dgimpivv"))))
1123 (build-system perl-build-system)
1124 (arguments
1125 (list
1126 #:phases
1127 #~(modify-phases %standard-phases
1128 (add-after 'install 'wrap-xpath
1129 (lambda _
1130 (let ((xpath (string-append #$output "/bin/xpath"))
1131 (perl5lib
1132 (search-path-as-list
1133 '("/lib/perl5/site_perl")
1134 (list #$(this-package-input "perl-xml-parser")
1135 #$output))))
1136 (wrap-program xpath
1137 `("PERL5LIB" ":" prefix ,perl5lib)))))
1138 (add-after 'wrap-xpath 'check-wrap
1139 (lambda* (#:key tests? #:allow-other-keys)
1140 (when tests?
1141 (unsetenv "PERL5LIB")
1142 (invoke/quiet (string-append #$output "/bin/xpath"))))))))
1143 (native-inputs
1144 (list perl-path-tiny perl-test-leaktrace))
1145 (propagated-inputs
1146 (list perl-xml-parser))
1147 (home-page "https://metacpan.org/release/XML-XPath")
1148 (synopsis "Parse and evaluate XPath statements")
1149 (description
1150 "This module aims to comply exactly to the @url{XPath specification,
1151https://www.w3.org/TR/xpath} and yet allow extensions to be added in
1152the form of functions. It also provides the command @command{xpath}.")
1153 (license license:perl-license)))
1154
1155(define-public pugixml
1156 (package
1157 (name "pugixml")
1158 (version "1.12.1")
1159 (source
1160 (origin
1161 (method url-fetch)
1162 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
1163 version "/pugixml-" version ".tar.gz"))
1164 (sha256
1165 (base32 "1ixg6fpr7vhkg9bn2g2qmmwpy974z7nx7zq81whm2h6c36lp3xnw"))))
1166 (build-system cmake-build-system)
1167 (arguments
1168 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
1169 #:tests? #f)) ; no tests
1170 (native-inputs
1171 (list pkg-config))
1172 (home-page "https://pugixml.org")
1173 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
1174 (description
1175 "pugixml is a C++ XML processing library, which consists of a DOM-like
1176interface with rich traversal/modification capabilities, a fast XML parser
1177which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
1178implementation for complex data-driven tree queries. Full Unicode support is
1179also available, with Unicode interface variants and conversions between
1180different Unicode encodings which happen automatically during
1181parsing/saving.")
1182 (license license:expat)))
1183
1184(define-public pugixml-next
1185 (package
1186 (inherit pugixml)
1187 (name "pugixml-next")
1188 (version "1.15")
1189 (source
1190 (origin
1191 (method url-fetch)
1192 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
1193 version "/pugixml-" version ".tar.gz"))
1194 (sha256
1195 (base32 "06ji1pcm74y7i0gxs5fl8nqxsjq6nl9h36pbq8hv8gvhz9bxwnk5"))))))
1196
1197(define-public python-pyxb-x
1198 (package
1199 (name "python-pyxb-x")
1200 (version "1.2.6.3")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "pyxb_x" version))
1205 (sha256
1206 (base32 "1d9p42aklk0w5yy39p319h5ldvy7glng0jcgcjk6xgg6sfl1yh5z"))))
1207 (build-system pyproject-build-system)
1208 (arguments
1209 ;; XXX: tests FAILED (failures=3, errors=122)
1210 (list #:tests? #f))
1211 (native-inputs (list python-setuptools python-wheel))
1212 (home-page "http://pyxb.sourceforge.net")
1213 (synopsis "Python XML Schema Bindings")
1214 (description
1215 "@code{PyXB-X} (\"pixbix\") is a pure Python package that generates Python source
1216code for classes that correspond to data structures defined by XMLSchema.")
1217 (license (list license:asl2.0 ; Most files.
1218 license:expat ; pyxb/utils/six.py
1219 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
1220 license:psfl)))) ; pyxb/utils/activestate.py
1221
1222(define-public xmlto
1223 (package
1224 (name "xmlto")
1225 (version "0.0.28")
1226 (source
1227 (origin
1228 (method url-fetch)
1229 ;; The old source on fedorahosted.org is offline permanently:
1230 ;; <https://bugs.gnu.org/25989>
1231 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
1232 "xmlto_" version ".orig.tar.bz2"))
1233 (file-name (string-append name "-" version ".tar.bz2"))
1234 (sha256
1235 (base32
1236 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
1237 (build-system gnu-build-system)
1238 (arguments
1239 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
1240 (list
1241 #:configure-flags
1242 #~(list "CFLAGS=-g -O2 -Wno-error=implicit-int"
1243 (string-append "GETOPT="
1244 #$(this-package-input "util-linux")
1245 "/bin/getopt"))))
1246 (native-inputs
1247 (list util-linux))
1248 (inputs
1249 (list util-linux ; for 'getopt'
1250 libxml2 ; for 'xmllint'
1251 libxslt)) ; for 'xsltproc'
1252 (native-search-paths %libxslt-search-paths)
1253 (home-page "http://cyberelk.net/tim/software/xmlto/")
1254 (synopsis "Front-end to an XSL toolchain")
1255 (description
1256 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
1257stylesheet for the conversion you want and applies it using an external
1258XSL-T processor. It also performs any necessary post-processing.")
1259 (license license:gpl2+)))
1260
1261(define-public xmlsec
1262 (package
1263 (name "xmlsec")
1264 (version "1.3.9")
1265 (source (origin
1266 (method url-fetch)
1267 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
1268 "xmlsec1-" version ".tar.gz"))
1269 (sha256
1270 (base32
1271 "0bxnz4y097gbx1hx945h7j5pdycwbba3bfgmp6nyd1kbgb6whcd6"))))
1272 (build-system gnu-build-system)
1273 (arguments
1274 (list
1275 #:configure-flags
1276 ;; Enabling dynamic loading requires to set LD_LIBRARY_PATH, instead
1277 ;; separate packages are used, so it has no added value.
1278 #~(list "--disable-crypto-dl"
1279 "--disable-apps-crypto-dl")))
1280 (propagated-inputs ; according to xmlsec1.pc
1281 (list libxml2 libxslt))
1282 (inputs
1283 (list gnutls libgcrypt))
1284 (native-inputs
1285 (list pkg-config))
1286 (home-page "https://www.aleksey.com/xmlsec/")
1287 (synopsis "XML Security Library")
1288 (description
1289 "The XML Security Library is a C library based on Libxml2. It
1290supports XML security standards such as XML Signature, XML Encryption,
1291Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
1292Libxml2).")
1293 (properties
1294 '((upstream-name . "xmlsec1")))
1295 (license (license:x11-style "file://COPYING"
1296 "See 'COPYING' in the distribution."))))
1297
1298(define-public xmlsec-nss
1299 (package/inherit xmlsec
1300 (name "xmlsec-nss")
1301 (native-inputs
1302 (modify-inputs native-inputs
1303 (prepend `(,nss "bin")))) ;certutil, for tests
1304 (inputs
1305 (list nss libltdl))
1306 (arguments
1307 ;; NSS no longer supports MD5 since 3.59, don't attempt to use it.
1308 '(#:configure-flags '("--disable-md5")))
1309 (synopsis "XML Security Library (using NSS instead of GnuTLS)")))
1310
1311(define-public xmlsec-openssl
1312 (package/inherit xmlsec
1313 (name "xmlsec-openssl")
1314 (inputs
1315 (list openssl libltdl))
1316 (synopsis "XML Security Library (using OpenSSL instead of GnuTLS)")))
1317
1318(define-public minixml
1319 (package
1320 (name "minixml")
1321 (version "3.3.1")
1322 (source (origin
1323 (method url-fetch)
1324 (uri (string-append "https://github.com/michaelrsweet/mxml/"
1325 "releases/download/v" version
1326 "/mxml-" version ".tar.gz"))
1327 (sha256
1328 (base32
1329 "0cncvb0xhbq2i7rszj6pmcs3b97f0a17j081z0cmcfrrzv8kwrhc"))))
1330 (build-system gnu-build-system)
1331 (arguments
1332 (list
1333 #:configure-flags
1334 #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
1335 #:tests? #f)) ; tests are run during build
1336 (home-page "https://www.msweet.org/mxml/")
1337 (synopsis "Small XML parsing library")
1338 (description
1339 "Mini-XML is a small C library to read and write XML files and strings in
1340UTF-8 and UTF-16 encoding.")
1341 ;; LGPL 2.0+ with additional exceptions for static linking
1342 (license license:lgpl2.0+)))
1343
1344;; TinyXML is an unmaintained piece of software, so the patches and build
1345;; system massaging have no upstream potential.
1346(define-public tinyxml
1347 (package
1348 (name "tinyxml")
1349 (version "2.6.2")
1350 (source (origin
1351 (method url-fetch)
1352 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1353 version "/tinyxml_"
1354 (string-join (string-split version #\.) "_")
1355 ".tar.gz"))
1356 (file-name (string-append name "-" version ".tar.gz"))
1357 (sha256
1358 (base32
1359 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
1360 (patches (search-patches "tinyxml-use-stl.patch"
1361 "tinyxml-CVE-2023-34194.patch"))))
1362 (build-system gnu-build-system)
1363 ;; This library is missing *a lot* of the steps to make it usable, so we
1364 ;; have to add them here, like every other distro must do.
1365 (arguments
1366 `(#:phases
1367 (modify-phases %standard-phases
1368 (delete 'configure)
1369 (add-after 'build 'build-shared-library
1370 (lambda _
1371 (invoke ,(cxx-for-target) "-Wall" "-O2" "-shared" "-fpic"
1372 "tinyxml.cpp" "tinyxmlerror.cpp"
1373 "tinyxmlparser.cpp" "tinystr.cpp"
1374 "-o" "libtinyxml.so")))
1375 (replace 'check
1376 (lambda* (#:key tests? #:allow-other-keys)
1377 (when tests?
1378 (invoke "./xmltest"))))
1379 (replace 'install
1380 (lambda* (#:key outputs #:allow-other-keys)
1381 (let* ((out (assoc-ref outputs "out"))
1382 (include (string-append out "/include"))
1383 (lib (string-append out "/lib"))
1384 (pkgconfig (string-append out "/lib/pkgconfig"))
1385 (doc (string-append out "/share/doc")))
1386 ;; Install libs and headers.
1387 (install-file "libtinyxml.so" lib)
1388 (install-file "tinystr.h" include)
1389 (install-file "tinyxml.h" include)
1390 ;; Generate and install pkg-config file.
1391 (mkdir-p pkgconfig)
1392 ;; Software such as Kodi expect this file to be present, but
1393 ;; it's not provided in the source code.
1394 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1395 (lambda (port)
1396 (format port "prefix=~a
1397exec_prefix=${prefix}
1398libdir=${exec_prefix}/lib
1399includedir=${prefix}/include
1400
1401Name: TinyXML
1402Description: A simple, small, C++ XML parser
1403Version: ~a
1404Libs: -L${libdir} -ltinyxml
1405Cflags: -I${includedir}
1406"
1407 out ,version)))
1408 ;; Install docs.
1409 (mkdir-p doc)
1410 (copy-recursively "docs" (string-append doc "tinyxml"))
1411 #t))))))
1412 (synopsis "Small XML parser for C++")
1413 (description "TinyXML is a small and simple XML parsing library for the
1414C++ programming language.")
1415 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1416 (license license:zlib)))
1417
1418(define-public tinyxml2
1419 (package
1420 (name "tinyxml2")
1421 (version "11.0.0")
1422 (source
1423 (origin
1424 (method git-fetch)
1425 (uri (git-reference
1426 (url "https://github.com/leethomason/tinyxml2")
1427 (commit version)))
1428 (file-name (git-file-name name version))
1429 (sha256
1430 (base32 "19cvjaq16z777xyi8krgc5jif5wkjv1ikw2icijprlj0zi5511dd"))))
1431 (build-system cmake-build-system)
1432 (arguments
1433 (list
1434 #:configure-flags
1435 #~(list "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
1436 "-DBUILD_SHARED_LIBS=ON")))
1437 (synopsis "Small XML parser for C++")
1438 (description "TinyXML2 is a small and simple XML parsing library for the
1439C++ programming language.")
1440 (home-page "https://leethomason.github.io/tinyxml2/")
1441 (license license:zlib)))
1442
1443(define-public xmlstarlet
1444 (package
1445 (name "xmlstarlet")
1446 (version "1.6.1")
1447 (source
1448 (origin
1449 (method url-fetch)
1450 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1451 version "/xmlstarlet-" version ".tar.gz"))
1452 (sha256
1453 (base32
1454 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1455 (build-system gnu-build-system)
1456 (arguments
1457 '(#:phases
1458 (modify-phases %standard-phases
1459 (add-before 'check 'drop-failing-tests
1460 (lambda _
1461 ;; FIXME: Why are these tests failing.
1462 (substitute* "Makefile"
1463 (("^examples/schema1\\\\") "\\")
1464 (("^examples/valid1\\\\") "\\"))
1465 #t))
1466 (add-after 'install 'symlink-xmlstarlet
1467 (lambda* (#:key outputs #:allow-other-keys)
1468 ;; Other distros usually either rename or symlink the `xml' binary
1469 ;; as `xmlstarlet', let's do it as well for compatibility.
1470 (let* ((out (assoc-ref outputs "out"))
1471 (bin (string-append out "/bin")))
1472 (symlink "xml" (string-append bin "/xmlstarlet"))
1473 #t))))))
1474 (inputs
1475 (list libxslt libxml2-2.11))
1476 (home-page "https://xmlstar.sourceforge.net/")
1477 (synopsis "Command line XML toolkit")
1478 (description "XMLStarlet is a set of command line utilities which can be
1479used to transform, query, validate, and edit XML documents. XPath is used to
1480match and extract data, and elements can be added, deleted or modified using
1481XSLT and EXSLT.")
1482 (license license:x11)))
1483
1484(define-public html-xml-utils
1485 (package
1486 (name "html-xml-utils")
1487 (version "8.6")
1488 (source
1489 (origin
1490 (method url-fetch)
1491 (uri (string-append
1492 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1493 version ".tar.gz"))
1494 (sha256
1495 (base32 "1cjgvgrg3bjfxfl0nh55vhr37ijld7pd8bl7s8j3kkbcyfg7512y"))))
1496 (build-system gnu-build-system)
1497 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1498 (synopsis "Command line utilities to manipulate HTML and XML files")
1499 (description "HTML-XML-utils provides a number of simple utilities for
1500manipulating and converting HTML and XML files in various ways. The suite
1501consists of the following tools:
1502
1503@itemize
1504 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1505 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1506 @item @command{hxaddid} add IDs to selected elements
1507 @item @command{hxcite} replace bibliographic references by hyperlinks
1508 @item @command{hxcite} mkbib - expand references and create bibliography
1509 @item @command{hxclean} apply heuristics to correct an HTML file
1510 @item @command{hxcopy} copy an HTML file while preserving relative links
1511 @item @command{hxcount} count elements and attributes in HTML or XML files
1512 @item @command{hxextract} extract selected elements
1513 @item @command{hxincl} expand included HTML or XML files
1514 @item @command{hxindex} create an alphabetically sorted index
1515 @item @command{hxmkbib} create bibliography from a template
1516 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1517 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1518elements to their parents
1519 @item @command{hxnormalize} pretty-print an HTML file
1520 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1521 @item @command{hxnum} number section headings in an HTML file
1522 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1523 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1524 @item @command{hxprune} remove marked elements from an HTML file
1525 @item @command{hxref} generate cross-references
1526 @item @command{hxselect} extract elements that match a (CSS) selector
1527 @item @command{hxtoc} insert a table of contents in an HTML file
1528 @item @command{hxuncdata} replace CDATA sections by character entities
1529 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1530 @item @command{hxunpipe} convert output of pipe back to XML format
1531 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1532 @item @command{hxwls} list links in an HTML file
1533 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1534@end itemize
1535")
1536 (license license:expat)))
1537
1538(define-public xlsx2csv
1539 (package
1540 (name "xlsx2csv")
1541 (version "0.8.3")
1542 (source
1543 (origin
1544 (method git-fetch)
1545 (uri (git-reference
1546 (url "https://github.com/dilshod/xlsx2csv")
1547 (commit version)))
1548 (file-name (git-file-name name version))
1549 (sha256
1550 (base32 "0cg2zf6dqnxdcsw0bpjz49sa7360iz9bvc9j7c50qhp9ms81vfs8"))))
1551 (build-system pyproject-build-system)
1552 (arguments
1553 (list
1554 #:phases
1555 #~(modify-phases %standard-phases
1556 (replace 'check
1557 (lambda* (#:key tests? #:allow-other-keys)
1558 (substitute* "test/run"
1559 ;; Run tests with `python' only.
1560 (("^(PYTHON_VERSIONS = ).*" all m)
1561 (string-append m "['']")))
1562 (when tests?
1563 (invoke "test/run")))))))
1564 (native-inputs (list python-setuptools))
1565 (home-page "https://github.com/dilshod/xlsx2csv")
1566 (synopsis "XLSX to CSV converter")
1567 (description
1568 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1569XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1570files. It is designed to be fast and to handle large input files.")
1571 (license license:gpl2+)))
1572
1573(define-public python-defusedxml
1574 (package
1575 (name "python-defusedxml")
1576 (properties '((upstream-version . "0.7.1")
1577 (commit . "c7445887f5e1bcea470a16f61369d29870cfcfe1")
1578 (revision . "0")))
1579 (version (git-version (assoc-ref properties 'upstream-version)
1580 (assoc-ref properties 'revision)
1581 (assoc-ref properties 'commit)))
1582 (source
1583 (origin
1584 (method git-fetch)
1585 (uri (git-reference
1586 (url "https://github.com/tiran/defusedxml")
1587 (commit (assoc-ref properties 'commit))))
1588 (file-name (git-file-name name version))
1589 (sha256
1590 (base32 "08926fginj14ahbym34va7rawfvnqq46hbfx33g66rw5lajcl4yq"))))
1591 (build-system pyproject-build-system)
1592 (arguments
1593 (list
1594 #:test-backend #~'custom
1595 #:test-flags #~(list "tests.py")
1596 #:phases
1597 #~(modify-phases %standard-phases
1598 ;; Most dependents require ^0.7.1, source indicates 0.8.0rc2
1599 ;; but is necessary at this version to build with [email protected]
1600 ;; Fake still being 0.7.1, despite running on [email protected].
1601 (add-after 'unpack 'patch-version
1602 (lambda _
1603 (substitute* "defusedxml/__init__.py"
1604 (("__version__ = .*")
1605 (format #f "__version__ = ~s~%"
1606 #$(assoc-ref properties 'upstream-version)))))))))
1607 (home-page "https://github.com/tiran/defusedxml")
1608 (native-inputs
1609 (list python-setuptools))
1610 (synopsis "XML bomb protection for Python stdlib modules")
1611 (description
1612 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1613 (license license:psfl)))
1614
1615(define-public freexl
1616 (package
1617 (name "freexl")
1618 (version "2.0.0")
1619 (source (origin
1620 (method url-fetch)
1621 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1622 "freexl-sources/"
1623 "freexl-" version ".tar.gz"))
1624 (sha256
1625 (base32
1626 "1w57w73gfj2niz9dn235hn5wsvxpdbj6sp5zxcg7rasqvvqharqp"))))
1627 (build-system gnu-build-system)
1628 (inputs
1629 (list expat minizip))
1630 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1631 (synopsis "Read Excel files")
1632 (description
1633 "FreeXL is a C library to extract valid data from within an Excel
1634(.xls, .xlsx) or LibreOffice (.ods) spreadsheet.")
1635 ;; Any of these licenses may be picked.
1636 (license (list license:gpl2+
1637 license:lgpl2.1+
1638 license:mpl1.1))))
1639
1640(define-public xerces-c
1641 (package
1642 (name "xerces-c")
1643 (version "3.3.0")
1644 (source (origin
1645 (method url-fetch)
1646 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1647 "xerces-c-" version ".tar.xz"))
1648 (sha256
1649 (base32
1650 "0rqjqlrd0k8aib8xfql5jsmfw1pjnvdrz5wjql4ylkywhapi4gm8"))))
1651 (build-system gnu-build-system)
1652 (arguments
1653 (let ((system (or (%current-target-system)
1654 (%current-system))))
1655 (if (string-prefix? "x86_64" system)
1656 '()
1657 '(#:configure-flags '("--disable-sse2")))))
1658 (native-inputs
1659 (list perl))
1660 (home-page "https://xerces.apache.org/xerces-c/")
1661 (synopsis "Validating XML parser library for C++")
1662 (description "Xerces-C++ is a validating XML parser written in a portable
1663subset of C++. Xerces-C++ makes it easy to give your application the ability
1664to read and write XML data. A shared library is provided for parsing,
1665generating, manipulating, and validating XML documents using the DOM, SAX, and
1666SAX2 APIs.")
1667 (license license:asl2.0)))
1668
1669(define-public xlsxio
1670 (package
1671 (name "xlsxio")
1672 (version "0.2.35")
1673 (source
1674 (origin
1675 (method git-fetch)
1676 (uri (git-reference
1677 (url "https://github.com/brechtsanders/xlsxio")
1678 (commit version)))
1679 (file-name (git-file-name name version))
1680 (sha256
1681 (base32 "140ap2l3qy27z1fhqpkq3a44aikhr3v5zlnm9m8vag42qiagiznx"))))
1682 (native-inputs (list expat minizip pkg-config))
1683 (build-system cmake-build-system)
1684 (arguments (list #:tests? #f)) ;no test suite
1685 (synopsis "C library for reading and writing .xlsx files")
1686 (description "XLSX I/O aims to provide a C library for reading and writing
1687.xlsx files. The .xlsx file format is the native format used by Microsoft(R)
1688Excel(TM) since version 2007.")
1689 (home-page "https://github.com/brechtsanders/xlsxio")
1690 (license license:expat)))
1691
1692(define-public perl-xml-xpathengine
1693 (package
1694 (name "perl-xml-xpathengine")
1695 (version "0.14")
1696 (source (origin
1697 (method url-fetch)
1698 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1699 "XML-XPathEngine-" version ".tar.gz"))
1700 (sha256
1701 (base32
1702 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1703 (build-system perl-build-system)
1704 (home-page "https://metacpan.org/release/XML-XPathEngine")
1705 (synopsis "Re-usable XPath engine for DOM-like trees")
1706 (description
1707 "This module provides an XPath engine, that can be re-used by other
1708modules/classes that implement trees.
1709
1710In order to use the XPath engine, nodes in the user module need to mimic DOM
1711nodes. The degree of similitude between the user tree and a DOM dictates how
1712much of the XPath features can be used. A module implementing all of the DOM
1713should be able to use this module very easily (you might need to add the
1714@code{cmp} method on nodes in order to get ordered result sets).")
1715 (license license:perl-license)))
1716
1717(define-public perl-tree-xpathengine
1718 (package
1719 (name "perl-tree-xpathengine")
1720 (version "0.05")
1721 (source (origin
1722 (method url-fetch)
1723 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1724 "Tree-XPathEngine-" version ".tar.gz"))
1725 (sha256
1726 (base32
1727 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1728 (build-system perl-build-system)
1729 (home-page "https://metacpan.org/release/Tree-XPathEngine")
1730 (synopsis "Re-usable XPath engine")
1731 (description
1732 "This module provides an XPath engine, that can be re-used by other
1733module/classes that implement trees. It is designed to be compatible with
1734@code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1735by @code{Tree::XPathEngine}.")
1736 (license license:perl-license)))
1737
1738(define-public perl-xml-filter-buffertext
1739 (package
1740 (name "perl-xml-filter-buffertext")
1741 (version "1.01")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1746 "XML-Filter-BufferText-" version ".tar.gz"))
1747 (sha256
1748 (base32
1749 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1750 (build-system perl-build-system)
1751 (propagated-inputs
1752 (list perl-xml-sax-base))
1753 (home-page "https://metacpan.org/release/XML-Filter-BufferText")
1754 (synopsis "Filter to put all characters() in one event")
1755 (description "This is a very simple filter. One common cause of
1756grief (and programmer error) is that XML parsers aren't required to provide
1757character events in one chunk. They can, but are not forced to, and most
1758don't. This filter does the trivial but oft-repeated task of putting all
1759characters into a single event.")
1760 (license license:perl-license)))
1761
1762(define-public perl-xml-sax-writer
1763 (package
1764 (name "perl-xml-sax-writer")
1765 (version "0.57")
1766 (source (origin
1767 (method url-fetch)
1768 (uri (string-append
1769 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1770 "XML-SAX-Writer-" version ".tar.gz"))
1771 (sha256
1772 (base32
1773 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1774 (build-system perl-build-system)
1775 (propagated-inputs
1776 (list perl-libxml perl-xml-filter-buffertext
1777 perl-xml-namespacesupport perl-xml-sax-base))
1778 (home-page "https://metacpan.org/release/XML-SAX-Writer")
1779 (synopsis "SAX2 XML Writer")
1780 (description
1781 "This is an XML writer that understands SAX2. It is based on
1782@code{XML::Handler::YAWriter}.")
1783 (license license:perl-license)))
1784
1785(define-public perl-xml-handler-yawriter
1786 (package
1787 (name "perl-xml-handler-yawriter")
1788 (version "0.23")
1789 (source
1790 (origin
1791 (method url-fetch)
1792 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1793 "XML-Handler-YAWriter-" version ".tar.gz"))
1794 (sha256
1795 (base32
1796 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1797 (build-system perl-build-system)
1798 (propagated-inputs
1799 (list perl-libxml))
1800 (home-page "https://metacpan.org/release/XML-Handler-YAWriter")
1801 (synopsis "Yet another Perl SAX XML Writer")
1802 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1803It provides a flexible escaping technique and pretty printing.")
1804 (license license:perl-license)))
1805
1806(define-public perl-xml-twig
1807 (package
1808 (name "perl-xml-twig")
1809 (version "3.52")
1810 (source (origin
1811 (method url-fetch)
1812 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1813 "XML-Twig-" version ".tar.gz"))
1814 (sha256
1815 (base32
1816 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1817 (build-system perl-build-system)
1818 (inputs
1819 (list expat))
1820 (propagated-inputs
1821 (list perl-html-tidy
1822 perl-html-tree
1823 perl-io-captureoutput
1824 perl-io-string
1825 perl-io-stringy
1826 perl-libxml
1827 perl-xml-filter-buffertext
1828 perl-xml-handler-yawriter
1829 perl-xml-parser
1830 perl-xml-sax-writer
1831 perl-xml-simple
1832 perl-xml-xpathengine
1833 perl-test-pod
1834 perl-tree-xpathengine))
1835 (home-page "https://metacpan.org/release/XML-Twig")
1836 (synopsis "Perl module for processing huge XML documents in tree mode")
1837 (description "@code{XML::Twig} is an XML transformation module. Its
1838strong points: can be used to process huge documents while still being in tree
1839mode; not bound by DOM or SAX, so it is very perlish and offers a very
1840comprehensive set of methods; simple to use; DWIMs as much as possible.
1841
1842What it doesn't offer: full SAX support (it can export SAX, but only reads
1843XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1844support.")
1845 (license license:perl-license)))
1846
1847(define-public xmlrpc-c
1848 (package
1849 (name "xmlrpc-c")
1850 (version "1.43.08")
1851 (source (origin
1852 (method url-fetch)
1853 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
1854 version "/xmlrpc-c-" version ".tgz"))
1855 (sha256
1856 (base32
1857 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
1858 (build-system gnu-build-system)
1859 (inputs
1860 (list curl))
1861 (native-inputs
1862 (list ;; For tools, if ever needed.
1863 perl))
1864 (arguments
1865 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
1866 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
1867 #:phases
1868 (modify-phases %standard-phases
1869 (add-after 'unpack 'fix-/bin/sh-in-tests
1870 (lambda _
1871 (substitute* "GNUmakefile"
1872 (("#! /bin/sh") (which "sh")))
1873 #t)))))
1874 (home-page "https://xmlrpc-c.sourceforge.net/")
1875 (synopsis "Lightweight RPC library based on XML and HTTP")
1876 (description
1877 "XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
1878It converts the procedure call into an XML document, sends it to a remote
1879server using HTTP, and gets back the response as XML. This library provides a
1880modular implementation of XML-RPC for C and C++.")
1881 (license (list license:psfl license:expat))))
1882
1883(define-public opensp
1884 (package
1885 (name "opensp")
1886 (version "1.5.2")
1887 (source (origin
1888 (method url-fetch)
1889 (uri (string-append "mirror://sourceforge/openjade/opensp/"
1890 version "/OpenSP-" version ".tar.gz"))
1891 (sha256
1892 (base32
1893 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
1894 (outputs '("out" "doc"))
1895 (build-system gnu-build-system)
1896 (native-inputs
1897 (list docbook-xml-4.1.2
1898 docbook-xsl
1899 xmlto
1900 ;; Dependencies to regenerate the 'configure' script.
1901 autoconf
1902 automake
1903 gettext-minimal
1904 libtool))
1905 (arguments
1906 (list
1907 ;; Note: we cannot use '--enable-full-doc-build' as this would require
1908 ;; Openjade, which in turn requires this package.
1909
1910 ;; Skip the tests that are known to fail (see:
1911 ;; https://sourceforge.net/p/openjade/mailman/message/6182316/)
1912 #:make-flags #~(list "TESTS_THAT_FAIL=")
1913 #:phases
1914 #~(modify-phases %standard-phases
1915 #$@(if (target-hurd?)
1916 #~((add-after 'unpack 'patch-hurd
1917 (lambda _
1918 (let ((patch #$(local-file
1919 (search-patch "opensp-maxpathlen.patch"))))
1920 (invoke "patch" "--force" "-p1" "-i" patch)))))
1921 #~())
1922 (add-after 'unpack 'delete-configure
1923 ;; The configure script in the release was made with an older
1924 ;; Autoconf and lacks support for the `--docdir' option.
1925 (lambda _
1926 (delete-file "configure")))
1927 (add-after 'delete-configure 'honor-docdir
1928 ;; docdir is not honored due to being hardcoded in the various
1929 ;; Makefile.am (see: https://sourceforge.net/p/openjade/bugs/147/).
1930 (lambda _
1931 (substitute* '("Makefile.am" "doc/Makefile.am" "docsrc/Makefile.am")
1932 (("^docdir = .*") "docdir = @docdir@\n"))))
1933 (add-after 'delete-configure 'fix-tests-makefile.am
1934 ;; Remove the trailing $(SHELL) from the TESTS_ENVIRONMENT variable
1935 ;; definition. Otherwise, when targets are built using
1936 ;; "$(am__check_pre) $(LOG_DRIVER) [...]", there would be two
1937 ;; $(SHELL) expansion which fails the build.
1938 (lambda _
1939 (substitute* "tests/Makefile.am"
1940 (("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
1941 "\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
1942 (("^\t\\$\\(SHELL\\)\n") "")))))))
1943 (native-search-paths (list $SGML_CATALOG_FILES))
1944 (home-page "https://openjade.sourceforge.net/")
1945 (synopsis "Suite of SGML/XML processing tools")
1946 (description "OpenSP is an object-oriented toolkit for SGML parsing and
1947entity management. It is a fork of James Clark's SP suite. The tools it
1948contains can be used to parse, validate, and normalize SGML and XML files.
1949The central program included in this package is @code{onsgmls}, which replaces
1950@code{sgmls}, @code{ospam}, @code{ospent}, @code{osgmlnorm}, and @code{osx}.")
1951 (license
1952 ;; expat license with added clause regarding advertising
1953 (license:non-copyleft
1954 "file://COPYING"
1955 "See COPYING in the distribution."))))
1956
1957(define-public python-elementpath
1958 (package
1959 (name "python-elementpath")
1960 (version "5.0.4")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (pypi-uri "elementpath" version))
1965 (sha256
1966 (base32
1967 "1yr5ka198p1c1yw0dpmvz5mvxr6b29mz64hb2vxax53fbmb97vc5"))))
1968 (build-system pyproject-build-system)
1969 (arguments
1970 (list
1971 #:test-backend #~'unittest))
1972 (native-inputs
1973 (list (libc-utf8-locales-for-target (%current-system))
1974 python-setuptools
1975 python-lxml
1976 python-xmlschema-bootstrap))
1977 (home-page "https://github.com/sissaschool/elementpath")
1978 (synopsis "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
1979 (description
1980 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
1981for Python's ElementTree XML data structures, both for the standard
1982ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
1983
1984For lxml.etree this package can be useful for providing XPath 2.0 selectors,
1985because lxml.etree already has its own implementation of XPath 1.0.")
1986 (license license:expat)))
1987
1988(define-public python-lxml
1989 (package
1990 (name "python-lxml")
1991 (version "6.0.2")
1992 (source
1993 (origin
1994 (method url-fetch)
1995 (uri (pypi-uri "lxml" version))
1996 (sha256
1997 (base32 "0qndw2b7zwjwihbbf1pvwjv9wk9hzbychpb5v9yk2jypgcvg6yfd"))))
1998 (build-system pyproject-build-system)
1999 (arguments
2000 `(#:phases (modify-phases %standard-phases
2001 (replace 'check
2002 (lambda* (#:key tests? #:allow-other-keys)
2003 (when tests?
2004 (invoke "make" "test")))))))
2005 (native-inputs
2006 (list python-setuptools))
2007 (inputs
2008 (list libxml2 libxslt))
2009 (home-page "https://lxml.de/")
2010 (synopsis "Python XML processing library")
2011 (description
2012 "The lxml XML toolkit is a Pythonic binding for the C libraries
2013libxml2 and libxslt.")
2014 (license license:bsd-3))) ; and a few more, see LICENSES.txt
2015
2016(define-public python-lxml-for-texlive
2017 (package
2018 (name "python-lxml-for-texlive")
2019 (version "6.0.1")
2020 (source
2021 (origin
2022 (method url-fetch)
2023 (uri (pypi-uri "lxml" version))
2024 (sha256
2025 (base32 "14064h0pxdsx36nhyjzrw0v16ygz977qf6l0ydnh5p97pwp8hfib"))))
2026 (build-system gnu-build-system)
2027 (arguments
2028 (list
2029 ;; Custom build steps to prevent using pyproject-build-system which
2030 ;; allows to edit the latter without a texlive + haskell world rebuild.
2031 #:test-target "test"
2032 #:phases
2033 #~(modify-phases %standard-phases
2034 (delete 'bootstrap)
2035 (delete 'configure)
2036 (replace 'build
2037 (lambda _
2038 (invoke "python" "./setup.py" "build")))
2039 (replace 'install
2040 (lambda _
2041 (invoke "python" "./setup.py" "install"
2042 (string-append "--prefix=" #$output) "--no-compile")
2043 (invoke "python" "-m" "compileall"
2044 "--invalidation-mode=unchecked-hash" #$output))))))
2045 (native-inputs
2046 (list python-wrapper python-setuptools-bootstrap))
2047 (inputs
2048 (list libxml2 libxslt))
2049 (home-page "https://lxml.de/")
2050 (synopsis "Python XML processing library")
2051 (description
2052 "The lxml XML toolkit is a Pythonic binding for the C libraries
2053libxml2 and libxslt. This variant is pinned to be updated less often than
2054@code{python-lxml}.")
2055 (license license:bsd-3)))
2056
2057(define-public python-lxml-html-clean
2058 (package
2059 (name "python-lxml-html-clean")
2060 (version "0.4.3")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "lxml_html_clean" version))
2065 (sha256
2066 (base32 "134xppqi8y8qfl54vxfgx8852mw2mix15axy0z43dy00bf993py9"))))
2067 (build-system pyproject-build-system)
2068 (arguments
2069 (list
2070 #:phases
2071 #~(modify-phases %standard-phases
2072 (replace 'check
2073 (lambda* (#:key tests? #:allow-other-keys)
2074 (when tests?
2075 (invoke "python" "-m" "unittest" "-v" "tests.test_clean")
2076 (invoke "python" "-m" "doctest"
2077 "tests/test_clean_embed.txt"
2078 "tests/test_clean.txt"
2079 "tests/test_autolink.txt")))))))
2080 (propagated-inputs (list python-lxml))
2081 (native-inputs (list python-setuptools))
2082 (home-page "https://github.com/fedora-python/lxml_html_clean/")
2083 (synopsis "Remove superfluous content from HTML files")
2084 (description "This package provides a Cleaner for cleaning up HTML pages.
2085It supports removing embedded or script content, special tags and CSS style
2086annotations among other features. Its main purpose is removing superfluous
2087content, it is not appropriate for security sensitive environments.")
2088 (license license:bsd-3)))
2089
2090(define-public python-untangle
2091 ;; The latest tagged release is from 2022; use the latest commit.
2092 (let ((revision "2")
2093 (commit "7eec044b6c78f58cc6d8f183b2f9a511bfc334f8"))
2094 (package
2095 (name "python-untangle")
2096 (version (git-version "1.2.1" revision commit))
2097 (source
2098 (origin
2099 (method git-fetch) ;no tests in pypi archive
2100 (uri (git-reference
2101 (url "https://github.com/stchris/untangle")
2102 (commit commit)))
2103 (file-name (git-file-name name version))
2104 (sha256
2105 (base32 "0pcwcrga8cgrqyyzfj01vkqv3xrzl0a8xa5yfi06byk6d85rv6zf"))))
2106 (build-system pyproject-build-system)
2107 (native-inputs
2108 (list python-poetry-core
2109 python-pytest))
2110 (propagated-inputs
2111 (list python-defusedxml))
2112 (home-page "http://0chris.com/untangle")
2113 (synopsis "XML to Python objects conversion library")
2114 (description "@code{untangle} is a tiny Python library which converts an
2115XML document to a Python object.")
2116 (license license:expat))))
2117
2118(define-public python-xmlschema
2119 (package
2120 (name "python-xmlschema")
2121 (version "4.1.0")
2122 (source (origin
2123 ;; Unit tests are not distributed with the PyPI archive.
2124 (method git-fetch)
2125 (uri (git-reference
2126 (url "https://github.com/sissaschool/xmlschema")
2127 (commit (string-append "v" version))))
2128 (file-name (git-file-name name version))
2129 (sha256
2130 (base32
2131 "1bgih9vad1iij8lffddas74gx8kx7qn0b5hr056hmhg5vbiyayyy"))))
2132 (build-system pyproject-build-system)
2133 (arguments (list #:test-backend #~'unittest))
2134 (native-inputs
2135 (list python-lxml
2136 python-setuptools))
2137 (propagated-inputs
2138 (list python-elementpath))
2139 (home-page "https://github.com/sissaschool/xmlschema")
2140 (synopsis "XML Schema validator and data conversion library")
2141 (description
2142 "The @code{xmlschema} library is an implementation of
2143@url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has
2144full support for the XSD 1.0 and 1.1 standards, an XPath-based API for
2145finding schema's elements and attributes; and can encode and decode
2146XML data to JSON and other formats.")
2147 (license license:expat)))
2148
2149(define-public python-xmlschema-bootstrap
2150 (hidden-package
2151 (package/inherit python-xmlschema
2152 (arguments
2153 (list #:tests? #f
2154 #:phases
2155 #~(modify-phases %standard-phases
2156 (delete 'sanity-check))))
2157 (propagated-inputs '()))))
2158
2159(define-public python-xmltodict
2160 (package
2161 (name "python-xmltodict")
2162 (version "0.14.2")
2163 (source
2164 (origin
2165 (method url-fetch)
2166 (uri (pypi-uri "xmltodict" version))
2167 (sha256
2168 (base32
2169 "0lx521w5nlmb937fxym5m38hxar354wfdpfik54kf3i1pcl7q7i0"))))
2170 (build-system pyproject-build-system)
2171 (native-inputs
2172 (list python-pytest
2173 python-setuptools))
2174 (home-page "https://github.com/martinblech/xmltodict")
2175 (synopsis "Work with XML like you are working with JSON")
2176 (description "This package provides a Python library to convert XML to
2177@code{OrderedDict}.")
2178 (license license:expat)))
2179
2180(define-public xml-namespace-xsd
2181 (package
2182 (name "xml-namespace-xsd")
2183 (version "2009-01")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (string-append "https://www.w3.org/"
2188 (string-replace-substring version "-" "/")
2189 "/xml.xsd"))
2190 (sha256
2191 (base32 "0agqmxbhk2q9xa38m02z7ggbb124z6avnqyhz8k43iicqhv1fw6c"))))
2192 (build-system copy-build-system)
2193 (arguments
2194 (list
2195 #:install-plan #~'(("xml.xsd" "/xml/dtd/namespace/xml.xsd")
2196 ("catalog.xml" "/xml/dtd/namespace/catalog.xml"))
2197 #:phases #~(modify-phases %standard-phases
2198 (add-before 'install 'create-catalog
2199 (lambda _
2200 (invoke "xmlcatalog"
2201 "--noout"
2202 "--create"
2203 "--add"
2204 "uri"
2205 "http://www.w3.org/2001/xml.xsd"
2206 "xml.xsd"
2207 "catalog.xml"))))))
2208 (native-inputs (list libxml2))
2209 (home-page "https://www.w3.org/XML/1998/namespace")
2210 (synopsis "XML Schema for XML namespace")
2211 (description
2212 "This package provides an XML Schema and its catalog. The schema constrains the
2213syntax of @code{xml:lang}, @code{xml:spec}, @code{xml:base}, and @code{xml:id} in the
2214schema language defined by the XML Schema Recommendation Second Edition of 28 October
22152004.")
2216 (license license:w3c)))
2217
2218(define-public xmlpatch
2219 (package
2220 (name "xmlpatch")
2221 (version "0.4.5")
2222 (source
2223 (origin
2224 (method git-fetch)
2225 (uri (git-reference
2226 (url "https://github.com/ufz/xmlpatch")
2227 (commit (string-append "v" version))))
2228 (file-name (git-file-name name version))
2229 (sha256
2230 (base32 "10kjg7lz9p4xnv96053mj18dmc7lj7iqzx98z3aagnw6hfwdri7f"))))
2231 (build-system cmake-build-system)
2232 (arguments
2233 `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON")))
2234 (native-inputs (list pkg-config))
2235 (inputs (list libxml2 glib))
2236 (home-page "https://xmlpatch.sourceforge.net")
2237 (synopsis "XML patch library")
2238 (description
2239 "XML Patch is a C++ library and command-line interface
2240(the @command{xml-diff} and @command{xml-patch} commands) for patching XML
2241files with XPath expressions.")
2242 (license license:lgpl2.1+)))