gnu: Add Term-ProgressBar-Simple.
[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>
f0444eaf 3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
d0414883
LC
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
1ffa7090 20(define-module (gnu packages xml)
f0444eaf 21 #:use-module (gnu packages)
322cbda7 22 #:use-module (gnu packages compression)
58cc3b38 23 #:use-module (gnu packages gnupg)
f0444eaf
AE
24 #:use-module (gnu packages perl)
25 #:use-module (gnu packages python)
ad871fc6 26 #:use-module (gnu packages web)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
d0414883
LC
28 #:use-module (guix packages)
29 #:use-module (guix download)
2a1e82bb 30 #:use-module (guix build-system gnu)
37f9ff63
AE
31 #:use-module (guix build-system perl)
32 #:use-module (gnu packages linux))
d0414883
LC
33
34(define-public expat
35 (package
36 (name "expat")
37 (version "2.1.0")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "mirror://sourceforge/expat/expat/"
41 version "/expat-" version ".tar.gz"))
42 (sha256
43 (base32
44 "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))))
45 (build-system gnu-build-system)
46 (home-page "http://www.libexpat.org/")
9e771e3b 47 (synopsis "Stream-oriented XML parser library written in C")
d0414883
LC
48 (description
49 "Expat is an XML parser library written in C. It is a
50stream-oriented parser in which an application registers handlers for
51things the parser might find in the XML document (like start tags).")
52 (license license:expat)))
f0444eaf
AE
53
54(define-public libxml2
55 (package
56 (name "libxml2")
57 (version "2.9.0")
58 (source (origin
59 (method url-fetch)
60 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
61 version ".tar.gz"))
62 (sha256
63 (base32
64 "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd"))))
65 (build-system gnu-build-system)
66 (home-page "http://www.xmlsoft.org/")
35b9e423 67 (synopsis "C parser for XML")
c1944c92 68 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
c4c4cc05
JD
69 (native-inputs `(("perl" ,perl)
70 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
2a8d4401
LC
71
72
73 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
74 ;; sub-directory of any given package.
74528069
LC
75 (native-search-paths (list (search-path-specification
76 (variable "XML_CATALOG_FILES")
77 (separator " ")
78 (files '("xml"))
79 (file-pattern "^catalog\\.xml$")
80 (file-type 'regular))))
2a8d4401
LC
81 (search-paths native-search-paths)
82
322cbda7
AE
83 (arguments
84 `(#:phases
85 (alist-replace
86 'install
87 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
88 (let ((install (assoc-ref %standard-phases 'install))
5839958a
JD
89 (glibc (assoc-ref inputs ,(if (%current-target-system)
90 "cross-libc" "libc")))
322cbda7
AE
91 (out (assoc-ref outputs "out")))
92 (apply install args)
93 (chdir "python")
5839958a
JD
94 (substitute* "setup.py"
95 (("/opt/include")
96 (string-append glibc "/include")))
97 (system* "python" "setup.py" "install"
98 (string-append "--prefix=" out))))
322cbda7 99 %standard-phases)))
f0444eaf
AE
100 (description
101 "Libxml2 is the XML C parser and toolkit developed for the Gnome project
102(but it is usable outside of the Gnome platform).")
103 (license license:x11)))
58cc3b38
AE
104
105(define-public libxslt
106 (package
107 (name "libxslt")
108 (version "1.1.28")
109 (source (origin
110 (method url-fetch)
111 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
112 version ".tar.gz"))
113 (sha256
114 (base32
115 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
116 (build-system gnu-build-system)
117 (home-page "http://xmlsoft.org/XSLT/index.html")
35b9e423 118 (synopsis "C library for applying XSLT stylesheets to XML documents")
58cc3b38
AE
119 (inputs `(("libgcrypt" ,libgcrypt)
120 ("libxml2" ,libxml2)
ee3e314b 121 ("python" ,python-wrapper)
11e3f107 122 ("zlib" ,zlib)))
58cc3b38 123 (description
35b9e423 124 "Libxslt is an XSLT C library developed for the GNOME project. It is
58cc3b38
AE
125based on libxml for XML parsing, tree manipulation and XPath support.")
126 (license license:x11)))
2a1e82bb
LC
127
128(define-public perl-xml-parser
129 (package
130 (name "perl-xml-parser")
131 (version "2.41")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append
2b8c5f54 135 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
2a1e82bb
LC
136 version ".tar.gz"))
137 (sha256
138 (base32
139 "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
140 (build-system perl-build-system)
141 (arguments `(#:make-maker-flags
142 (let ((expat (assoc-ref %build-inputs "expat")))
143 (list (string-append "EXPATLIBPATH=" expat "/lib")
144 (string-append "EXPATINCPATH=" expat "/include")))))
145 (inputs `(("expat" ,expat)))
146 (license (package-license perl))
147 (synopsis "Perl bindings to the Expat XML parsing library")
148 (description
149 "This module provides ways to parse XML documents. It is built on top of
150XML::Parser::Expat, which is a lower level interface to James Clark's expat
151library. Each call to one of the parsing methods creates a new instance of
152XML::Parser::Expat which is then used to parse the document. Expat options
153may be provided when the XML::Parser object is created. These options are
154then passed on to the Expat object on each parse call. They can also be given
155as extra arguments to the parse methods, in which case they override options
156given at XML::Parser creation time.")
157 (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))
37f9ff63 158
7339fbe2 159(define-public perl-libxml
1385ba4f 160 (package
7339fbe2 161 (name "perl-libxml")
1385ba4f
AE
162 (version "0.08")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append
166 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
167 version ".tar.gz"))
168 (sha256
169 (base32
170 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
171 (build-system perl-build-system)
7b81406a 172 (propagated-inputs
1385ba4f
AE
173 `(("perl-xml-parser" ,perl-xml-parser)))
174 (license (package-license perl))
175 (synopsis "Perl SAX parser using XML::Parser")
176 (description
177 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
178module.")
179 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
180
535dc6cf
AE
181(define-public perl-xml-simple
182 (package
183 (name "perl-xml-simple")
184 (version "2.20")
185 (source (origin
186 (method url-fetch)
187 (uri (string-append
188 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
189 version ".tar.gz"))
190 (sha256
191 (base32
192 "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
193 (build-system perl-build-system)
27ef7f45 194 (propagated-inputs
535dc6cf
AE
195 `(("perl-xml-parser" ,perl-xml-parser)))
196 (license (package-license perl))
197 (synopsis "Perl module for easy reading/writing of XML files")
198 (description
199 "The XML::Simple module provides a simple API layer on top of an
200underlying XML parsing module (either XML::Parser or one of the SAX2
201parser modules).")
202 (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
203
a2e520af
AE
204(define-public perl-xml-regexp
205 (package
206 (name "perl-xml-regexp")
207 (version "0.04")
208 (source (origin
209 (method url-fetch)
210 (uri (string-append
211 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
212 version ".tar.gz"))
213 (sha256
214 (base32
215 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
216 (build-system perl-build-system)
217 (inputs
218 `(("perl-xml-parser" ,perl-xml-parser)))
219 (license (package-license perl))
220 (synopsis "Perl regular expressions for XML tokens")
221 (description
222 "XML::RegExp contains regular expressions for the following XML tokens:
223BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
224EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
225 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
226
ad871fc6
AE
227(define-public perl-xml-dom
228 (package
229 (name "perl-xml-dom")
230 (version "1.44")
231 (source (origin
232 (method url-fetch)
233 (uri (string-append
234 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
235 version ".tar.gz"))
236 (sha256
237 (base32
238 "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
239 (build-system perl-build-system)
f7faff88
AE
240 (propagated-inputs
241 `(("perl-libwww" ,perl-libwww)
ad871fc6 242 ("perl-libxml" ,perl-libxml)
ad871fc6
AE
243 ("perl-xml-regexp" ,perl-xml-regexp)))
244 (license (package-license perl))
245 (synopsis
246 "Perl module for building DOM Level 1 compliant document structures")
247 (description
248 "This module extends the XML::Parser module by Clark Cooper. The
249XML::Parser module is built on top of XML::Parser::Expat, which is a lower
250level interface to James Clark's expat library. XML::DOM::Parser is derived
251from XML::Parser. It parses XML strings or files and builds a data structure
252that conforms to the API of the Document Object Model.")
253 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
254
37f9ff63
AE
255(define-public xmlto
256 (package
257 (name "xmlto")
258 (version "0.0.25")
259 (source
260 (origin
261 (method url-fetch)
262 (uri (string-append
263 "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
264 version ".tar.bz2"))
265 (sha256
266 (base32
267 "0dp5nxq491gymq806za0dk4hngfmq65ysrqbn0ypajqbbl6vf71n"))))
268 (build-system gnu-build-system)
ae0c1202
LC
269 (arguments
270 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
271 '(#:configure-flags (list (string-append "GETOPT="
272 (assoc-ref %build-inputs
273 "util-linux")
274 "/bin/getopt"))))
37f9ff63 275 (inputs
ae0c1202
LC
276 `(("util-linux" ,util-linux) ; for 'getopt'
277 ("libxml2" ,libxml2) ; for 'xmllint'
278 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
279 (home-page "http://cyberelk.net/tim/software/xmlto/")
280 (synopsis "Front-end to an XSL toolchain")
281 (description
282 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
283stylesheet for the conversion you want and applies it using an external
284XSL-T processor. It also performs any necessary post-processing.")
285 (license license:gpl2+)))