Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / xml.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 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 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages xml)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages gnupg)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages tls)
34 #:use-module (gnu packages web)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system perl)
41 #:use-module (guix build-system python)
42 #:use-module (gnu packages linux))
43
44 (define-public expat
45 (package
46 (name "expat")
47 (version "2.1.1")
48 (source (origin
49 (method url-fetch)
50 (uri (string-append "mirror://sourceforge/expat/expat/"
51 version "/expat-" version ".tar.bz2"))
52 (sha256
53 (base32
54 "0ryyjgvy7jq0qb7a9mhc1giy3bzn56aiwrs8dpydqngplbjq9xdg"))))
55 (build-system gnu-build-system)
56 (home-page "http://www.libexpat.org/")
57 (synopsis "Stream-oriented XML parser library written in C")
58 (description
59 "Expat is an XML parser library written in C. It is a
60 stream-oriented parser in which an application registers handlers for
61 things the parser might find in the XML document (like start tags).")
62 (license license:expat)))
63
64 (define-public libxml2
65 (package
66 (name "libxml2")
67 (version "2.9.3")
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
71 version ".tar.gz"))
72 (sha256
73 (base32
74 "0bd17g6znn2r98gzpjppsqjg33iraky4px923j3k8kdl8qgy7sad"))))
75 (build-system gnu-build-system)
76 (home-page "http://www.xmlsoft.org/")
77 (synopsis "C parser for XML")
78 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
79 (native-inputs `(("perl" ,perl)))
80 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
81 ;; sub-directory of any given package.
82 (native-search-paths (list (search-path-specification
83 (variable "XML_CATALOG_FILES")
84 (separator " ")
85 (files '("xml"))
86 (file-pattern "^catalog\\.xml$")
87 (file-type 'regular))))
88 (search-paths native-search-paths)
89 (description
90 "Libxml2 is the XML C parser and toolkit developed for the Gnome
91 project (but it is usable outside of the Gnome platform).")
92 (license license:x11)))
93
94 (define-public python-libxml2
95 (package (inherit libxml2)
96 (name "python-libxml2")
97 (build-system python-build-system)
98 (arguments
99 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
100 #:tests? #f
101 #:phases
102 (modify-phases %standard-phases
103 (add-before
104 'build 'configure
105 (lambda* (#:key inputs #:allow-other-keys)
106 (chdir "python")
107 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
108 "cross-libc" "libc")))
109 (libxml2 (assoc-ref inputs "libxml2")))
110 (substitute* "setup.py"
111 ;; For 'libxml2/libxml/tree.h'.
112 (("ROOT = r'/usr'")
113 (format #f "ROOT = r'~a'" libxml2))
114 ;; For 'iconv.h'.
115 (("/opt/include")
116 (string-append glibc "/include")))))))))
117 (inputs `(("libxml2" ,libxml2)))
118 (synopsis "Python bindings for the libxml2 library")))
119
120 (define-public python2-libxml2
121 (package-with-python2 python-libxml2))
122
123 (define-public libxslt
124 (package
125 (name "libxslt")
126 (version "1.1.28")
127 (source (origin
128 (method url-fetch)
129 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
130 version ".tar.gz"))
131 (sha256
132 (base32
133 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))
134 (patches (list (search-patch "libxslt-CVE-2015-7995.patch")))))
135 (build-system gnu-build-system)
136 (home-page "http://xmlsoft.org/XSLT/index.html")
137 (synopsis "C library for applying XSLT stylesheets to XML documents")
138 (inputs `(("libgcrypt" ,libgcrypt)
139 ("libxml2" ,libxml2)
140 ("python" ,python-minimal-wrapper)
141 ("zlib" ,zlib)))
142 (description
143 "Libxslt is an XSLT C library developed for the GNOME project. It is
144 based on libxml for XML parsing, tree manipulation and XPath support.")
145 (license license:x11)))
146
147 (define-public perl-xml-parser
148 (package
149 (name "perl-xml-parser")
150 (version "2.44")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append
154 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
155 version ".tar.gz"))
156 (sha256
157 (base32
158 "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"))))
159 (build-system perl-build-system)
160 (arguments `(#:make-maker-flags
161 (let ((expat (assoc-ref %build-inputs "expat")))
162 (list (string-append "EXPATLIBPATH=" expat "/lib")
163 (string-append "EXPATINCPATH=" expat "/include")))))
164 (inputs `(("expat" ,expat)))
165 (license (package-license perl))
166 (synopsis "Perl bindings to the Expat XML parsing library")
167 (description
168 "This module provides ways to parse XML documents. It is built on top of
169 XML::Parser::Expat, which is a lower level interface to James Clark's expat
170 library. Each call to one of the parsing methods creates a new instance of
171 XML::Parser::Expat which is then used to parse the document. Expat options
172 may be provided when the XML::Parser object is created. These options are
173 then passed on to the Expat object on each parse call. They can also be given
174 as extra arguments to the parse methods, in which case they override options
175 given at XML::Parser creation time.")
176 (home-page "http://search.cpan.org/dist/XML-Parser")))
177
178 (define-public perl-libxml
179 (package
180 (name "perl-libxml")
181 (version "0.08")
182 (source (origin
183 (method url-fetch)
184 (uri (string-append
185 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
186 version ".tar.gz"))
187 (sha256
188 (base32
189 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
190 (build-system perl-build-system)
191 (propagated-inputs
192 `(("perl-xml-parser" ,perl-xml-parser)))
193 (license (package-license perl))
194 (synopsis "Perl SAX parser using XML::Parser")
195 (description
196 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
197 module.")
198 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
199
200 (define-public perl-xml-libxml
201 (package
202 (name "perl-xml-libxml")
203 (version "2.0118")
204 (source
205 (origin
206 (method url-fetch)
207 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
208 "XML-LibXML-" version ".tar.gz"))
209 (sha256
210 (base32
211 "170c8dbk4p6jw9is0cria73021yp3hpmhb19p9j0zg2yxwkawr6c"))))
212 (build-system perl-build-system)
213 (propagated-inputs
214 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
215 ("perl-xml-sax" ,perl-xml-sax)))
216 (inputs
217 `(("libxml2" ,libxml2)))
218 (home-page "http://search.cpan.org/dist/XML-LibXML")
219 (synopsis "Perl interface to libxml2")
220 (description "This module implements a Perl interface to the libxml2
221 library which provides interfaces for parsing and manipulating XML files. This
222 module allows Perl programmers to make use of the highly capable validating
223 XML parser and the high performance DOM implementation.")
224 (license (package-license perl))))
225
226 (define-public perl-xml-libxml-simple
227 (package
228 (name "perl-xml-libxml-simple")
229 (version "0.95")
230 (source (origin
231 (method url-fetch)
232 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
233 "XML-LibXML-Simple-" version ".tar.gz"))
234 (sha256
235 (base32
236 "0qqfqj5bgqmh1j4iv8dwl3g00nsmcvf2b7w1d09k9d77rrb249xi"))))
237 (build-system perl-build-system)
238 (propagated-inputs
239 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
240 ("perl-xml-libxml" ,perl-xml-libxml)))
241 (home-page "http://search.cpan.org/dist/XML-LibXML-Simple")
242 (synopsis "XML::LibXML based XML::Simple clone")
243 (description
244 "This package provides the same API as @code{XML::Simple} but is based on
245 @code{XML::LibXML}.")
246 (license (package-license perl))))
247
248 (define-public perl-xml-namespacesupport
249 (package
250 (name "perl-xml-namespacesupport")
251 (version "1.11")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
256 "XML-NamespaceSupport-" version ".tar.gz"))
257 (sha256
258 (base32
259 "1sklgcldl3w6gn706vx1cgz6pm4y5lfgsjxnfqyk20pilgq530bd"))))
260 (build-system perl-build-system)
261 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
262 (synopsis "XML namespace support class")
263 (description "This module offers a simple to process namespaced XML
264 names (unames) from within any application that may need them. It also helps
265 maintain a prefix to namespace URI map, and provides a number of basic
266 checks.")
267 (license (package-license perl))))
268
269 (define-public perl-xml-sax
270 (package
271 (name "perl-xml-sax")
272 (version "0.99")
273 (source
274 (origin
275 (method url-fetch)
276 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
277 "XML-SAX-" version ".tar.gz"))
278 (sha256
279 (base32
280 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
281 (build-system perl-build-system)
282 (propagated-inputs
283 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
284 ("perl-xml-sax-base" ,perl-xml-sax-base)))
285 (arguments
286 `(#:phases (modify-phases %standard-phases
287 (add-before
288 'install 'augment-path
289 ;; The install target tries to load the newly-installed
290 ;; XML::SAX module, but can't find it, so we need to tell
291 ;; perl where to look.
292 (lambda* (#:key outputs #:allow-other-keys)
293 (setenv "PERL5LIB"
294 (string-append (getenv "PERL5LIB") ":"
295 (assoc-ref outputs "out")
296 "/lib/perl5/site_perl")))))))
297 (home-page "http://search.cpan.org/dist/XML-SAX")
298 (synopsis "Perl API for XML")
299 (description "XML::SAX consists of several framework classes for using and
300 building Perl SAX2 XML parsers, filters, and drivers.")
301 (license (package-license perl))))
302
303 (define-public perl-xml-sax-base
304 (package
305 (name "perl-xml-sax-base")
306 (version "1.08")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
311 "XML-SAX-Base-" version ".tar.gz"))
312 (sha256
313 (base32
314 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
315 (build-system perl-build-system)
316 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
317 (synopsis "Base class for SAX Drivers and Filters")
318 (description "This module has a very simple task - to be a base class for
319 PerlSAX drivers and filters. It's default behaviour is to pass the input
320 directly to the output unchanged. It can be useful to use this module as a
321 base class so you don't have to, for example, implement the characters()
322 callback.")
323 (license (package-license perl))))
324
325 (define-public perl-xml-simple
326 (package
327 (name "perl-xml-simple")
328 (version "2.20")
329 (source (origin
330 (method url-fetch)
331 (uri (string-append
332 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
333 version ".tar.gz"))
334 (sha256
335 (base32
336 "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
337 (build-system perl-build-system)
338 (propagated-inputs
339 `(("perl-xml-parser" ,perl-xml-parser)))
340 (license (package-license perl))
341 (synopsis "Perl module for easy reading/writing of XML files")
342 (description
343 "The XML::Simple module provides a simple API layer on top of an
344 underlying XML parsing module (either XML::Parser or one of the SAX2
345 parser modules).")
346 (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
347
348 (define-public perl-xml-regexp
349 (package
350 (name "perl-xml-regexp")
351 (version "0.04")
352 (source (origin
353 (method url-fetch)
354 (uri (string-append
355 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
356 version ".tar.gz"))
357 (sha256
358 (base32
359 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
360 (build-system perl-build-system)
361 (inputs
362 `(("perl-xml-parser" ,perl-xml-parser)))
363 (license (package-license perl))
364 (synopsis "Perl regular expressions for XML tokens")
365 (description
366 "XML::RegExp contains regular expressions for the following XML tokens:
367 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
368 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
369 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
370
371 (define-public perl-xml-dom
372 (package
373 (name "perl-xml-dom")
374 (version "1.44")
375 (source (origin
376 (method url-fetch)
377 (uri (string-append
378 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
379 version ".tar.gz"))
380 (sha256
381 (base32
382 "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
383 (build-system perl-build-system)
384 (propagated-inputs
385 `(("perl-libwww" ,perl-libwww)
386 ("perl-libxml" ,perl-libxml)
387 ("perl-xml-regexp" ,perl-xml-regexp)))
388 (license (package-license perl))
389 (synopsis
390 "Perl module for building DOM Level 1 compliant document structures")
391 (description
392 "This module extends the XML::Parser module by Clark Cooper. The
393 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
394 level interface to James Clark's expat library. XML::DOM::Parser is derived
395 from XML::Parser. It parses XML strings or files and builds a data structure
396 that conforms to the API of the Document Object Model.")
397 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
398
399 (define-public perl-xml-compile-tester
400 (package
401 (name "perl-xml-compile-tester")
402 (version "0.90")
403 (source (origin
404 (method url-fetch)
405 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
406 "XML-Compile-Tester-" version ".tar.gz"))
407 (sha256
408 (base32
409 "1bcl8x8cyacqv9yjp97aq9qq85sy8wv78kd8c16yd9yw3by4cpp1"))))
410 (build-system perl-build-system)
411 (propagated-inputs
412 `(("perl-log-report" ,perl-log-report)
413 ("perl-test-deep" ,perl-test-deep)))
414 (home-page "http://search.cpan.org/dist/XML-Compile-Tester")
415 (synopsis "XML::Compile related regression testing")
416 (description
417 "The @code{XML::Compile} module suite has extensive regression testing.
418 This module provide functions which simplify writing tests for
419 @code{XML::Compile} related distributions.")
420 (license (package-license perl))))
421
422 (define-public perl-xml-compile
423 (package
424 (name "perl-xml-compile")
425 (version "1.51")
426 (source (origin
427 (method url-fetch)
428 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
429 "XML-Compile-" version ".tar.gz"))
430 (sha256
431 (base32
432 "06fj4zf0yh4kf3kx4bhwrmrjr6al40nasasbgfhn8f1zxwkmm8f2"))))
433 (build-system perl-build-system)
434 (propagated-inputs
435 `(("perl-log-report" ,perl-log-report)
436 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
437 ("perl-xml-libxml" ,perl-xml-libxml)
438 ("perl-test-deep" ,perl-test-deep)))
439 (home-page "http://search.cpan.org/dist/XML-Compile")
440 (synopsis "Compilation-based XML processing")
441 (description
442 "@code{XML::Compile} can be used to translate a Perl data-structure into
443 XML or XML into a Perl data-structure, both directions under rigid control by
444 a schema.")
445 (license (package-license perl))))
446
447 (define-public perl-xml-compile-cache
448 (package
449 (name "perl-xml-compile-cache")
450 (version "1.04")
451 (source (origin
452 (method url-fetch)
453 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
454 "XML-Compile-Cache-" version ".tar.gz"))
455 (sha256
456 (base32
457 "1689dm54n7wb0n0cl9n77vk0kvg0mcckn2hz9ahigjhvazah8740"))))
458 (build-system perl-build-system)
459 (propagated-inputs
460 `(("perl-log-report" ,perl-log-report)
461 ("perl-xml-compile" ,perl-xml-compile)
462 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
463 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
464 (home-page "http://search.cpan.org/dist/XML-Compile-Cache")
465 (synopsis "Cache compiled XML translators")
466 (description
467 "This package provides methods to cache compiled XML translators.")
468 (license (package-license perl))))
469
470 (define-public perl-xml-compile-soap
471 (package
472 (name "perl-xml-compile-soap")
473 (version "3.13")
474 (source (origin
475 (method url-fetch)
476 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
477 "XML-Compile-SOAP-" version ".tar.gz"))
478 (sha256
479 (base32
480 "08qw63l78040nh37xzapbqp43g6s5l67bvskf3dyyizlarjx5mi4"))))
481 (build-system perl-build-system)
482 (propagated-inputs
483 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
484 ("perl-libwww" ,perl-libwww)
485 ("perl-log-report" ,perl-log-report)
486 ("perl-xml-compile" ,perl-xml-compile)
487 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
488 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
489 (home-page "http://search.cpan.org/dist/XML-Compile-SOAP")
490 (synopsis "Base-class for SOAP implementations")
491 (description
492 "This module provides a class to handle the SOAP protocol. The first
493 implementation is @url{SOAP1.1,
494 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
495 used.")
496 (license (package-license perl))))
497
498 (define-public perl-xml-compile-wsdl11
499 (package
500 (name "perl-xml-compile-wsdl11")
501 (version "3.04")
502 (source (origin
503 (method url-fetch)
504 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
505 "XML-Compile-WSDL11-" version ".tar.gz"))
506 (sha256
507 (base32
508 "0pyikwnfwpangvnkf5dbdagy4z93ag9824f1ax5qaibc3ghca8kv"))))
509 (build-system perl-build-system)
510 (propagated-inputs
511 `(("perl-log-report" ,perl-log-report)
512 ("perl-xml-compile" ,perl-xml-compile)
513 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
514 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
515 (home-page "http://search.cpan.org/dist/XML-Compile-WSDL11")
516 (synopsis "Create SOAP messages defined by WSDL 1.1")
517 (description
518 "This module understands WSDL version 1.1. A WSDL file defines a set of
519 messages to be send and received over SOAP connections. This involves
520 encoding of the message to be send into XML, sending the message to the
521 server, collect the answer, and finally decoding the XML to Perl.")
522 (license (package-license perl))))
523
524 (define-public pugixml
525 (package
526 (name "pugixml")
527 (version "1.6")
528 (source
529 (origin
530 (method url-fetch)
531 (uri (string-append "https://github.com/zeux/pugixml/archive/v"
532 version ".tar.gz"))
533 (file-name (string-append name "-" version ".tar.gz"))
534 (sha256
535 (base32
536 "0czbcv9aqf2rw3s9cljz2wb1f4zbhd07wnj7ykklklccl0ipfnwi"))))
537 (build-system cmake-build-system)
538 (arguments
539 `(#:tests? #f
540 #:out-of-source? #f
541 #:phases (modify-phases %standard-phases
542 (add-before
543 'configure 'chdir
544 (lambda _
545 (chdir "scripts")
546 #t)))))
547 (home-page "http://pugixml.org")
548 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
549 (description
550 "pugixml is a C++ XML processing library, which consists of a DOM-like
551 interface with rich traversal/modification capabilities, a fast XML parser
552 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
553 implementation for complex data-driven tree queries. Full Unicode support is
554 also available, with Unicode interface variants and conversions between
555 different Unicode encodings which happen automatically during
556 parsing/saving.")
557 (license license:expat)))
558
559 (define-public xmlto
560 (package
561 (name "xmlto")
562 (version "0.0.28")
563 (source
564 (origin
565 (method url-fetch)
566 (uri (string-append
567 "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
568 version ".tar.bz2"))
569 (sha256
570 (base32
571 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
572 (build-system gnu-build-system)
573 (arguments
574 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
575 '(#:configure-flags (list (string-append "GETOPT="
576 (assoc-ref %build-inputs
577 "util-linux")
578 "/bin/getopt"))))
579 (inputs
580 `(("util-linux" ,util-linux) ; for 'getopt'
581 ("libxml2" ,libxml2) ; for 'xmllint'
582 ("libxslt" ,libxslt))) ; for 'xsltproc'
583 (home-page "http://cyberelk.net/tim/software/xmlto/")
584 (synopsis "Front-end to an XSL toolchain")
585 (description
586 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
587 stylesheet for the conversion you want and applies it using an external
588 XSL-T processor. It also performs any necessary post-processing.")
589 (license license:gpl2+)))
590
591 (define-public xmlsec
592 (package
593 (name "xmlsec")
594 (version "1.2.20")
595 (source (origin
596 (method url-fetch)
597 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
598 name "1-" version ".tar.gz"))
599 (sha256
600 (base32
601 "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
602 (build-system gnu-build-system)
603 (propagated-inputs ; according to xmlsec1.pc
604 `(("libxml2" ,libxml2)
605 ("libxslt" ,libxslt)))
606 (inputs
607 `(("gnutls" ,gnutls)
608 ("libgcrypt" ,libgcrypt)
609 ("libltdl" ,libltdl)))
610 (home-page "http://www.libexpat.org/")
611 (synopsis "XML Security Library")
612 (description
613 "The XML Security Library is a C library based on Libxml2. It
614 supports XML security standards such as XML Signature, XML Encryption,
615 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
616 Libxml2).")
617 (license (license:x11-style "file://COPYING"
618 "See 'COPYING' in the distribution."))))
619
620 (define-public minixml
621 (package
622 (name "minixml")
623 (version "2.9")
624 (source (origin
625 (method url-fetch)
626 (uri (string-append "http://www.msweet.org/files/project3/mxml-"
627 version ".tar.gz"))
628 (sha256
629 (base32
630 "14pzhlfidj5v1qbxy7a59yn4jz9pnjrs2zwalz228jsq7ijm9vfd"))))
631 (build-system gnu-build-system)
632 (arguments
633 `(#:tests? #f)) ;no "check" target
634 (home-page "http://www.minixml.org/")
635 (synopsis "Small XML parsing library")
636 (description
637 "Mini-XML is a small C library to read and write XML files and strings in
638 UTF-8 and UTF-16 encoding.")
639 ;; LGPL 2.0+ with additional exceptions for static linking
640 (license license:lgpl2.0+)))
641
642 ;; TinyXML is an unmaintained piece of software, so the patches and build
643 ;; system massaging have no upstream potential.
644 (define-public tinyxml
645 (package
646 (name "tinyxml")
647 (version "2.6.2")
648 (source (origin
649 (method url-fetch)
650 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml_"
651 (string-join (string-split version #\.) "_")
652 ".tar.gz"))
653 (sha256
654 (base32
655 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
656 (patches (list (search-patch "tinyxml-use-stl.patch")))))
657 (build-system gnu-build-system)
658 ;; This library is missing *a lot* of the steps to make it usable, so we
659 ;; have to add them here, like every other distro must do.
660 (arguments
661 `(#:phases
662 (modify-phases %standard-phases
663 (delete 'configure)
664 (add-after 'build 'build-shared-library
665 (lambda _
666 (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic"
667 "tinyxml.cpp" "tinyxmlerror.cpp"
668 "tinyxmlparser.cpp" "tinystr.cpp"
669 "-o" "libtinyxml.so"))))
670 (replace 'check
671 (lambda _ (zero? (system "./xmltest"))))
672 (replace 'install
673 (lambda* (#:key outputs #:allow-other-keys)
674 (let* ((out (assoc-ref outputs "out"))
675 (include (string-append out "/include"))
676 (lib (string-append out "/lib"))
677 (pkgconfig (string-append out "/lib/pkgconfig"))
678 (doc (string-append out "/share/doc")))
679 ;; Install libs and headers.
680 (install-file "libtinyxml.so" lib)
681 (install-file "tinystr.h" include)
682 (install-file "tinyxml.h" include)
683 ;; Generate and install pkg-config file.
684 (mkdir-p pkgconfig)
685 ;; Software such as Kodi expect this file to be present, but
686 ;; it's not provided in the source code.
687 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
688 (lambda (port)
689 (format port "prefix=~a
690 exec_prefix=${prefix}
691 libdir=${exec_prefix}/lib
692 includedir=${prefix}/include
693
694 Name: TinyXML
695 Description: A simple, small, C++ XML parser
696 Version: ~a
697 Libs: -L${libdir} -ltinyxml
698 Cflags: -I${includedir}
699 "
700 out ,version)))
701 ;; Install docs.
702 (mkdir-p doc)
703 (copy-recursively "docs" (string-append doc "tinyxml"))
704 #t))))))
705 (synopsis "Small XML parser for C++")
706 (description "TinyXML is a small and simple XML parsing library for the
707 C++ programming langauge.")
708 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
709 (license license:zlib)))
710
711 (define-public xmlstarlet
712 (package
713 (name "xmlstarlet")
714 (version "1.6.1")
715 (source
716 (origin
717 (method url-fetch)
718 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
719 version "/xmlstarlet-" version ".tar.gz"))
720 (sha256
721 (base32
722 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
723 (build-system gnu-build-system)
724 (inputs
725 `(("libxslt" ,libxslt)
726 ("libxml2" ,libxml2)))
727 (home-page "http://xmlstar.sourceforge.net/")
728 (synopsis "Command line XML toolkit")
729 (description "XMLStarlet is a set of command line utilities which can be
730 used to transform, query, validate, and edit XML documents. XPath is used to
731 match and extract data, and elements can be added, deleted or modified using
732 XSLT and EXSLT.")
733 (license license:x11)))