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