gnu: libxml2: Fix CVE-2017-15412.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
CommitLineData
d0414883 1;;; GNU Guix --- Functional package management for GNU
493e9a5a 2;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
0899144f 3;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
b715dbac 4;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
10ac0f9f 5;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
d00d6cea 6;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
96fd87c9 7;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
e831256f 8;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
fe9451c5 9;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
c74c7c13 10;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
e9f62e52 11;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
5eec378b 12;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
19c33040 13;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
d2b51c08 14;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
63bbf38f 15;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d66fa696 16;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
f9f67fcb 17;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
5bc2d579 18;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
76fed2b3 19;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
3b695802 20;;; Copyright © 2017 Petter <petter@mykolab.ch>
767d24e8 21;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
d0414883
LC
22;;;
23;;; This file is part of GNU Guix.
24;;;
25;;; GNU Guix is free software; you can redistribute it and/or modify it
26;;; under the terms of the GNU General Public License as published by
27;;; the Free Software Foundation; either version 3 of the License, or (at
28;;; your option) any later version.
29;;;
30;;; GNU Guix is distributed in the hope that it will be useful, but
31;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33;;; GNU General Public License for more details.
34;;;
35;;; You should have received a copy of the GNU General Public License
36;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
1ffa7090 38(define-module (gnu packages xml)
f0444eaf 39 #:use-module (gnu packages)
0899144f 40 #:use-module (gnu packages autotools)
322cbda7 41 #:use-module (gnu packages compression)
58cc3b38 42 #:use-module (gnu packages gnupg)
f0444eaf 43 #:use-module (gnu packages perl)
5ccde207 44 #:use-module (gnu packages perl-check)
f0444eaf 45 #:use-module (gnu packages python)
a7fd7b68 46 #:use-module (gnu packages tls)
ad871fc6 47 #:use-module (gnu packages web)
b5b73a82 48 #:use-module ((guix licenses) #:prefix license:)
d0414883
LC
49 #:use-module (guix packages)
50 #:use-module (guix download)
77d7b57c 51 #:use-module (guix build-system ant)
6ce212b8 52 #:use-module (guix build-system cmake)
2a1e82bb 53 #:use-module (guix build-system gnu)
37f9ff63 54 #:use-module (guix build-system perl)
7ce32242 55 #:use-module (guix build-system python)
e4aab734
RW
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages pkg-config))
d0414883
LC
58
59(define-public expat
60 (package
61 (name "expat")
05e26d1e 62 (version "2.2.1")
63bbf38f 63 (replacement expat-2.2.4)
d0414883
LC
64 (source (origin
65 (method url-fetch)
66 (uri (string-append "mirror://sourceforge/expat/expat/"
51514e69 67 version "/expat-" version ".tar.bz2"))
d0414883
LC
68 (sha256
69 (base32
05e26d1e 70 "11c8jy1wvllvlk7xdc5cm8hdhg0hvs8j0aqy6s702an8wkdcls0q"))))
d0414883
LC
71 (build-system gnu-build-system)
72 (home-page "http://www.libexpat.org/")
9e771e3b 73 (synopsis "Stream-oriented XML parser library written in C")
d0414883
LC
74 (description
75 "Expat is an XML parser library written in C. It is a
76stream-oriented parser in which an application registers handlers for
77things the parser might find in the XML document (like start tags).")
78 (license license:expat)))
f0444eaf 79
63bbf38f 80(define expat-2.2.4 ; Fix CVE-{2016-9063,2017-9233,2017-11742} & other issues.
96fd87c9
MW
81 (package
82 (inherit expat)
63bbf38f 83 (version "2.2.4")
96fd87c9
MW
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "mirror://sourceforge/expat/expat/"
87 version "/expat-" version ".tar.bz2"))
88 (sha256
89 (base32
63bbf38f 90 "17h1fb9zvqvf0sr78j211bngc6jpql5wzar8fg9b52jzjvdqbb83"))))))
96fd87c9 91
5bc2d579
GG
92(define-public libebml
93 (package
94 (name "libebml")
95 (version "1.3.4")
96 (source
97 (origin
98 (method url-fetch)
99 (uri (string-append "https://dl.matroska.org/downloads/"
100 name "/" name "-" version ".tar.bz2"))
101 (sha256
102 (base32
103 "11zka6z9ncywyjr1gfm5cnii33ln7y3w6s86kiacchip2g7kw3f5"))))
104 (build-system gnu-build-system)
105 (home-page "https://www.matroska.org")
106 (synopsis "C++ libary to parse EBML files")
107 (description "libebml is a C++ library to read and write EBML (Extensible
108Binary Meta Language) files. EBML was designed to be a simplified binary
109extension of XML for the purpose of storing and manipulating data in a
110hierarchical form with variable field lengths.")
111 (license license:lgpl2.1)))
112
f0444eaf
AE
113(define-public libxml2
114 (package
115 (name "libxml2")
3c9e0ddc 116 (version "2.9.4")
76fed2b3 117 (replacement libxml2/fixed)
f0444eaf
AE
118 (source (origin
119 (method url-fetch)
120 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
121 version ".tar.gz"))
e9f62e52
LF
122 (patches (search-patches "libxml2-CVE-2016-4658.patch"
123 "libxml2-CVE-2016-5131.patch"))
f0444eaf
AE
124 (sha256
125 (base32
3c9e0ddc 126 "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz"))))
f0444eaf
AE
127 (build-system gnu-build-system)
128 (home-page "http://www.xmlsoft.org/")
35b9e423 129 (synopsis "C parser for XML")
c1944c92 130 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
7ce32242 131 (native-inputs `(("perl" ,perl)))
2a8d4401
LC
132 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
133 ;; sub-directory of any given package.
74528069
LC
134 (native-search-paths (list (search-path-specification
135 (variable "XML_CATALOG_FILES")
136 (separator " ")
137 (files '("xml"))
138 (file-pattern "^catalog\\.xml$")
139 (file-type 'regular))))
2a8d4401 140 (search-paths native-search-paths)
f0444eaf 141 (description
7c125ce0
AK
142 "Libxml2 is the XML C parser and toolkit developed for the Gnome
143project (but it is usable outside of the Gnome platform).")
f0444eaf 144 (license license:x11)))
58cc3b38 145
76fed2b3
AV
146(define libxml2/fixed
147 (package
148 (inherit libxml2)
149 (source
150 (origin
151 (inherit (package-source libxml2))
152 (patches
1b3f5fc3 153 (append (origin-patches (package-source libxml2))
76fed2b3
AV
154 (search-patches "libxml2-CVE-2017-0663.patch"
155 "libxml2-CVE-2017-7375.patch"
156 "libxml2-CVE-2017-7376.patch"
157 "libxml2-CVE-2017-9047+CVE-2017-9048.patch"
7c3f22e9
LF
158 "libxml2-CVE-2017-9049+CVE-2017-9050.patch"
159 "libxml2-CVE-2017-15412.patch")))))))
76fed2b3 160
7ce32242
SB
161(define-public python-libxml2
162 (package (inherit libxml2)
163 (name "python-libxml2")
164 (build-system python-build-system)
165 (arguments
166 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
167 #:tests? #f
168 #:phases
169 (modify-phases %standard-phases
170 (add-before
171 'build 'configure
172 (lambda* (#:key inputs #:allow-other-keys)
173 (chdir "python")
174 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
175 "cross-libc" "libc")))
176 (libxml2 (assoc-ref inputs "libxml2")))
177 (substitute* "setup.py"
178 ;; For 'libxml2/libxml/tree.h'.
179 (("ROOT = r'/usr'")
180 (format #f "ROOT = r'~a'" libxml2))
181 ;; For 'iconv.h'.
182 (("/opt/include")
183 (string-append glibc "/include")))))))))
184 (inputs `(("libxml2" ,libxml2)))
185 (synopsis "Python bindings for the libxml2 library")))
186
187(define-public python2-libxml2
188 (package-with-python2 python-libxml2))
189
58cc3b38
AE
190(define-public libxslt
191 (package
192 (name "libxslt")
0c9c9526 193 (replacement libxslt/fixed)
28b33172 194 (version "1.1.29")
58cc3b38
AE
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
198 version ".tar.gz"))
0c9c9526
LF
199 ;; XXX Oops, the patches field is redefined below, which means the
200 ;; patch for CVE-2016-4738 was not used. Fixed in the definition of
201 ;; libxslt/fixed below.
202 ;(patches (search-patches "libxslt-CVE-2016-4738.patch"))
58cc3b38
AE
203 (sha256
204 (base32
28b33172
LF
205 "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm"))
206 (patches (search-patches "libxslt-generated-ids.patch"))))
58cc3b38
AE
207 (build-system gnu-build-system)
208 (home-page "http://xmlsoft.org/XSLT/index.html")
35b9e423 209 (synopsis "C library for applying XSLT stylesheets to XML documents")
58cc3b38
AE
210 (inputs `(("libgcrypt" ,libgcrypt)
211 ("libxml2" ,libxml2)
95288fcc 212 ("python" ,python-minimal-wrapper)
11e3f107 213 ("zlib" ,zlib)))
58cc3b38 214 (description
35b9e423 215 "Libxslt is an XSLT C library developed for the GNOME project. It is
58cc3b38
AE
216based on libxml for XML parsing, tree manipulation and XPath support.")
217 (license license:x11)))
2a1e82bb 218
0c9c9526
LF
219(define libxslt/fixed
220 (package
221 (inherit libxslt)
222 (source (origin
223 (inherit (package-source libxslt))
224 (patches (search-patches "libxslt-CVE-2016-4738.patch"
225 "libxslt-CVE-2017-5029.patch"
226 "libxslt-generated-ids.patch"))))))
227
5eec378b
BW
228(define-public perl-graph-readwrite
229 (package
230 (name "perl-graph-readwrite")
ffbc7d65 231 (version "2.09")
5eec378b
BW
232 (source
233 (origin
234 (method url-fetch)
235 (uri (string-append
236 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
237 version
238 ".tar.gz"))
239 (sha256
240 (base32
ffbc7d65 241 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
5eec378b
BW
242 (build-system perl-build-system)
243 (propagated-inputs
244 `(("perl-graph" ,perl-graph)
245 ("perl-parse-yapp" ,perl-parse-yapp)
246 ("perl-xml-parser" ,perl-xml-parser)
247 ("perl-xml-writer" ,perl-xml-writer)))
248 (home-page "http://search.cpan.org/dist/Graph-ReadWrite")
249 (synopsis "Modules for reading and writing directed graphs")
250 (description "This is a collection of perl classes for reading and writing
251directed graphs in a variety of file formats. The graphs are represented in
252Perl using Jarkko Hietaniemi's @code{Graph} classes.
253
254There are two base classes. @code{Graph::Reader} is the base class for classes
255which read a graph file and create an instance of the Graph class.
256@code{Graph::Writer} is the base class for classes which take an instance of
257the @code{Graph} class and write it out in a specific file format.")
2f3108ad 258 (license license:perl-license)))
5eec378b 259
b2696a58 260(define-public perl-xml-atom
261 (package
262 (name "perl-xml-atom")
522f1995 263 (version "0.42")
b2696a58 264 (source (origin
265 (method url-fetch)
266 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
267 "XML-Atom-" version ".tar.gz"))
268 (sha256
269 (base32
522f1995 270 "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6"))))
b2696a58 271 (build-system perl-build-system)
522f1995
MB
272 (arguments
273 `(#:phases
274 (modify-phases %standard-phases
275 (add-before 'check 'set-perl-search-path
276 (lambda _
277 (setenv "PERL5LIB"
278 (string-append (getcwd) ":"
279 (getenv "PERL5LIB")))
280 #t)))))
b2696a58 281 (native-inputs
282 `(("perl-datetime" ,perl-datetime)
283 ;; TODO package: perl-datetime-format-atom
522f1995
MB
284 ("perl-html-tagset" ,perl-html-tagset)
285 ("perl-module-build-tiny" ,perl-module-build-tiny)
9dab5017 286 ("perl-module-install" ,perl-module-install)
b2696a58 287 ("perl-xml-xpath" ,perl-xml-xpath)))
288 (inputs
289 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
290 ("perl-datetime" ,perl-datetime)
291 ("perl-datetime-timezone" ,perl-datetime-timezone)
292 ("perl-digest-sha1" ,perl-digest-sha1)
293 ("perl-libwww" ,perl-libwww)
294 ("perl-uri" ,perl-uri)
295 ("perl-xml-libxml" ,perl-xml-libxml)
296 ("perl-xml-xpath" ,perl-xml-xpath)))
297 (home-page "http://search.cpan.org/dist/XML-Atom")
298 (synopsis "Atom feed and API implementation")
299 (description
300 "Atom is a syndication, API, and archiving format for weblogs and other data.
301@code{XML::Atom} implements the feed format as well as a client for the API.")
2f3108ad 302 (license license:perl-license)))
b2696a58 303
d66fa696
MB
304(define-public perl-xml-descent
305 (package
306 (name "perl-xml-descent")
307 (version "1.04")
308 (source (origin
309 (method url-fetch)
310 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
311 "XML-Descent-" version ".tar.gz"))
312 (sha256
313 (base32
314 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
315 (build-system perl-build-system)
316 (native-inputs
317 `(("perl-module-build" ,perl-module-build)))
318 (propagated-inputs
319 `(("perl-test-differences" ,perl-test-differences)
320 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
321 (home-page "http://search.cpan.org/dist/XML-Descent")
322 (synopsis "Recursive descent XML parsing")
323 (description
324 "The conventional models for parsing XML are either @dfn{DOM}
325(a data structure representing the entire document tree is created) or
326@dfn{SAX} (callbacks are issued for each element in the XML).
327
328XML grammar is recursive - so it's nice to be able to write recursive
329parsers for it. @code{XML::Descent} allows such parsers to be created.")
2f3108ad 330 (license license:perl-license)))
d66fa696 331
2a1e82bb
LC
332(define-public perl-xml-parser
333 (package
334 (name "perl-xml-parser")
d495634b 335 (version "2.44")
2a1e82bb
LC
336 (source (origin
337 (method url-fetch)
338 (uri (string-append
2b8c5f54 339 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
2a1e82bb
LC
340 version ".tar.gz"))
341 (sha256
342 (base32
d495634b 343 "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"))))
2a1e82bb
LC
344 (build-system perl-build-system)
345 (arguments `(#:make-maker-flags
346 (let ((expat (assoc-ref %build-inputs "expat")))
347 (list (string-append "EXPATLIBPATH=" expat "/lib")
348 (string-append "EXPATINCPATH=" expat "/include")))))
349 (inputs `(("expat" ,expat)))
2f3108ad 350 (license license:perl-license)
2a1e82bb
LC
351 (synopsis "Perl bindings to the Expat XML parsing library")
352 (description
353 "This module provides ways to parse XML documents. It is built on top of
354XML::Parser::Expat, which is a lower level interface to James Clark's expat
355library. Each call to one of the parsing methods creates a new instance of
356XML::Parser::Expat which is then used to parse the document. Expat options
357may be provided when the XML::Parser object is created. These options are
358then passed on to the Expat object on each parse call. They can also be given
359as extra arguments to the parse methods, in which case they override options
360given at XML::Parser creation time.")
d495634b 361 (home-page "http://search.cpan.org/dist/XML-Parser")))
37f9ff63 362
62b28f19
MB
363(define-public perl-xml-tokeparser
364 (package
365 (name "perl-xml-tokeparser")
366 (version "0.05")
367 (source (origin
368 (method url-fetch)
369 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
370 "XML-TokeParser-" version ".tar.gz"))
371 (sha256
372 (base32
373 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
374 (build-system perl-build-system)
375 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
376 (home-page "http://search.cpan.org/dist/XML-TokeParser")
377 (synopsis "Simplified interface to XML::Parser")
378 (description
379 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
380to @code{XML::Parser} in much the same way that Gisle Aas'
381@code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
382@code{XML::TokeParser} splits its XML input up into \"tokens\", each
383corresponding to an @code{XML::Parser} event.")
2f3108ad 384 (license license:perl-license)))
62b28f19 385
7339fbe2 386(define-public perl-libxml
1385ba4f 387 (package
7339fbe2 388 (name "perl-libxml")
1385ba4f
AE
389 (version "0.08")
390 (source (origin
391 (method url-fetch)
392 (uri (string-append
393 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
394 version ".tar.gz"))
395 (sha256
396 (base32
397 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
398 (build-system perl-build-system)
7b81406a 399 (propagated-inputs
1385ba4f 400 `(("perl-xml-parser" ,perl-xml-parser)))
2f3108ad 401 (license license:perl-license)
1385ba4f
AE
402 (synopsis "Perl SAX parser using XML::Parser")
403 (description
404 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
405module.")
406 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
407
3dd6bee1
EB
408(define-public perl-xml-libxml
409 (package
410 (name "perl-xml-libxml")
58ade302 411 (version "2.0132")
3dd6bee1
EB
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
416 "XML-LibXML-" version ".tar.gz"))
417 (sha256
418 (base32
58ade302 419 "0xnl281hb590i287fxpl947f1s4zl9dnvc4ajvsqi89w23im453j"))))
3dd6bee1
EB
420 (build-system perl-build-system)
421 (propagated-inputs
422 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
423 ("perl-xml-sax" ,perl-xml-sax)))
424 (inputs
425 `(("libxml2" ,libxml2)))
426 (home-page "http://search.cpan.org/dist/XML-LibXML")
427 (synopsis "Perl interface to libxml2")
428 (description "This module implements a Perl interface to the libxml2
54c3c140 429library which provides interfaces for parsing and manipulating XML files. This
3dd6bee1
EB
430module allows Perl programmers to make use of the highly capable validating
431XML parser and the high performance DOM implementation.")
2f3108ad 432 (license license:perl-license)))
3dd6bee1 433
f7c4dc2f
RW
434(define-public perl-xml-libxml-simple
435 (package
436 (name "perl-xml-libxml-simple")
f3aa34cc 437 (version "0.97")
f7c4dc2f
RW
438 (source (origin
439 (method url-fetch)
440 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
441 "XML-LibXML-Simple-" version ".tar.gz"))
442 (sha256
443 (base32
f3aa34cc 444 "1g8nlk3zdz2cclxf7azvsb3jfxmvy6ml8wmj774k4qjqcsqmzk0w"))))
f7c4dc2f
RW
445 (build-system perl-build-system)
446 (propagated-inputs
447 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
448 ("perl-xml-libxml" ,perl-xml-libxml)))
449 (home-page "http://search.cpan.org/dist/XML-LibXML-Simple")
450 (synopsis "XML::LibXML based XML::Simple clone")
451 (description
452 "This package provides the same API as @code{XML::Simple} but is based on
453@code{XML::LibXML}.")
2f3108ad 454 (license license:perl-license)))
f7c4dc2f 455
93863a5e
RW
456(define-public perl-xml-libxslt
457 (package
458 (name "perl-xml-libxslt")
459 (version "1.95")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
464 "XML-LibXSLT-" version ".tar.gz"))
465 (sha256
466 (base32
467 "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
468 (build-system perl-build-system)
469 (inputs
470 `(("libxslt" ,libxslt)))
471 (propagated-inputs
472 `(("perl-xml-libxml" ,perl-xml-libxml)))
473 (home-page "http://search.cpan.org/dist/XML-LibXSLT")
474 (synopsis "Perl bindings to GNOME libxslt library")
475 (description "This Perl module is an interface to the GNOME project's
476libxslt library.")
2f3108ad 477 (license license:perl-license)))
93863a5e 478
b715dbac
EB
479(define-public perl-xml-namespacesupport
480 (package
481 (name "perl-xml-namespacesupport")
88958ee0 482 (version "1.12")
b715dbac
EB
483 (source
484 (origin
485 (method url-fetch)
486 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
487 "XML-NamespaceSupport-" version ".tar.gz"))
488 (sha256
489 (base32
88958ee0 490 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
b715dbac
EB
491 (build-system perl-build-system)
492 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
493 (synopsis "XML namespace support class")
494 (description "This module offers a simple to process namespaced XML
495names (unames) from within any application that may need them. It also helps
496maintain a prefix to namespace URI map, and provides a number of basic
497checks.")
2f3108ad 498 (license license:perl-license)))
b715dbac 499
a022b23f 500(define-public perl-xml-rss
501 (package
502 (name "perl-xml-rss")
503 (version "1.59")
504 (source (origin
505 (method url-fetch)
506 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
507 "XML-RSS-" version ".tar.gz"))
508 (sha256
509 (base32
510 "0v6vfizn2psy6av057kp7fv3z3y73s6b3w56jm3zr6hlq48llsx2"))))
511 (build-system perl-build-system)
512 (native-inputs
513 `(("perl-module-build" ,perl-module-build)
514 ("perl-test-manifest" ,perl-test-manifest)
515 ("perl-test-differences" ,perl-test-differences)
516 ("perl-test-pod" ,perl-test-pod)
517 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
518 ;; XXX: The test which uses this modules does not run, even when it is included
519 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
520 (inputs
521 `(("perl-datetime" ,perl-datetime)
522 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
523 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
524 ("perl-html-parser" ,perl-html-parser)
525 ("perl-xml-parser" ,perl-xml-parser)))
526 (home-page "http://search.cpan.org/dist/XML-RSS")
527 (synopsis "Creates and updates RSS files")
528 (description
529 "This module provides a basic framework for creating and maintaining
530RDF Site Summary (RSS) files. This distribution also contains many examples
531that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
5321.0 version, and more.")
2f3108ad 533 (license license:perl-license)))
a022b23f 534
18b8bbb3
EB
535(define-public perl-xml-sax
536 (package
537 (name "perl-xml-sax")
538 (version "0.99")
539 (source
540 (origin
541 (method url-fetch)
542 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
543 "XML-SAX-" version ".tar.gz"))
544 (sha256
545 (base32
546 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
547 (build-system perl-build-system)
548 (propagated-inputs
549 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
550 ("perl-xml-sax-base" ,perl-xml-sax-base)))
551 (arguments
552 `(#:phases (modify-phases %standard-phases
553 (add-before
40b084a3 554 'install 'augment-path
18b8bbb3
EB
555 ;; The install target tries to load the newly-installed
556 ;; XML::SAX module, but can't find it, so we need to tell
557 ;; perl where to look.
558 (lambda* (#:key outputs #:allow-other-keys)
559 (setenv "PERL5LIB"
560 (string-append (getenv "PERL5LIB") ":"
561 (assoc-ref outputs "out")
562 "/lib/perl5/site_perl")))))))
563 (home-page "http://search.cpan.org/dist/XML-SAX")
564 (synopsis "Perl API for XML")
565 (description "XML::SAX consists of several framework classes for using and
566building Perl SAX2 XML parsers, filters, and drivers.")
2f3108ad 567 (license license:perl-license)))
18b8bbb3 568
1ed6d5bc
EB
569(define-public perl-xml-sax-base
570 (package
571 (name "perl-xml-sax-base")
572 (version "1.08")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
577 "XML-SAX-Base-" version ".tar.gz"))
578 (sha256
579 (base32
580 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
581 (build-system perl-build-system)
582 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
583 (synopsis "Base class for SAX Drivers and Filters")
584 (description "This module has a very simple task - to be a base class for
585PerlSAX drivers and filters. It's default behaviour is to pass the input
586directly to the output unchanged. It can be useful to use this module as a
587base class so you don't have to, for example, implement the characters()
588callback.")
2f3108ad 589 (license license:perl-license)))
1ed6d5bc 590
535dc6cf
AE
591(define-public perl-xml-simple
592 (package
593 (name "perl-xml-simple")
e831256f 594 (version "2.22")
535dc6cf
AE
595 (source (origin
596 (method url-fetch)
597 (uri (string-append
598 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
599 version ".tar.gz"))
600 (sha256
601 (base32
e831256f 602 "0jgbk30jizafpl7078jhw1di1yh08gf8d85dsvjllr595vr0widr"))))
535dc6cf 603 (build-system perl-build-system)
27ef7f45 604 (propagated-inputs
e831256f
EF
605 `(("perl-xml-parser" ,perl-xml-parser)
606 ("perl-xml-sax" ,perl-xml-sax)))
2f3108ad 607 (license license:perl-license)
535dc6cf
AE
608 (synopsis "Perl module for easy reading/writing of XML files")
609 (description
610 "The XML::Simple module provides a simple API layer on top of an
611underlying XML parsing module (either XML::Parser or one of the SAX2
612parser modules).")
e831256f 613 (home-page "http://search.cpan.org/dist/XML-Simple")))
535dc6cf 614
a2e520af
AE
615(define-public perl-xml-regexp
616 (package
617 (name "perl-xml-regexp")
618 (version "0.04")
619 (source (origin
620 (method url-fetch)
621 (uri (string-append
622 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
623 version ".tar.gz"))
624 (sha256
625 (base32
626 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
627 (build-system perl-build-system)
628 (inputs
629 `(("perl-xml-parser" ,perl-xml-parser)))
2f3108ad 630 (license license:perl-license)
a2e520af
AE
631 (synopsis "Perl regular expressions for XML tokens")
632 (description
633 "XML::RegExp contains regular expressions for the following XML tokens:
634BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
635EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
636 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
637
ad871fc6
AE
638(define-public perl-xml-dom
639 (package
640 (name "perl-xml-dom")
4e5465f2 641 (version "1.46")
ad871fc6
AE
642 (source (origin
643 (method url-fetch)
644 (uri (string-append
645 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
646 version ".tar.gz"))
647 (sha256
648 (base32
4e5465f2 649 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
ad871fc6 650 (build-system perl-build-system)
f7faff88
AE
651 (propagated-inputs
652 `(("perl-libwww" ,perl-libwww)
ad871fc6 653 ("perl-libxml" ,perl-libxml)
4e5465f2 654 ("perl-xml-parser" ,perl-xml-parser)
ad871fc6 655 ("perl-xml-regexp" ,perl-xml-regexp)))
2f3108ad 656 (license license:perl-license)
ad871fc6
AE
657 (synopsis
658 "Perl module for building DOM Level 1 compliant document structures")
659 (description
660 "This module extends the XML::Parser module by Clark Cooper. The
661XML::Parser module is built on top of XML::Parser::Expat, which is a lower
662level interface to James Clark's expat library. XML::DOM::Parser is derived
663from XML::Parser. It parses XML strings or files and builds a data structure
664that conforms to the API of the Document Object Model.")
665 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
666
649e1676
RW
667(define-public perl-xml-compile-tester
668 (package
669 (name "perl-xml-compile-tester")
670 (version "0.90")
671 (source (origin
672 (method url-fetch)
673 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
674 "XML-Compile-Tester-" version ".tar.gz"))
675 (sha256
676 (base32
677 "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1"))))
678 (build-system perl-build-system)
679 (propagated-inputs
680 `(("perl-log-report" ,perl-log-report)
681 ("perl-test-deep" ,perl-test-deep)))
682 (home-page "http://search.cpan.org/dist/XML-Compile-Tester")
683 (synopsis "XML::Compile related regression testing")
684 (description
685 "The @code{XML::Compile} module suite has extensive regression testing.
686This module provide functions which simplify writing tests for
687@code{XML::Compile} related distributions.")
2f3108ad 688 (license license:perl-license)))
649e1676 689
b494a5f1
RW
690(define-public perl-xml-compile
691 (package
692 (name "perl-xml-compile")
18c832b0 693 (version "1.54")
b494a5f1
RW
694 (source (origin
695 (method url-fetch)
696 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
697 "XML-Compile-" version ".tar.gz"))
698 (sha256
699 (base32
18c832b0 700 "1hp41960bpqxvv1samv9hc0ghhmvs3i16r4rfl9yp54lp6jhsr2c"))))
b494a5f1
RW
701 (build-system perl-build-system)
702 (propagated-inputs
703 `(("perl-log-report" ,perl-log-report)
704 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
705 ("perl-xml-libxml" ,perl-xml-libxml)
706 ("perl-test-deep" ,perl-test-deep)))
707 (home-page "http://search.cpan.org/dist/XML-Compile")
708 (synopsis "Compilation-based XML processing")
709 (description
710 "@code{XML::Compile} can be used to translate a Perl data-structure into
711XML or XML into a Perl data-structure, both directions under rigid control by
712a schema.")
2f3108ad 713 (license license:perl-license)))
b494a5f1 714
c1d41b5d
RW
715(define-public perl-xml-compile-cache
716 (package
717 (name "perl-xml-compile-cache")
6b9d3f55 718 (version "1.05")
c1d41b5d
RW
719 (source (origin
720 (method url-fetch)
721 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
722 "XML-Compile-Cache-" version ".tar.gz"))
723 (sha256
724 (base32
6b9d3f55 725 "0xbwlszhi9hg8sxm5ylglm2qvnb689i595p913awrj2g4mp9yfsw"))))
c1d41b5d
RW
726 (build-system perl-build-system)
727 (propagated-inputs
728 `(("perl-log-report" ,perl-log-report)
729 ("perl-xml-compile" ,perl-xml-compile)
730 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
731 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
732 (home-page "http://search.cpan.org/dist/XML-Compile-Cache")
733 (synopsis "Cache compiled XML translators")
734 (description
735 "This package provides methods to cache compiled XML translators.")
2f3108ad 736 (license license:perl-license)))
c1d41b5d 737
baeab9b8
RW
738(define-public perl-xml-compile-soap
739 (package
740 (name "perl-xml-compile-soap")
24c013c0 741 (version "3.21")
baeab9b8
RW
742 (source (origin
743 (method url-fetch)
744 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
745 "XML-Compile-SOAP-" version ".tar.gz"))
746 (sha256
747 (base32
24c013c0 748 "0rxidh7kjyhnw2y789bqbwccnp8n0m3xskn524y9c752s64qpjcz"))))
baeab9b8
RW
749 (build-system perl-build-system)
750 (propagated-inputs
751 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
752 ("perl-libwww" ,perl-libwww)
753 ("perl-log-report" ,perl-log-report)
754 ("perl-xml-compile" ,perl-xml-compile)
755 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
756 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
757 (home-page "http://search.cpan.org/dist/XML-Compile-SOAP")
758 (synopsis "Base-class for SOAP implementations")
759 (description
760 "This module provides a class to handle the SOAP protocol. The first
761implementation is @url{SOAP1.1,
762http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
763used.")
2f3108ad 764 (license license:perl-license)))
baeab9b8 765
6a914948
RW
766(define-public perl-xml-compile-wsdl11
767 (package
768 (name "perl-xml-compile-wsdl11")
270cdbef 769 (version "3.06")
6a914948
RW
770 (source (origin
771 (method url-fetch)
772 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
773 "XML-Compile-WSDL11-" version ".tar.gz"))
774 (sha256
775 (base32
270cdbef 776 "0vbq05cpynm3jj81fw1k4nsb3wv4zngi6blvi1jhdarmh2rfg1x2"))))
6a914948
RW
777 (build-system perl-build-system)
778 (propagated-inputs
779 `(("perl-log-report" ,perl-log-report)
780 ("perl-xml-compile" ,perl-xml-compile)
781 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
782 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
783 (home-page "http://search.cpan.org/dist/XML-Compile-WSDL11")
784 (synopsis "Create SOAP messages defined by WSDL 1.1")
785 (description
786 "This module understands WSDL version 1.1. A WSDL file defines a set of
787messages to be send and received over SOAP connections. This involves
788encoding of the message to be send into XML, sending the message to the
789server, collect the answer, and finally decoding the XML to Perl.")
2f3108ad 790 (license license:perl-license)))
6a914948 791
246455c2 792(define-public perl-xml-feed
793 (package
794 (name "perl-xml-feed")
795 (version "0.53")
796 (source (origin
797 (method url-fetch)
798 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
799 "XML-Feed-" version ".tar.gz"))
800 (sha256
801 (base32
802 "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
803 (build-system perl-build-system)
804 (arguments
805 `(#:tests? #f)) ; Tests require internet connection
806 (native-inputs
807 `(("perl-module-build" ,perl-module-build)
808 ("perl-uri" ,perl-uri)
809 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
810 (inputs
811 `(("perl-class-errorhandler" ,perl-class-errorhandler)
812 ("perl-datetime" ,perl-datetime)
813 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
814 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
815 ("perl-feed-find" ,perl-feed-find)
816 ("perl-html-parser" ,perl-html-parser)
817 ("perl-libwww-perl" ,perl-libwww)
818 ("perl-module-pluggable" ,perl-module-pluggable)
819 ("perl-uri-fetch" ,perl-uri-fetch)
820 ("perl-xml-atom" ,perl-xml-atom)
821 ("perl-xml-libxml" ,perl-xml-libxml)
822 ("perl-xml-rss" ,perl-xml-rss)))
823 (home-page "http://search.cpan.org/dist/XML-Feed")
824 (synopsis "XML Syndication Feed Support")
825 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
826Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
827@code{XML::Feed} supports the following syndication feed formats:
828RSS 0.91, RSS 1.0, RSS 2.0, Atom")
2f3108ad 829 (license license:perl-license)))
246455c2 830
0c1bab36 831(define-public perl-xml-xpath
832 (package
833 (name "perl-xml-xpath")
47b4cedf 834 (version "1.40")
0c1bab36 835 (source (origin
836 (method url-fetch)
837 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
838 "XML-XPath-" version ".tar.gz"))
839 (sha256
840 (base32
47b4cedf 841 "07pa0bl42jka8mj7jshjynx8vpfh8b4cdyiv4zlkqvkqz98nzxib"))))
0c1bab36 842 (build-system perl-build-system)
843 (native-inputs
844 `(("perl-path-tiny" ,perl-path-tiny)))
845 (inputs
846 `(("perl-xml-parser" ,perl-xml-parser)))
847 (home-page "http://search.cpan.org/dist/XML-XPath")
848 (synopsis "Parse and evaluate XPath statements")
849 (description
850 "This module aims to comply exactly to the @url{XPath specification,
851https://www.w3.org/TR/xpath} and yet allow extensions to be added in
852the form of functions.")
2f3108ad 853 (license license:perl-license)))
0c1bab36 854
6ce212b8
RW
855(define-public pugixml
856 (package
857 (name "pugixml")
f821b101 858 (version "1.8.1")
6ce212b8
RW
859 (source
860 (origin
861 (method url-fetch)
0562a81e
EF
862 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
863 version "/pugixml-" version ".tar.gz"))
6ce212b8
RW
864 (sha256
865 (base32
f821b101 866 "0fcgggry5x5bn0zhb09ij9hb0p45nb0sv0d9fw3cm1cf62hp9n80"))))
6ce212b8
RW
867 (build-system cmake-build-system)
868 (arguments
52c14bb6
RJ
869 `(#:configure-flags '("-DCMAKE_CXX_FLAGS=-shared -fPIC"
870 "-DCMAKE_C_FLAGS=-shared -fPIC")
871 #:tests? #f)) ; no tests
6ce212b8
RW
872 (home-page "http://pugixml.org")
873 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
874 (description
875 "pugixml is a C++ XML processing library, which consists of a DOM-like
876interface with rich traversal/modification capabilities, a fast XML parser
877which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
878implementation for complex data-driven tree queries. Full Unicode support is
879also available, with Unicode interface variants and conversions between
880different Unicode encodings which happen automatically during
881parsing/saving.")
882 (license license:expat)))
883
c2efe1ae
MB
884(define-public python-pyxb
885 (package
886 (name "python-pyxb")
4ef6cfef 887 (version "1.2.6")
c2efe1ae
MB
888 (source (origin
889 (method url-fetch)
890 (uri (pypi-uri "PyXB" version))
891 (sha256
892 (base32
4ef6cfef 893 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
c2efe1ae
MB
894 (build-system python-build-system)
895 (home-page "http://pyxb.sourceforge.net/")
896 (synopsis "Python XML Schema Bindings")
897 (description
898 "PyXB (\"pixbee\") is a pure Python package that generates Python source
899code for classes that correspond to data structures defined by XMLSchema.")
900 (license (list license:asl2.0 ; Most files.
901 license:expat ; pyxb/utils/six.py
902 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
903 license:psfl)))) ; pyxb/utils/activestate.py
904
905(define-public python2-pyxb
906 (package-with-python2 python-pyxb))
907
37f9ff63
AE
908(define-public xmlto
909 (package
910 (name "xmlto")
877a6466 911 (version "0.0.28")
37f9ff63
AE
912 (source
913 (origin
914 (method url-fetch)
7bc19c92
LF
915 ;; The old source on fedorahosted.org is offline permanently:
916 ;; <https://bugs.gnu.org/25989>
917 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
918 "xmlto_" version ".orig.tar.bz2"))
919 (file-name (string-append name "-" version ".tar.bz2"))
37f9ff63
AE
920 (sha256
921 (base32
877a6466 922 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
37f9ff63 923 (build-system gnu-build-system)
ae0c1202
LC
924 (arguments
925 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
926 '(#:configure-flags (list (string-append "GETOPT="
927 (assoc-ref %build-inputs
928 "util-linux")
929 "/bin/getopt"))))
37f9ff63 930 (inputs
ae0c1202
LC
931 `(("util-linux" ,util-linux) ; for 'getopt'
932 ("libxml2" ,libxml2) ; for 'xmllint'
933 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
934 (home-page "http://cyberelk.net/tim/software/xmlto/")
935 (synopsis "Front-end to an XSL toolchain")
936 (description
937 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
938stylesheet for the conversion you want and applies it using an external
939XSL-T processor. It also performs any necessary post-processing.")
940 (license license:gpl2+)))
0899144f
AE
941
942(define-public xmlsec
943 (package
944 (name "xmlsec")
945 (version "1.2.20")
946 (source (origin
947 (method url-fetch)
948 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
949 name "1-" version ".tar.gz"))
950 (sha256
951 (base32
952 "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
953 (build-system gnu-build-system)
954 (propagated-inputs ; according to xmlsec1.pc
955 `(("libxml2" ,libxml2)
956 ("libxslt" ,libxslt)))
957 (inputs
958 `(("gnutls" ,gnutls)
959 ("libgcrypt" ,libgcrypt)
960 ("libltdl" ,libltdl)))
e4aab734
RW
961 (native-inputs
962 `(("pkg-config" ,pkg-config)))
0899144f
AE
963 (home-page "http://www.libexpat.org/")
964 (synopsis "XML Security Library")
965 (description
966 "The XML Security Library is a C library based on Libxml2. It
967supports XML security standards such as XML Signature, XML Encryption,
968Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
969Libxml2).")
970 (license (license:x11-style "file://COPYING"
971 "See 'COPYING' in the distribution."))))
96f8d991
RW
972
973(define-public minixml
974 (package
975 (name "minixml")
eba9ecd4 976 (version "2.10")
96f8d991
RW
977 (source (origin
978 (method url-fetch)
eba9ecd4
RW
979 (uri (string-append "https://github.com/michaelrsweet/mxml/"
980 "releases/download/release-" version
981 "/mxml-" version ".tar.gz"))
96f8d991
RW
982 (sha256
983 (base32
eba9ecd4 984 "14bqfq4lymhb31snz6wsvzhlavy0573v1nki1lbngiyxcj5zazr6"))))
96f8d991
RW
985 (build-system gnu-build-system)
986 (arguments
987 `(#:tests? #f)) ;no "check" target
eba9ecd4 988 (home-page "https://michaelrsweet.github.io/mxml")
96f8d991
RW
989 (synopsis "Small XML parsing library")
990 (description
991 "Mini-XML is a small C library to read and write XML files and strings in
992UTF-8 and UTF-16 encoding.")
993 ;; LGPL 2.0+ with additional exceptions for static linking
994 (license license:lgpl2.0+)))
33ae9107
DT
995
996;; TinyXML is an unmaintained piece of software, so the patches and build
997;; system massaging have no upstream potential.
998(define-public tinyxml
999 (package
1000 (name "tinyxml")
1001 (version "2.6.2")
1002 (source (origin
1003 (method url-fetch)
de67e922
LF
1004 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1005 version "/tinyxml_"
33ae9107
DT
1006 (string-join (string-split version #\.) "_")
1007 ".tar.gz"))
1008 (sha256
1009 (base32
1010 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
fc1adab1 1011 (patches (search-patches "tinyxml-use-stl.patch"))))
33ae9107
DT
1012 (build-system gnu-build-system)
1013 ;; This library is missing *a lot* of the steps to make it usable, so we
1014 ;; have to add them here, like every other distro must do.
1015 (arguments
1016 `(#:phases
1017 (modify-phases %standard-phases
1018 (delete 'configure)
1019 (add-after 'build 'build-shared-library
1020 (lambda _
1021 (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic"
1022 "tinyxml.cpp" "tinyxmlerror.cpp"
1023 "tinyxmlparser.cpp" "tinystr.cpp"
1024 "-o" "libtinyxml.so"))))
1025 (replace 'check
1026 (lambda _ (zero? (system "./xmltest"))))
1027 (replace 'install
1028 (lambda* (#:key outputs #:allow-other-keys)
1029 (let* ((out (assoc-ref outputs "out"))
1030 (include (string-append out "/include"))
1031 (lib (string-append out "/lib"))
1032 (pkgconfig (string-append out "/lib/pkgconfig"))
1033 (doc (string-append out "/share/doc")))
1034 ;; Install libs and headers.
1035 (install-file "libtinyxml.so" lib)
1036 (install-file "tinystr.h" include)
1037 (install-file "tinyxml.h" include)
1038 ;; Generate and install pkg-config file.
1039 (mkdir-p pkgconfig)
1040 ;; Software such as Kodi expect this file to be present, but
1041 ;; it's not provided in the source code.
1042 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1043 (lambda (port)
1044 (format port "prefix=~a
1045exec_prefix=${prefix}
1046libdir=${exec_prefix}/lib
1047includedir=${prefix}/include
1048
1049Name: TinyXML
1050Description: A simple, small, C++ XML parser
1051Version: ~a
1052Libs: -L${libdir} -ltinyxml
1053Cflags: -I${includedir}
1054"
1055 out ,version)))
1056 ;; Install docs.
1057 (mkdir-p doc)
1058 (copy-recursively "docs" (string-append doc "tinyxml"))
1059 #t))))))
1060 (synopsis "Small XML parser for C++")
1061 (description "TinyXML is a small and simple XML parsing library for the
05077200 1062C++ programming language.")
33ae9107
DT
1063 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1064 (license license:zlib)))
fe9451c5 1065
931bd7f6
TGR
1066(define-public tinyxml2
1067 (package
1068 (name "tinyxml2")
1069 (version "4.0.1")
1070 (source
1071 (origin
1072 (method url-fetch)
1073 (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
1074 version ".tar.gz"))
1075 (sha256
1076 (base32
1077 "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
1078 (build-system cmake-build-system)
1079 (arguments
1080 `(#:tests? #f)) ; no tests
1081 (synopsis "Small XML parser for C++")
1082 (description "TinyXML2 is a small and simple XML parsing library for the
1083C++ programming language.")
1084 (home-page "http://www.grinninglizard.com/tinyxml2/")
1085 (license license:zlib)))
1086
fe9451c5
RG
1087(define-public xmlstarlet
1088 (package
1089 (name "xmlstarlet")
1090 (version "1.6.1")
1091 (source
1092 (origin
1093 (method url-fetch)
1094 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1095 version "/xmlstarlet-" version ".tar.gz"))
1096 (sha256
1097 (base32
1098 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1099 (build-system gnu-build-system)
22ea0235
MB
1100 (arguments
1101 '(#:phases
1102 (modify-phases %standard-phases
1103 (add-before 'check 'drop-failing-tests
1104 (lambda _
1105 ;; FIXME: Why are these tests failing.
1106 (substitute* "Makefile"
1107 (("^examples/schema1\\\\") "\\")
1108 (("^examples/valid1\\\\") "\\"))
1109 #t)))))
fe9451c5
RG
1110 (inputs
1111 `(("libxslt" ,libxslt)
1112 ("libxml2" ,libxml2)))
1113 (home-page "http://xmlstar.sourceforge.net/")
1114 (synopsis "Command line XML toolkit")
1115 (description "XMLStarlet is a set of command line utilities which can be
1116used to transform, query, validate, and edit XML documents. XPath is used to
1117match and extract data, and elements can be added, deleted or modified using
1118XSLT and EXSLT.")
1119 (license license:x11)))
19c33040 1120
767d24e8
SR
1121(define-public html-xml-utils
1122 (package
1123 (name "html-xml-utils")
1124 (version "7.4")
1125 (source
1126 (origin
1127 (method url-fetch)
1128 (uri (string-append
1129 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1130 version ".tar.gz"))
1131 (sha256
1132 (base32
1133 "04pgrahsfawnzd9pilvirs05pfdgsd7qwvw4dvkb42rgybhw6h95"))))
1134 (build-system gnu-build-system)
1135 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1136 (synopsis "Command line utilities to manipulate HTML and XML files")
1137 (description "HTML-XML-utils provides a number of simple utilities for
1138manipulating and converting HTML and XML files in various ways. The suite
1139consists of the following tools:
1140
1141@itemize
1142 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1143 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1144 @item @command{hxaddid} add IDs to selected elements
1145 @item @command{hxcite} replace bibliographic references by hyperlinks
1146 @item @command{hxcite} mkbib - expand references and create bibliography
1147 @item @command{hxclean} apply heuristics to correct an HTML file
1148 @item @command{hxcopy} copy an HTML file while preserving relative links
1149 @item @command{hxcount} count elements and attributes in HTML or XML files
1150 @item @command{hxextract} extract selected elements
1151 @item @command{hxincl} expand included HTML or XML files
1152 @item @command{hxindex} create an alphabetically sorted index
1153 @item @command{hxmkbib} create bibliography from a template
1154 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1155 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1156elements to their parents
1157 @item @command{hxnormalize} pretty-print an HTML file
1158 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1159 @item @command{hxnum} number section headings in an HTML file
1160 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1161 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1162 @item @command{hxprune} remove marked elements from an HTML file
1163 @item @command{hxref} generate cross-references
1164 @item @command{hxselect} extract elements that match a (CSS) selector
1165 @item @command{hxtoc} insert a table of contents in an HTML file
1166 @item @command{hxuncdata} replace CDATA sections by character entities
1167 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1168 @item @command{hxunpipe} convert output of pipe back to XML format
1169 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1170 @item @command{hxwls} list links in an HTML file
1171 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1172@end itemize
1173")
1174 (license license:expat)))
1175
19c33040
JN
1176(define-public xlsx2csv
1177 (package
1178 (name "xlsx2csv")
1179 (version "0.7.2")
1180 (source (origin
1181 (method url-fetch)
1182 (uri (string-append
1183 "https://github.com/dilshod/"
1184 name "/archive/release/" version ".tar.gz"))
1185 (file-name (string-append name "-" version ".tar.gz"))
1186 (sha256
1187 (base32
1188 "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
1189 (build-system python-build-system)
1190 (arguments
1191 `(#:python ,python-2 ; Use python-2 for the test script.
1192 #:phases
1193 (modify-phases %standard-phases
1194 (replace 'check
1195 (lambda _
1196 (substitute* "test/run"
1197 ;; Run tests with `python' only
1198 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1199 (zero? (system* "test/run")))))))
1200 (home-page "https://github.com/dilshod/xlsx2csv")
1201 (synopsis "XLSX to CSV converter")
1202 (description
1203 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1204XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1205files. It is designed to be fast and to handle large input files.")
1206 (license license:gpl2+)))
d2b51c08 1207
1208(define-public python-defusedxml
1209 (package
1210 (name "python-defusedxml")
1211 (version "0.4.1")
1212 (source
1213 (origin
1214 (method url-fetch)
1215 (uri (pypi-uri "defusedxml" version))
1216 (sha256
1217 (base32
1218 "0y147zy3jqmk6ly7fbhqmzn1hf41xcb53f2vcc3m8x4ba5d1smfd"))))
1219 (build-system python-build-system)
1220 (home-page "https://bitbucket.org/tiran/defusedxml")
1221 (synopsis "XML bomb protection for Python stdlib modules")
1222 (description
1223 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1224 (license license:psfl)))
1225
1226(define-public python2-defusedxml
1227 (package-with-python2 python-defusedxml))
ca8f3f9a
AP
1228
1229(define-public libxls
1230 (package
1231 (name "libxls")
1232 (version "1.4.0")
1233 (source (origin
1234 (method url-fetch)
1235 (uri (string-append "https://sourceforge.net/projects/"
1236 name "/files/" name "-"
1237 version ".zip"))
1238 (sha256
1239 (base32
1240 "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
1241 (build-system gnu-build-system)
1242 (arguments
1243 `(#:phases
1244 (modify-phases %standard-phases
1245 ;; Bootstrapping is required in order to fix the test driver script.
1246 (add-after 'unpack 'bootstrap
1247 (lambda _
1248 (zero? (system* "bash" "bootstrap")))))))
1249 (native-inputs
1250 `(("unzip" ,unzip)
1251 ("autoconf" ,autoconf)
1252 ("automake" ,automake)
1253 ("libtool" ,libtool)))
1254 (home-page "http://libxls.sourceforge.net/")
1255 (synopsis "Read Excel files")
1256 (description
1257 "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
1258libxls cannot write Excel files.")
1259 (license license:bsd-2)))
623fb4d1
AP
1260
1261(define-public freexl
1262 (package
1263 (name "freexl")
dc4ffa67 1264 (version "1.0.4")
623fb4d1
AP
1265 (source (origin
1266 (method url-fetch)
1267 (uri (string-append "http://www.gaia-gis.it/gaia-sins/"
1268 name "-" version ".tar.gz"))
1269 (sha256
1270 (base32
dc4ffa67 1271 "09bwzqjc41cc8qw8qkw9wq58rg9nax8r3fg19iny5vmw1c0z23sh"))))
623fb4d1
AP
1272 (build-system gnu-build-system)
1273 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1274 (synopsis "Read Excel files")
1275 (description
1276 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1277spreadsheet.")
1278 ;; Any of these licenses may be picked.
1279 (license (list license:gpl2+
1280 license:lgpl2.1+
1281 license:mpl1.1))))
d00d6cea
RW
1282
1283(define-public xerces-c
1284 (package
1285 (name "xerces-c")
1286 (version "3.1.4")
1287 (source (origin
1288 (method url-fetch)
1289 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1290 "xerces-c-" version ".tar.xz"))
1291 (sha256
1292 (base32
1293 "0hb29c0smqlpxj0zdm09s983z5jx37szlliccnvgh0qq91wwqwwr"))))
1294 (build-system gnu-build-system)
1295 (arguments
1296 (let ((system (or (%current-target-system)
1297 (%current-system))))
1298 (if (string-prefix? "x86_64" system)
1299 '()
1300 '(#:configure-flags '("--disable-sse2")))))
1301 (native-inputs
1302 `(("perl" ,perl)))
1303 (home-page "http://xerces.apache.org/xerces-c/")
1304 (synopsis "Validating XML parser library for C++")
1305 (description "Xerces-C++ is a validating XML parser written in a portable
1306subset of C++. Xerces-C++ makes it easy to give your application the ability
1307to read and write XML data. A shared library is provided for parsing,
1308generating, manipulating, and validating XML documents using the DOM, SAX, and
1309SAX2 APIs.")
1310 (license license:asl2.0)))
77d7b57c
RW
1311
1312(define-public java-simple-xml
1313 (package
1314 (name "java-simple-xml")
1315 (version "2.7.1")
1316 (source (origin
1317 (method url-fetch)
1318 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1319 version ".zip"))
1320 (sha256
1321 (base32
1322 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))))
1323 (build-system ant-build-system)
1324 (arguments
1325 `(#:build-target "build"
1326 #:test-target "test"
1327 #:phases
1328 (modify-phases %standard-phases
1329 (replace 'install (install-jars "jar")))))
1330 (native-inputs
1331 `(("unzip" ,unzip)))
1332 (home-page "http://simple.sourceforge.net/")
1333 (synopsis "XML serialization framework for Java")
1334 (description "Simple is a high performance XML serialization and
1335configuration framework for Java. Its goal is to provide an XML framework
1336that enables rapid development of XML configuration and communication systems.
1337This framework aids the development of XML systems with minimal effort and
1338reduced errors. It offers full object serialization and deserialization,
1339maintaining each reference encountered.")
1340 (license license:asl2.0)))
3b695802
P
1341
1342(define-public perl-xml-xpathengine
1343 (package
1344 (name "perl-xml-xpathengine")
1345 (version "0.14")
1346 (source (origin
1347 (method url-fetch)
1348 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1349 "XML-XPathEngine-" version ".tar.gz"))
1350 (sha256
1351 (base32
1352 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1353 (build-system perl-build-system)
1354 (home-page "http://search.cpan.org/dist/XML-XPathEngine/")
1355 (synopsis "Re-usable XPath engine for DOM-like trees")
1356 (description
1357 "This module provides an XPath engine, that can be re-used by other
1358modules/classes that implement trees.
1359
1360In order to use the XPath engine, nodes in the user module need to mimick DOM
1361nodes. The degree of similitude between the user tree and a DOM dictates how
1362much of the XPath features can be used. A module implementing all of the DOM
1363should be able to use this module very easily (you might need to add the
1364@code{cmp} method on nodes in order to get ordered result sets).")
1365 (license license:perl-license)))
9e1c3581
P
1366
1367(define-public perl-tree-xpathengine
1368 (package
1369 (name "perl-tree-xpathengine")
1370 (version "0.05")
1371 (source (origin
1372 (method url-fetch)
1373 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1374 "Tree-XPathEngine-" version ".tar.gz"))
1375 (sha256
1376 (base32
1377 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1378 (build-system perl-build-system)
1379 (home-page "http://search.cpan.org/dist/Tree-XPathEngine/")
1380 (synopsis "Re-usable XPath engine")
1381 (description
1382 "This module provides an XPath engine, that can be re-used by other
1383module/classes that implement trees. It is designed to be compatible with
1384@code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1385by @code{Tree::XPathEngine}.")
1386 (license license:perl-license)))
b7c59195
P
1387
1388(define-public perl-xml-filter-buffertext
1389 (package
1390 (name "perl-xml-filter-buffertext")
1391 (version "1.01")
1392 (source
1393 (origin
1394 (method url-fetch)
1395 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1396 "XML-Filter-BufferText-" version ".tar.gz"))
1397 (sha256
1398 (base32
1399 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1400 (build-system perl-build-system)
1401 (propagated-inputs
1402 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1403 (home-page "http://search.cpan.org/dist/XML-Filter-BufferText/")
1404 (synopsis "Filter to put all characters() in one event")
1405 (description "This is a very simple filter. One common cause of
1406grief (and programmer error) is that XML parsers aren't required to provide
1407character events in one chunk. They can, but are not forced to, and most
1408don't. This filter does the trivial but oft-repeated task of putting all
1409characters into a single event.")
1410 (license license:perl-license)))
33b592ee
P
1411
1412(define-public perl-xml-sax-writer
1413 (package
1414 (name "perl-xml-sax-writer")
1415 (version "0.57")
1416 (source (origin
1417 (method url-fetch)
1418 (uri (string-append
1419 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1420 "XML-SAX-Writer-" version ".tar.gz"))
1421 (sha256
1422 (base32
1423 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1424 (build-system perl-build-system)
1425 (propagated-inputs
1426 `(("perl-libxml" ,perl-libxml)
1427 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1428 ("perl-xml-namespacesupport", perl-xml-namespacesupport)
1429 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1430 (home-page "http://search.cpan.org/dist/XML-SAX-Writer/")
1431 (synopsis "SAX2 XML Writer")
1432 (description
1433 "This is an XML writer that understands SAX2. It is based on
1434@code{XML::Handler::YAWriter}.")
1435 (license license:perl-license)))
9e88b210
P
1436
1437(define-public perl-xml-handler-yawriter
1438 (package
1439 (name "perl-xml-handler-yawriter")
1440 (version "0.23")
1441 (source
1442 (origin
1443 (method url-fetch)
1444 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1445 "XML-Handler-YAWriter-" version ".tar.gz"))
1446 (sha256
1447 (base32
1448 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1449 (build-system perl-build-system)
1450 (propagated-inputs
1451 `(("perl-libxml" ,perl-libxml)))
1452 (home-page "http://search.cpan.org/dist/XML-Handler-YAWriter/")
1453 (synopsis "Yet another Perl SAX XML Writer")
1454 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1455It provides a flexible escaping technique and pretty printing.")
1456 (license license:perl-license)))
85f225fb
P
1457
1458(define-public perl-xml-twig
1459 (package
1460 (name "perl-xml-twig")
1461 (version "3.52")
1462 (source (origin
1463 (method url-fetch)
1464 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1465 "XML-Twig-" version ".tar.gz"))
1466 (sha256
1467 (base32
1468 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1469 (build-system perl-build-system)
1470 (inputs
1471 `(("expat" ,expat)))
1472 (propagated-inputs
1473 `(("perl-html-tidy" ,perl-html-tidy)
1474 ("perl-html-tree" ,perl-html-tree)
1475 ("perl-io-captureoutput" ,perl-io-captureoutput)
1476 ("perl-io-string" ,perl-io-string)
1477 ("perl-io-stringy" ,perl-io-stringy)
1478 ("perl-libxml" ,perl-libxml)
1479 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1480 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1481 ("perl-xml-parser" ,perl-xml-parser)
1482 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1483 ("perl-xml-simple" ,perl-xml-simple)
1484 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
1485 ("perl-test-pod", perl-test-pod)
1486 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1487 (home-page "http://search.cpan.org/dist/XML-Twig/")
1488 (synopsis "Perl module for processing huge XML documents in tree mode")
1489 (description "@code{XML::Twig} is an XML transformation module. Its
1490strong points: can be used to process huge documents while still being in tree
1491mode; not bound by DOM or SAX, so it is very perlish and offers a very
1492comprehensive set of methods; simple to use; DWIMs as much as possible.
1493
1494What it doesn't offer: full SAX support (it can export SAX, but only reads
1495XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1496support.")
1497 (license license:perl-license)))