projects/guix·blob kernel-updates · refs

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