1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
10 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
11 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
12 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
13 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
14 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
15 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
16 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
18 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
19 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages xml)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages gnupg)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages python)
43 #:use-module (gnu packages tls)
44 #:use-module (gnu packages web)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix build-system ant)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system perl)
52 #:use-module (guix build-system python)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages pkg-config))
60 (replacement expat-2.2.2)
63 (uri (string-append "mirror://sourceforge/expat/expat/"
64 version "/expat-" version ".tar.bz2"))
67 "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q"))))
68 (build-system gnu-build-system)
69 (home-page "http://www.libexpat.org/")
70 (synopsis "Stream-oriented XML parser library written in C")
72 "Expat is an XML parser library written in C. It is a
73 stream-oriented parser in which an application registers handlers for
74 things the parser might find in the XML document (like start tags).")
75 (license license:expat)))
77 (define expat-2.2.2 ; Fixes CVE-2017-9233, CVE-2016-9063 and other issues.
83 (uri (string-append "mirror://sourceforge/expat/expat/"
84 version "/expat-" version ".tar.bz2"))
87 "0ik0r39ala9c6hj4kxrk933klgwkzlkbrfhvhaykx8l1rwgr2xj3"))))))
89 (define-public libebml
96 (uri (string-append "https://dl.matroska.org/downloads/"
97 name "/" name "-" version ".tar.bz2"))
100 "11zka6z9ncywyjr1gfm5cnii33ln7y3w6s86kiacchip2g7kw3f5"))))
101 (build-system gnu-build-system)
102 (home-page "https://www.matroska.org")
103 (synopsis "C++ libary to parse EBML files")
104 (description "libebml is a C++ library to read and write EBML (Extensible
105 Binary Meta Language) files. EBML was designed to be a simplified binary
106 extension of XML for the purpose of storing and manipulating data in a
107 hierarchical form with variable field lengths.")
108 (license license:lgpl2.1)))
110 (define-public libxml2
114 (replacement libxml2/fixed)
117 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
119 (patches (search-patches "libxml2-CVE-2016-4658.patch"
120 "libxml2-CVE-2016-5131.patch"))
123 "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz"))))
124 (build-system gnu-build-system)
125 (home-page "http://www.xmlsoft.org/")
126 (synopsis "C parser for XML")
127 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
128 (native-inputs `(("perl" ,perl)))
129 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
130 ;; sub-directory of any given package.
131 (native-search-paths (list (search-path-specification
132 (variable "XML_CATALOG_FILES")
135 (file-pattern "^catalog\\.xml$")
136 (file-type 'regular))))
137 (search-paths native-search-paths)
139 "Libxml2 is the XML C parser and toolkit developed for the Gnome
140 project (but it is usable outside of the Gnome platform).")
141 (license license:x11)))
143 (define libxml2/fixed
148 (inherit (package-source libxml2))
150 (append (origin-patches (package-source libxml2))
151 (search-patches "libxml2-CVE-2017-0663.patch"
152 "libxml2-CVE-2017-7375.patch"
153 "libxml2-CVE-2017-7376.patch"
154 "libxml2-CVE-2017-9047+CVE-2017-9048.patch"
155 "libxml2-CVE-2017-9049+CVE-2017-9050.patch")))))))
157 (define-public python-libxml2
158 (package (inherit libxml2)
159 (name "python-libxml2")
160 (build-system python-build-system)
162 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
165 (modify-phases %standard-phases
168 (lambda* (#:key inputs #:allow-other-keys)
170 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
171 "cross-libc" "libc")))
172 (libxml2 (assoc-ref inputs "libxml2")))
173 (substitute* "setup.py"
174 ;; For 'libxml2/libxml/tree.h'.
176 (format #f "ROOT = r'~a'" libxml2))
179 (string-append glibc "/include")))))))))
180 (inputs `(("libxml2" ,libxml2)))
181 (synopsis "Python bindings for the libxml2 library")))
183 (define-public python2-libxml2
184 (package-with-python2 python-libxml2))
186 (define-public libxslt
192 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
194 (patches (search-patches "libxslt-CVE-2016-4738.patch"))
197 "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm"))
198 (patches (search-patches "libxslt-generated-ids.patch"))))
199 (build-system gnu-build-system)
200 (home-page "http://xmlsoft.org/XSLT/index.html")
201 (synopsis "C library for applying XSLT stylesheets to XML documents")
202 (inputs `(("libgcrypt" ,libgcrypt)
204 ("python" ,python-minimal-wrapper)
207 "Libxslt is an XSLT C library developed for the GNOME project. It is
208 based on libxml for XML parsing, tree manipulation and XPath support.")
209 (license license:x11)))
211 (define-public perl-graph-readwrite
213 (name "perl-graph-readwrite")
219 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
224 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
225 (build-system perl-build-system)
227 `(("perl-graph" ,perl-graph)
228 ("perl-parse-yapp" ,perl-parse-yapp)
229 ("perl-xml-parser" ,perl-xml-parser)
230 ("perl-xml-writer" ,perl-xml-writer)))
231 (home-page "http://search.cpan.org/dist/Graph-ReadWrite")
232 (synopsis "Modules for reading and writing directed graphs")
233 (description "This is a collection of perl classes for reading and writing
234 directed graphs in a variety of file formats. The graphs are represented in
235 Perl using Jarkko Hietaniemi's @code{Graph} classes.
237 There are two base classes. @code{Graph::Reader} is the base class for classes
238 which read a graph file and create an instance of the Graph class.
239 @code{Graph::Writer} is the base class for classes which take an instance of
240 the @code{Graph} class and write it out in a specific file format.")
241 (license license:perl-license)))
243 (define-public perl-xml-atom
245 (name "perl-xml-atom")
249 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
250 "XML-Atom-" version ".tar.gz"))
253 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
254 (build-system perl-build-system)
257 (modify-phases %standard-phases
258 (add-before 'check 'set-perl-search-path
261 (string-append (getcwd) ":"
262 (getenv "PERL5LIB")))
265 `(("perl-datetime" ,perl-datetime)
266 ;; TODO package: perl-datetime-format-atom
267 ("perl-html-tagset" ,perl-html-tagset)
268 ("perl-module-build-tiny" ,perl-module-build-tiny)
269 ("perl-module-install" ,perl-module-install)
270 ("perl-xml-xpath" ,perl-xml-xpath)))
272 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
273 ("perl-datetime" ,perl-datetime)
274 ("perl-datetime-timezone" ,perl-datetime-timezone)
275 ("perl-digest-sha1" ,perl-digest-sha1)
276 ("perl-libwww" ,perl-libwww)
277 ("perl-uri" ,perl-uri)
278 ("perl-xml-libxml" ,perl-xml-libxml)
279 ("perl-xml-xpath" ,perl-xml-xpath)))
280 (home-page "http://search.cpan.org/dist/XML-Atom")
281 (synopsis "Atom feed and API implementation")
283 "Atom is a syndication, API, and archiving format for weblogs and other data.
284 @code{XML::Atom} implements the feed format as well as a client for the API.")
285 (license license:perl-license)))
287 (define-public perl-xml-descent
289 (name "perl-xml-descent")
293 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
294 "XML-Descent-" version ".tar.gz"))
297 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
298 (build-system perl-build-system)
300 `(("perl-module-build" ,perl-module-build)))
302 `(("perl-test-differences" ,perl-test-differences)
303 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
304 (home-page "http://search.cpan.org/dist/XML-Descent")
305 (synopsis "Recursive descent XML parsing")
307 "The conventional models for parsing XML are either @dfn{DOM}
308 (a data structure representing the entire document tree is created) or
309 @dfn{SAX} (callbacks are issued for each element in the XML).
311 XML grammar is recursive - so it's nice to be able to write recursive
312 parsers for it. @code{XML::Descent} allows such parsers to be created.")
313 (license license:perl-license)))
315 (define-public perl-xml-parser
317 (name "perl-xml-parser")
322 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
326 "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"))))
327 (build-system perl-build-system)
328 (arguments `(#:make-maker-flags
329 (let ((expat (assoc-ref %build-inputs "expat")))
330 (list (string-append "EXPATLIBPATH=" expat "/lib")
331 (string-append "EXPATINCPATH=" expat "/include")))))
332 (inputs `(("expat" ,expat)))
333 (license license:perl-license)
334 (synopsis "Perl bindings to the Expat XML parsing library")
336 "This module provides ways to parse XML documents. It is built on top of
337 XML::Parser::Expat, which is a lower level interface to James Clark's expat
338 library. Each call to one of the parsing methods creates a new instance of
339 XML::Parser::Expat which is then used to parse the document. Expat options
340 may be provided when the XML::Parser object is created. These options are
341 then passed on to the Expat object on each parse call. They can also be given
342 as extra arguments to the parse methods, in which case they override options
343 given at XML::Parser creation time.")
344 (home-page "http://search.cpan.org/dist/XML-Parser")))
346 (define-public perl-xml-tokeparser
348 (name "perl-xml-tokeparser")
352 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
353 "XML-TokeParser-" version ".tar.gz"))
356 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
357 (build-system perl-build-system)
358 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
359 (home-page "http://search.cpan.org/dist/XML-TokeParser")
360 (synopsis "Simplified interface to XML::Parser")
362 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
363 to @code{XML::Parser} in much the same way that Gisle Aas'
364 @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
365 @code{XML::TokeParser} splits its XML input up into \"tokens\", each
366 corresponding to an @code{XML::Parser} event.")
367 (license license:perl-license)))
369 (define-public perl-libxml
376 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
380 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
381 (build-system perl-build-system)
383 `(("perl-xml-parser" ,perl-xml-parser)))
384 (license license:perl-license)
385 (synopsis "Perl SAX parser using XML::Parser")
387 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
389 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
391 (define-public perl-xml-libxml
393 (name "perl-xml-libxml")
398 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
399 "XML-LibXML-" version ".tar.gz"))
402 "0awgd2gjzy7kn38bqblsigikzl81xsi561phkz9f9b9v3x2vmrr6"))))
403 (build-system perl-build-system)
405 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
406 ("perl-xml-sax" ,perl-xml-sax)))
408 `(("libxml2" ,libxml2)))
409 (home-page "http://search.cpan.org/dist/XML-LibXML")
410 (synopsis "Perl interface to libxml2")
411 (description "This module implements a Perl interface to the libxml2
412 library which provides interfaces for parsing and manipulating XML files. This
413 module allows Perl programmers to make use of the highly capable validating
414 XML parser and the high performance DOM implementation.")
415 (license license:perl-license)))
417 (define-public perl-xml-libxml-simple
419 (name "perl-xml-libxml-simple")
423 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
424 "XML-LibXML-Simple-" version ".tar.gz"))
427 "1g8nlk3zdz2cclxf7azvsb3jfxmvy6ml8wmj774k4qjqcsqmzk0w"))))
428 (build-system perl-build-system)
430 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
431 ("perl-xml-libxml" ,perl-xml-libxml)))
432 (home-page "http://search.cpan.org/dist/XML-LibXML-Simple")
433 (synopsis "XML::LibXML based XML::Simple clone")
435 "This package provides the same API as @code{XML::Simple} but is based on
436 @code{XML::LibXML}.")
437 (license license:perl-license)))
439 (define-public perl-xml-libxslt
441 (name "perl-xml-libxslt")
446 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
447 "XML-LibXSLT-" version ".tar.gz"))
450 "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
451 (build-system perl-build-system)
453 `(("libxslt" ,libxslt)))
455 `(("perl-xml-libxml" ,perl-xml-libxml)))
456 (home-page "http://search.cpan.org/dist/XML-LibXSLT")
457 (synopsis "Perl bindings to GNOME libxslt library")
458 (description "This Perl module is an interface to the GNOME project's
460 (license license:perl-license)))
462 (define-public perl-xml-namespacesupport
464 (name "perl-xml-namespacesupport")
469 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
470 "XML-NamespaceSupport-" version ".tar.gz"))
473 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
474 (build-system perl-build-system)
475 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
476 (synopsis "XML namespace support class")
477 (description "This module offers a simple to process namespaced XML
478 names (unames) from within any application that may need them. It also helps
479 maintain a prefix to namespace URI map, and provides a number of basic
481 (license license:perl-license)))
483 (define-public perl-xml-rss
485 (name "perl-xml-rss")
489 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
490 "XML-RSS-" version ".tar.gz"))
493 "0v6vfizn2psy6av057kp7fv3z3y73s6b3w56jm3zr6hlq48llsx2"))))
494 (build-system perl-build-system)
496 `(("perl-module-build" ,perl-module-build)
497 ("perl-test-manifest" ,perl-test-manifest)
498 ("perl-test-differences" ,perl-test-differences)
499 ("perl-test-pod" ,perl-test-pod)
500 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
501 ;; XXX: The test which uses this modules does not run, even when it is included
502 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
504 `(("perl-datetime" ,perl-datetime)
505 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
506 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
507 ("perl-html-parser" ,perl-html-parser)
508 ("perl-xml-parser" ,perl-xml-parser)))
509 (home-page "http://search.cpan.org/dist/XML-RSS")
510 (synopsis "Creates and updates RSS files")
512 "This module provides a basic framework for creating and maintaining
513 RDF Site Summary (RSS) files. This distribution also contains many examples
514 that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
515 1.0 version, and more.")
516 (license license:perl-license)))
518 (define-public perl-xml-sax
520 (name "perl-xml-sax")
525 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
526 "XML-SAX-" version ".tar.gz"))
529 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
530 (build-system perl-build-system)
532 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
533 ("perl-xml-sax-base" ,perl-xml-sax-base)))
535 `(#:phases (modify-phases %standard-phases
537 'install 'augment-path
538 ;; The install target tries to load the newly-installed
539 ;; XML::SAX module, but can't find it, so we need to tell
540 ;; perl where to look.
541 (lambda* (#:key outputs #:allow-other-keys)
543 (string-append (getenv "PERL5LIB") ":"
544 (assoc-ref outputs "out")
545 "/lib/perl5/site_perl")))))))
546 (home-page "http://search.cpan.org/dist/XML-SAX")
547 (synopsis "Perl API for XML")
548 (description "XML::SAX consists of several framework classes for using and
549 building Perl SAX2 XML parsers, filters, and drivers.")
550 (license license:perl-license)))
552 (define-public perl-xml-sax-base
554 (name "perl-xml-sax-base")
559 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
560 "XML-SAX-Base-" version ".tar.gz"))
563 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
564 (build-system perl-build-system)
565 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
566 (synopsis "Base class for SAX Drivers and Filters")
567 (description "This module has a very simple task - to be a base class for
568 PerlSAX drivers and filters. It's default behaviour is to pass the input
569 directly to the output unchanged. It can be useful to use this module as a
570 base class so you don't have to, for example, implement the characters()
572 (license license:perl-license)))
574 (define-public perl-xml-simple
576 (name "perl-xml-simple")
581 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
585 "0jgbk30jizafpl7078jhw1di1yh08gf8d85dsvjllr595vr0widr"))))
586 (build-system perl-build-system)
588 `(("perl-xml-parser" ,perl-xml-parser)
589 ("perl-xml-sax" ,perl-xml-sax)))
590 (license license:perl-license)
591 (synopsis "Perl module for easy reading/writing of XML files")
593 "The XML::Simple module provides a simple API layer on top of an
594 underlying XML parsing module (either XML::Parser or one of the SAX2
596 (home-page "http://search.cpan.org/dist/XML-Simple")))
598 (define-public perl-xml-regexp
600 (name "perl-xml-regexp")
605 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
609 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
610 (build-system perl-build-system)
612 `(("perl-xml-parser" ,perl-xml-parser)))
613 (license license:perl-license)
614 (synopsis "Perl regular expressions for XML tokens")
616 "XML::RegExp contains regular expressions for the following XML tokens:
617 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
618 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
619 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
621 (define-public perl-xml-dom
623 (name "perl-xml-dom")
628 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
632 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
633 (build-system perl-build-system)
635 `(("perl-libwww" ,perl-libwww)
636 ("perl-libxml" ,perl-libxml)
637 ("perl-xml-parser" ,perl-xml-parser)
638 ("perl-xml-regexp" ,perl-xml-regexp)))
639 (license license:perl-license)
641 "Perl module for building DOM Level 1 compliant document structures")
643 "This module extends the XML::Parser module by Clark Cooper. The
644 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
645 level interface to James Clark's expat library. XML::DOM::Parser is derived
646 from XML::Parser. It parses XML strings or files and builds a data structure
647 that conforms to the API of the Document Object Model.")
648 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
650 (define-public perl-xml-compile-tester
652 (name "perl-xml-compile-tester")
656 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
657 "XML-Compile-Tester-" version ".tar.gz"))
660 "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1"))))
661 (build-system perl-build-system)
663 `(("perl-log-report" ,perl-log-report)
664 ("perl-test-deep" ,perl-test-deep)))
665 (home-page "http://search.cpan.org/dist/XML-Compile-Tester")
666 (synopsis "XML::Compile related regression testing")
668 "The @code{XML::Compile} module suite has extensive regression testing.
669 This module provide functions which simplify writing tests for
670 @code{XML::Compile} related distributions.")
671 (license license:perl-license)))
673 (define-public perl-xml-compile
675 (name "perl-xml-compile")
679 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
680 "XML-Compile-" version ".tar.gz"))
683 "1hp41960bpqxvv1samv9hc0ghhmvs3i16r4rfl9yp54lp6jhsr2c"))))
684 (build-system perl-build-system)
686 `(("perl-log-report" ,perl-log-report)
687 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
688 ("perl-xml-libxml" ,perl-xml-libxml)
689 ("perl-test-deep" ,perl-test-deep)))
690 (home-page "http://search.cpan.org/dist/XML-Compile")
691 (synopsis "Compilation-based XML processing")
693 "@code{XML::Compile} can be used to translate a Perl data-structure into
694 XML or XML into a Perl data-structure, both directions under rigid control by
696 (license license:perl-license)))
698 (define-public perl-xml-compile-cache
700 (name "perl-xml-compile-cache")
704 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
705 "XML-Compile-Cache-" version ".tar.gz"))
708 "0xbwlszhi9hg8sxm5ylglm2qvnb689i595p913awrj2g4mp9yfsw"))))
709 (build-system perl-build-system)
711 `(("perl-log-report" ,perl-log-report)
712 ("perl-xml-compile" ,perl-xml-compile)
713 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
714 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
715 (home-page "http://search.cpan.org/dist/XML-Compile-Cache")
716 (synopsis "Cache compiled XML translators")
718 "This package provides methods to cache compiled XML translators.")
719 (license license:perl-license)))
721 (define-public perl-xml-compile-soap
723 (name "perl-xml-compile-soap")
727 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
728 "XML-Compile-SOAP-" version ".tar.gz"))
731 "0rxidh7kjyhnw2y789bqbwccnp8n0m3xskn524y9c752s64qpjcz"))))
732 (build-system perl-build-system)
734 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
735 ("perl-libwww" ,perl-libwww)
736 ("perl-log-report" ,perl-log-report)
737 ("perl-xml-compile" ,perl-xml-compile)
738 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
739 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
740 (home-page "http://search.cpan.org/dist/XML-Compile-SOAP")
741 (synopsis "Base-class for SOAP implementations")
743 "This module provides a class to handle the SOAP protocol. The first
744 implementation is @url{SOAP1.1,
745 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
747 (license license:perl-license)))
749 (define-public perl-xml-compile-wsdl11
751 (name "perl-xml-compile-wsdl11")
755 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
756 "XML-Compile-WSDL11-" version ".tar.gz"))
759 "0vbq05cpynm3jj81fw1k4nsb3wv4zngi6blvi1jhdarmh2rfg1x2"))))
760 (build-system perl-build-system)
762 `(("perl-log-report" ,perl-log-report)
763 ("perl-xml-compile" ,perl-xml-compile)
764 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
765 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
766 (home-page "http://search.cpan.org/dist/XML-Compile-WSDL11")
767 (synopsis "Create SOAP messages defined by WSDL 1.1")
769 "This module understands WSDL version 1.1. A WSDL file defines a set of
770 messages to be send and received over SOAP connections. This involves
771 encoding of the message to be send into XML, sending the message to the
772 server, collect the answer, and finally decoding the XML to Perl.")
773 (license license:perl-license)))
775 (define-public perl-xml-feed
777 (name "perl-xml-feed")
781 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
782 "XML-Feed-" version ".tar.gz"))
785 "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
786 (build-system perl-build-system)
788 `(#:tests? #f)) ; Tests require internet connection
790 `(("perl-module-build" ,perl-module-build)
791 ("perl-uri" ,perl-uri)
792 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
794 `(("perl-class-errorhandler" ,perl-class-errorhandler)
795 ("perl-datetime" ,perl-datetime)
796 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
797 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
798 ("perl-feed-find" ,perl-feed-find)
799 ("perl-html-parser" ,perl-html-parser)
800 ("perl-libwww-perl" ,perl-libwww)
801 ("perl-module-pluggable" ,perl-module-pluggable)
802 ("perl-uri-fetch" ,perl-uri-fetch)
803 ("perl-xml-atom" ,perl-xml-atom)
804 ("perl-xml-libxml" ,perl-xml-libxml)
805 ("perl-xml-rss" ,perl-xml-rss)))
806 (home-page "http://search.cpan.org/dist/XML-Feed")
807 (synopsis "XML Syndication Feed Support")
808 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
809 Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
810 @code{XML::Feed} supports the following syndication feed formats:
811 RSS 0.91, RSS 1.0, RSS 2.0, Atom")
812 (license license:perl-license)))
814 (define-public perl-xml-xpath
816 (name "perl-xml-xpath")
820 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
821 "XML-XPath-" version ".tar.gz"))
824 "07pa0bl42jka8mj7jshjynx8vpfh8b4cdyiv4zlkqvkqz98nzxib"))))
825 (build-system perl-build-system)
827 `(("perl-path-tiny" ,perl-path-tiny)))
829 `(("perl-xml-parser" ,perl-xml-parser)))
830 (home-page "http://search.cpan.org/dist/XML-XPath")
831 (synopsis "Parse and evaluate XPath statements")
833 "This module aims to comply exactly to the @url{XPath specification,
834 https://www.w3.org/TR/xpath} and yet allow extensions to be added in
835 the form of functions.")
836 (license license:perl-license)))
838 (define-public pugixml
845 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
846 version "/pugixml-" version ".tar.gz"))
849 "0fcgggry5x5bn0zhb09ij9hb0p45nb0sv0d9fw3cm1cf62hp9n80"))))
850 (build-system cmake-build-system)
852 `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-shared -fPIC"
853 "-DCMAKE_C_FLAGS=-shared -fPIC")
854 #:tests? #f)) ; no tests
855 (home-page "http://pugixml.org")
856 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
858 "pugixml is a C++ XML processing library, which consists of a DOM-like
859 interface with rich traversal/modification capabilities, a fast XML parser
860 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
861 implementation for complex data-driven tree queries. Full Unicode support is
862 also available, with Unicode interface variants and conversions between
863 different Unicode encodings which happen automatically during
865 (license license:expat)))
867 (define-public python-pyxb
873 (uri (pypi-uri "PyXB" version))
876 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
877 (build-system python-build-system)
878 (home-page "http://pyxb.sourceforge.net/")
879 (synopsis "Python XML Schema Bindings")
881 "PyXB (\"pixbee\") is a pure Python package that generates Python source
882 code for classes that correspond to data structures defined by XMLSchema.")
883 (license (list license:asl2.0 ; Most files.
884 license:expat ; pyxb/utils/six.py
885 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
886 license:psfl)))) ; pyxb/utils/activestate.py
888 (define-public python2-pyxb
889 (package-with-python2 python-pyxb))
898 ;; The old source on fedorahosted.org is offline permanently:
899 ;; <https://bugs.gnu.org/25989>
900 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
901 "xmlto_" version ".orig.tar.bz2"))
902 (file-name (string-append name "-" version ".tar.bz2"))
905 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
906 (build-system gnu-build-system)
908 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
909 '(#:configure-flags (list (string-append "GETOPT="
910 (assoc-ref %build-inputs
914 `(("util-linux" ,util-linux) ; for 'getopt'
915 ("libxml2" ,libxml2) ; for 'xmllint'
916 ("libxslt" ,libxslt))) ; for 'xsltproc'
917 (home-page "http://cyberelk.net/tim/software/xmlto/")
918 (synopsis "Front-end to an XSL toolchain")
920 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
921 stylesheet for the conversion you want and applies it using an external
922 XSL-T processor. It also performs any necessary post-processing.")
923 (license license:gpl2+)))
925 (define-public xmlsec
931 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
932 name "1-" version ".tar.gz"))
935 "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
936 (build-system gnu-build-system)
937 (propagated-inputs ; according to xmlsec1.pc
938 `(("libxml2" ,libxml2)
939 ("libxslt" ,libxslt)))
942 ("libgcrypt" ,libgcrypt)
943 ("libltdl" ,libltdl)))
945 `(("pkg-config" ,pkg-config)))
946 (home-page "http://www.libexpat.org/")
947 (synopsis "XML Security Library")
949 "The XML Security Library is a C library based on Libxml2. It
950 supports XML security standards such as XML Signature, XML Encryption,
951 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
953 (license (license:x11-style "file://COPYING"
954 "See 'COPYING' in the distribution."))))
956 (define-public minixml
962 (uri (string-append "https://github.com/michaelrsweet/mxml/"
963 "releases/download/release-" version
964 "/mxml-" version ".tar.gz"))
967 "14bqfq4lymhb31snz6wsvzhlavy0573v1nki1lbngiyxcj5zazr6"))))
968 (build-system gnu-build-system)
970 `(#:tests? #f)) ;no "check" target
971 (home-page "https://michaelrsweet.github.io/mxml")
972 (synopsis "Small XML parsing library")
974 "Mini-XML is a small C library to read and write XML files and strings in
975 UTF-8 and UTF-16 encoding.")
976 ;; LGPL 2.0+ with additional exceptions for static linking
977 (license license:lgpl2.0+)))
979 ;; TinyXML is an unmaintained piece of software, so the patches and build
980 ;; system massaging have no upstream potential.
981 (define-public tinyxml
987 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
989 (string-join (string-split version #\.) "_")
993 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
994 (patches (search-patches "tinyxml-use-stl.patch"))))
995 (build-system gnu-build-system)
996 ;; This library is missing *a lot* of the steps to make it usable, so we
997 ;; have to add them here, like every other distro must do.
1000 (modify-phases %standard-phases
1002 (add-after 'build 'build-shared-library
1004 (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic"
1005 "tinyxml.cpp" "tinyxmlerror.cpp"
1006 "tinyxmlparser.cpp" "tinystr.cpp"
1007 "-o" "libtinyxml.so"))))
1009 (lambda _ (zero? (system "./xmltest"))))
1011 (lambda* (#:key outputs #:allow-other-keys)
1012 (let* ((out (assoc-ref outputs "out"))
1013 (include (string-append out "/include"))
1014 (lib (string-append out "/lib"))
1015 (pkgconfig (string-append out "/lib/pkgconfig"))
1016 (doc (string-append out "/share/doc")))
1017 ;; Install libs and headers.
1018 (install-file "libtinyxml.so" lib)
1019 (install-file "tinystr.h" include)
1020 (install-file "tinyxml.h" include)
1021 ;; Generate and install pkg-config file.
1023 ;; Software such as Kodi expect this file to be present, but
1024 ;; it's not provided in the source code.
1025 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1027 (format port "prefix=~a
1028 exec_prefix=${prefix}
1029 libdir=${exec_prefix}/lib
1030 includedir=${prefix}/include
1033 Description: A simple, small, C++ XML parser
1035 Libs: -L${libdir} -ltinyxml
1036 Cflags: -I${includedir}
1041 (copy-recursively "docs" (string-append doc "tinyxml"))
1043 (synopsis "Small XML parser for C++")
1044 (description "TinyXML is a small and simple XML parsing library for the
1045 C++ programming language.")
1046 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1047 (license license:zlib)))
1049 (define-public tinyxml2
1056 (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
1060 "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
1061 (build-system cmake-build-system)
1063 `(#:tests? #f)) ; no tests
1064 (synopsis "Small XML parser for C++")
1065 (description "TinyXML2 is a small and simple XML parsing library for the
1066 C++ programming language.")
1067 (home-page "http://www.grinninglizard.com/tinyxml2/")
1068 (license license:zlib)))
1070 (define-public xmlstarlet
1077 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1078 version "/xmlstarlet-" version ".tar.gz"))
1081 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1082 (build-system gnu-build-system)
1085 (modify-phases %standard-phases
1086 (add-before 'check 'drop-failing-tests
1088 ;; FIXME: Why are these tests failing.
1089 (substitute* "Makefile"
1090 (("^examples/schema1\\\\") "\\")
1091 (("^examples/valid1\\\\") "\\"))
1094 `(("libxslt" ,libxslt)
1095 ("libxml2" ,libxml2)))
1096 (home-page "http://xmlstar.sourceforge.net/")
1097 (synopsis "Command line XML toolkit")
1098 (description "XMLStarlet is a set of command line utilities which can be
1099 used to transform, query, validate, and edit XML documents. XPath is used to
1100 match and extract data, and elements can be added, deleted or modified using
1102 (license license:x11)))
1104 (define-public xlsx2csv
1111 "https://github.com/dilshod/"
1112 name "/archive/release/" version ".tar.gz"))
1113 (file-name (string-append name "-" version ".tar.gz"))
1116 "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
1117 (build-system python-build-system)
1119 `(#:python ,python-2 ; Use python-2 for the test script.
1121 (modify-phases %standard-phases
1124 (substitute* "test/run"
1125 ;; Run tests with `python' only
1126 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1127 (zero? (system* "test/run")))))))
1128 (home-page "https://github.com/dilshod/xlsx2csv")
1129 (synopsis "XLSX to CSV converter")
1131 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1132 XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1133 files. It is designed to be fast and to handle large input files.")
1134 (license license:gpl2+)))
1136 (define-public python-defusedxml
1138 (name "python-defusedxml")
1143 (uri (pypi-uri "defusedxml" version))
1146 "0y147zy3jqmk6ly7fbhqmzn1hf41xcb53f2vcc3m8x4ba5d1smfd"))))
1147 (build-system python-build-system)
1148 (home-page "https://bitbucket.org/tiran/defusedxml")
1149 (synopsis "XML bomb protection for Python stdlib modules")
1151 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1152 (license license:psfl)))
1154 (define-public python2-defusedxml
1155 (package-with-python2 python-defusedxml))
1157 (define-public libxls
1163 (uri (string-append "https://sourceforge.net/projects/"
1164 name "/files/" name "-"
1168 "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
1169 (build-system gnu-build-system)
1172 (modify-phases %standard-phases
1173 ;; Bootstrapping is required in order to fix the test driver script.
1174 (add-after 'unpack 'bootstrap
1176 (zero? (system* "bash" "bootstrap")))))))
1179 ("autoconf" ,autoconf)
1180 ("automake" ,automake)
1181 ("libtool" ,libtool)))
1182 (home-page "http://libxls.sourceforge.net/")
1183 (synopsis "Read Excel files")
1185 "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
1186 libxls cannot write Excel files.")
1187 (license license:bsd-2)))
1189 (define-public freexl
1195 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1196 name "-" version ".tar.gz"))
1199 "09bwzqjc41cc8qw8qkw9wq58rg9nax8r3fg19iny5vmw1c0z23sh"))))
1200 (build-system gnu-build-system)
1201 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1202 (synopsis "Read Excel files")
1204 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1206 ;; Any of these licenses may be picked.
1207 (license (list license:gpl2+
1211 (define-public xerces-c
1217 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1218 "xerces-c-" version ".tar.xz"))
1221 "0hb29c0smqlpxj0zdm09s983z5jx37szlliccnvgh0qq91wwqwwr"))))
1222 (build-system gnu-build-system)
1224 (let ((system (or (%current-target-system)
1225 (%current-system))))
1226 (if (string-prefix? "x86_64" system)
1228 '(#:configure-flags '("--disable-sse2")))))
1231 (home-page "http://xerces.apache.org/xerces-c/")
1232 (synopsis "Validating XML parser library for C++")
1233 (description "Xerces-C++ is a validating XML parser written in a portable
1234 subset of C++. Xerces-C++ makes it easy to give your application the ability
1235 to read and write XML data. A shared library is provided for parsing,
1236 generating, manipulating, and validating XML documents using the DOM, SAX, and
1238 (license license:asl2.0)))
1240 (define-public java-simple-xml
1242 (name "java-simple-xml")
1246 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1250 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))))
1251 (build-system ant-build-system)
1253 `(#:build-target "build"
1254 #:test-target "test"
1256 (modify-phases %standard-phases
1257 (replace 'install (install-jars "jar")))))
1259 `(("unzip" ,unzip)))
1260 (home-page "http://simple.sourceforge.net/")
1261 (synopsis "XML serialization framework for Java")
1262 (description "Simple is a high performance XML serialization and
1263 configuration framework for Java. Its goal is to provide an XML framework
1264 that enables rapid development of XML configuration and communication systems.
1265 This framework aids the development of XML systems with minimal effort and
1266 reduced errors. It offers full object serialization and deserialization,
1267 maintaining each reference encountered.")
1268 (license license:asl2.0)))