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