gnu: Rename module gnutls to tls.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
CommitLineData
d0414883 1;;; GNU Guix --- Functional package management for GNU
74528069 2;;; Copyright © 2013, 2014, 2015 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>
6ce212b8 6;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
d0414883
LC
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
1ffa7090 23(define-module (gnu packages xml)
f0444eaf 24 #:use-module (gnu packages)
0899144f 25 #:use-module (gnu packages autotools)
322cbda7 26 #:use-module (gnu packages compression)
58cc3b38 27 #:use-module (gnu packages gnupg)
f0444eaf
AE
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages python)
a7fd7b68 30 #:use-module (gnu packages tls)
ad871fc6 31 #:use-module (gnu packages web)
b5b73a82 32 #:use-module ((guix licenses) #:prefix license:)
d0414883
LC
33 #:use-module (guix packages)
34 #:use-module (guix download)
6ce212b8 35 #:use-module (guix build-system cmake)
2a1e82bb 36 #:use-module (guix build-system gnu)
37f9ff63 37 #:use-module (guix build-system perl)
7ce32242 38 #:use-module (guix build-system python)
37f9ff63 39 #:use-module (gnu packages linux))
d0414883
LC
40
41(define-public expat
42 (package
43 (name "expat")
44 (version "2.1.0")
45 (source (origin
46 (method url-fetch)
47 (uri (string-append "mirror://sourceforge/expat/expat/"
48 version "/expat-" version ".tar.gz"))
49 (sha256
50 (base32
51 "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))))
52 (build-system gnu-build-system)
53 (home-page "http://www.libexpat.org/")
9e771e3b 54 (synopsis "Stream-oriented XML parser library written in C")
d0414883
LC
55 (description
56 "Expat is an XML parser library written in C. It is a
57stream-oriented parser in which an application registers handlers for
58things the parser might find in the XML document (like start tags).")
59 (license license:expat)))
f0444eaf
AE
60
61(define-public libxml2
62 (package
63 (name "libxml2")
10ac0f9f 64 (version "2.9.2")
f0444eaf
AE
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
68 version ".tar.gz"))
69 (sha256
70 (base32
10ac0f9f 71 "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i"))))
f0444eaf
AE
72 (build-system gnu-build-system)
73 (home-page "http://www.xmlsoft.org/")
35b9e423 74 (synopsis "C parser for XML")
c1944c92 75 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
7ce32242 76 (native-inputs `(("perl" ,perl)))
2a8d4401
LC
77 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
78 ;; sub-directory of any given package.
74528069
LC
79 (native-search-paths (list (search-path-specification
80 (variable "XML_CATALOG_FILES")
81 (separator " ")
82 (files '("xml"))
83 (file-pattern "^catalog\\.xml$")
84 (file-type 'regular))))
2a8d4401 85 (search-paths native-search-paths)
f0444eaf
AE
86 (description
87 "Libxml2 is the XML C parser and toolkit developed for the Gnome project
88(but it is usable outside of the Gnome platform).")
89 (license license:x11)))
58cc3b38 90
7ce32242
SB
91(define-public python-libxml2
92 (package (inherit libxml2)
93 (name "python-libxml2")
94 (build-system python-build-system)
95 (arguments
96 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
97 #:tests? #f
98 #:phases
99 (modify-phases %standard-phases
100 (add-before
101 'build 'configure
102 (lambda* (#:key inputs #:allow-other-keys)
103 (chdir "python")
104 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
105 "cross-libc" "libc")))
106 (libxml2 (assoc-ref inputs "libxml2")))
107 (substitute* "setup.py"
108 ;; For 'libxml2/libxml/tree.h'.
109 (("ROOT = r'/usr'")
110 (format #f "ROOT = r'~a'" libxml2))
111 ;; For 'iconv.h'.
112 (("/opt/include")
113 (string-append glibc "/include")))))))))
114 (inputs `(("libxml2" ,libxml2)))
115 (synopsis "Python bindings for the libxml2 library")))
116
117(define-public python2-libxml2
118 (package-with-python2 python-libxml2))
119
58cc3b38
AE
120(define-public libxslt
121 (package
122 (name "libxslt")
123 (version "1.1.28")
124 (source (origin
125 (method url-fetch)
126 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
127 version ".tar.gz"))
128 (sha256
129 (base32
130 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
131 (build-system gnu-build-system)
132 (home-page "http://xmlsoft.org/XSLT/index.html")
35b9e423 133 (synopsis "C library for applying XSLT stylesheets to XML documents")
58cc3b38
AE
134 (inputs `(("libgcrypt" ,libgcrypt)
135 ("libxml2" ,libxml2)
ee3e314b 136 ("python" ,python-wrapper)
11e3f107 137 ("zlib" ,zlib)))
58cc3b38 138 (description
35b9e423 139 "Libxslt is an XSLT C library developed for the GNOME project. It is
58cc3b38
AE
140based on libxml for XML parsing, tree manipulation and XPath support.")
141 (license license:x11)))
2a1e82bb
LC
142
143(define-public perl-xml-parser
144 (package
145 (name "perl-xml-parser")
146 (version "2.41")
147 (source (origin
148 (method url-fetch)
149 (uri (string-append
2b8c5f54 150 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
2a1e82bb
LC
151 version ".tar.gz"))
152 (sha256
153 (base32
154 "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
155 (build-system perl-build-system)
156 (arguments `(#:make-maker-flags
157 (let ((expat (assoc-ref %build-inputs "expat")))
158 (list (string-append "EXPATLIBPATH=" expat "/lib")
159 (string-append "EXPATINCPATH=" expat "/include")))))
160 (inputs `(("expat" ,expat)))
161 (license (package-license perl))
162 (synopsis "Perl bindings to the Expat XML parsing library")
163 (description
164 "This module provides ways to parse XML documents. It is built on top of
165XML::Parser::Expat, which is a lower level interface to James Clark's expat
166library. Each call to one of the parsing methods creates a new instance of
167XML::Parser::Expat which is then used to parse the document. Expat options
168may be provided when the XML::Parser object is created. These options are
169then passed on to the Expat object on each parse call. They can also be given
170as extra arguments to the parse methods, in which case they override options
171given at XML::Parser creation time.")
172 (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))
37f9ff63 173
7339fbe2 174(define-public perl-libxml
1385ba4f 175 (package
7339fbe2 176 (name "perl-libxml")
1385ba4f
AE
177 (version "0.08")
178 (source (origin
179 (method url-fetch)
180 (uri (string-append
181 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
182 version ".tar.gz"))
183 (sha256
184 (base32
185 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
186 (build-system perl-build-system)
7b81406a 187 (propagated-inputs
1385ba4f
AE
188 `(("perl-xml-parser" ,perl-xml-parser)))
189 (license (package-license perl))
190 (synopsis "Perl SAX parser using XML::Parser")
191 (description
192 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
193module.")
194 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
195
3dd6bee1
EB
196(define-public perl-xml-libxml
197 (package
198 (name "perl-xml-libxml")
199 (version "2.0118")
200 (source
201 (origin
202 (method url-fetch)
203 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
204 "XML-LibXML-" version ".tar.gz"))
205 (sha256
206 (base32
207 "170c8dbk4p6jw9is0cria73021yp3hpmhb19p9j0zg2yxwkawr6c"))))
208 (build-system perl-build-system)
209 (propagated-inputs
210 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
211 ("perl-xml-sax" ,perl-xml-sax)))
212 (inputs
213 `(("libxml2" ,libxml2)))
214 (home-page "http://search.cpan.org/dist/XML-LibXML")
215 (synopsis "Perl interface to libxml2")
216 (description "This module implements a Perl interface to the libxml2
217library which provides interfaces for parsing and manipulating XML files. This
218module allows Perl programmers to make use of the highly capable validating
219XML parser and the high performance DOM implementation.")
220 (license (package-license perl))))
221
b715dbac
EB
222(define-public perl-xml-namespacesupport
223 (package
224 (name "perl-xml-namespacesupport")
225 (version "1.11")
226 (source
227 (origin
228 (method url-fetch)
229 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
230 "XML-NamespaceSupport-" version ".tar.gz"))
231 (sha256
232 (base32
233 "1sklgcldl3w6gn706vx1cgz6pm4y5lfgsjxnfqyk20pilgq530bd"))))
234 (build-system perl-build-system)
235 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
236 (synopsis "XML namespace support class")
237 (description "This module offers a simple to process namespaced XML
238names (unames) from within any application that may need them. It also helps
239maintain a prefix to namespace URI map, and provides a number of basic
240checks.")
241 (license (package-license perl))))
242
18b8bbb3
EB
243(define-public perl-xml-sax
244 (package
245 (name "perl-xml-sax")
246 (version "0.99")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
251 "XML-SAX-" version ".tar.gz"))
252 (sha256
253 (base32
254 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
255 (build-system perl-build-system)
256 (propagated-inputs
257 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
258 ("perl-xml-sax-base" ,perl-xml-sax-base)))
259 (arguments
260 `(#:phases (modify-phases %standard-phases
261 (add-before
40b084a3 262 'install 'augment-path
18b8bbb3
EB
263 ;; The install target tries to load the newly-installed
264 ;; XML::SAX module, but can't find it, so we need to tell
265 ;; perl where to look.
266 (lambda* (#:key outputs #:allow-other-keys)
267 (setenv "PERL5LIB"
268 (string-append (getenv "PERL5LIB") ":"
269 (assoc-ref outputs "out")
270 "/lib/perl5/site_perl")))))))
271 (home-page "http://search.cpan.org/dist/XML-SAX")
272 (synopsis "Perl API for XML")
273 (description "XML::SAX consists of several framework classes for using and
274building Perl SAX2 XML parsers, filters, and drivers.")
275 (license (package-license perl))))
276
1ed6d5bc
EB
277(define-public perl-xml-sax-base
278 (package
279 (name "perl-xml-sax-base")
280 (version "1.08")
281 (source
282 (origin
283 (method url-fetch)
284 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
285 "XML-SAX-Base-" version ".tar.gz"))
286 (sha256
287 (base32
288 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
289 (build-system perl-build-system)
290 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
291 (synopsis "Base class for SAX Drivers and Filters")
292 (description "This module has a very simple task - to be a base class for
293PerlSAX drivers and filters. It's default behaviour is to pass the input
294directly to the output unchanged. It can be useful to use this module as a
295base class so you don't have to, for example, implement the characters()
296callback.")
297 (license (package-license perl))))
298
535dc6cf
AE
299(define-public perl-xml-simple
300 (package
301 (name "perl-xml-simple")
302 (version "2.20")
303 (source (origin
304 (method url-fetch)
305 (uri (string-append
306 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
307 version ".tar.gz"))
308 (sha256
309 (base32
310 "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
311 (build-system perl-build-system)
27ef7f45 312 (propagated-inputs
535dc6cf
AE
313 `(("perl-xml-parser" ,perl-xml-parser)))
314 (license (package-license perl))
315 (synopsis "Perl module for easy reading/writing of XML files")
316 (description
317 "The XML::Simple module provides a simple API layer on top of an
318underlying XML parsing module (either XML::Parser or one of the SAX2
319parser modules).")
320 (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
321
a2e520af
AE
322(define-public perl-xml-regexp
323 (package
324 (name "perl-xml-regexp")
325 (version "0.04")
326 (source (origin
327 (method url-fetch)
328 (uri (string-append
329 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
330 version ".tar.gz"))
331 (sha256
332 (base32
333 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
334 (build-system perl-build-system)
335 (inputs
336 `(("perl-xml-parser" ,perl-xml-parser)))
337 (license (package-license perl))
338 (synopsis "Perl regular expressions for XML tokens")
339 (description
340 "XML::RegExp contains regular expressions for the following XML tokens:
341BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
342EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
343 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
344
ad871fc6
AE
345(define-public perl-xml-dom
346 (package
347 (name "perl-xml-dom")
348 (version "1.44")
349 (source (origin
350 (method url-fetch)
351 (uri (string-append
352 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
353 version ".tar.gz"))
354 (sha256
355 (base32
356 "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
357 (build-system perl-build-system)
f7faff88
AE
358 (propagated-inputs
359 `(("perl-libwww" ,perl-libwww)
ad871fc6 360 ("perl-libxml" ,perl-libxml)
ad871fc6
AE
361 ("perl-xml-regexp" ,perl-xml-regexp)))
362 (license (package-license perl))
363 (synopsis
364 "Perl module for building DOM Level 1 compliant document structures")
365 (description
366 "This module extends the XML::Parser module by Clark Cooper. The
367XML::Parser module is built on top of XML::Parser::Expat, which is a lower
368level interface to James Clark's expat library. XML::DOM::Parser is derived
369from XML::Parser. It parses XML strings or files and builds a data structure
370that conforms to the API of the Document Object Model.")
371 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
372
6ce212b8
RW
373(define-public pugixml
374 (package
375 (name "pugixml")
376 (version "1.6")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (string-append "https://github.com/zeux/pugixml/archive/v"
381 version ".tar.gz"))
382 (file-name (string-append name "-" version ".tar.gz"))
383 (sha256
384 (base32
385 "0czbcv9aqf2rw3s9cljz2wb1f4zbhd07wnj7ykklklccl0ipfnwi"))))
386 (build-system cmake-build-system)
387 (arguments
388 `(#:tests? #f
389 #:out-of-source? #f
390 #:phases (modify-phases %standard-phases
391 (add-before
392 'configure 'chdir
393 (lambda _
394 (chdir "scripts")
395 #t)))))
396 (home-page "http://pugixml.org")
397 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
398 (description
399 "pugixml is a C++ XML processing library, which consists of a DOM-like
400interface with rich traversal/modification capabilities, a fast XML parser
401which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
402implementation for complex data-driven tree queries. Full Unicode support is
403also available, with Unicode interface variants and conversions between
404different Unicode encodings which happen automatically during
405parsing/saving.")
406 (license license:expat)))
407
37f9ff63
AE
408(define-public xmlto
409 (package
410 (name "xmlto")
411 (version "0.0.25")
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append
416 "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
417 version ".tar.bz2"))
418 (sha256
419 (base32
420 "0dp5nxq491gymq806za0dk4hngfmq65ysrqbn0ypajqbbl6vf71n"))))
421 (build-system gnu-build-system)
ae0c1202
LC
422 (arguments
423 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
424 '(#:configure-flags (list (string-append "GETOPT="
425 (assoc-ref %build-inputs
426 "util-linux")
427 "/bin/getopt"))))
37f9ff63 428 (inputs
ae0c1202
LC
429 `(("util-linux" ,util-linux) ; for 'getopt'
430 ("libxml2" ,libxml2) ; for 'xmllint'
431 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
432 (home-page "http://cyberelk.net/tim/software/xmlto/")
433 (synopsis "Front-end to an XSL toolchain")
434 (description
435 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
436stylesheet for the conversion you want and applies it using an external
437XSL-T processor. It also performs any necessary post-processing.")
438 (license license:gpl2+)))
0899144f
AE
439
440(define-public xmlsec
441 (package
442 (name "xmlsec")
443 (version "1.2.20")
444 (source (origin
445 (method url-fetch)
446 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
447 name "1-" version ".tar.gz"))
448 (sha256
449 (base32
450 "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j"))))
451 (build-system gnu-build-system)
452 (propagated-inputs ; according to xmlsec1.pc
453 `(("libxml2" ,libxml2)
454 ("libxslt" ,libxslt)))
455 (inputs
456 `(("gnutls" ,gnutls)
457 ("libgcrypt" ,libgcrypt)
458 ("libltdl" ,libltdl)))
459 (home-page "http://www.libexpat.org/")
460 (synopsis "XML Security Library")
461 (description
462 "The XML Security Library is a C library based on Libxml2. It
463supports XML security standards such as XML Signature, XML Encryption,
464Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
465Libxml2).")
466 (license (license:x11-style "file://COPYING"
467 "See 'COPYING' in the distribution."))))