Commit | Line | Data |
---|---|---|
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> |
877a6466 | 8 | ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il> |
d0414883 LC |
9 | ;;; |
10 | ;;; This file is part of GNU Guix. | |
11 | ;;; | |
12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
13 | ;;; under the terms of the GNU General Public License as published by | |
14 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
15 | ;;; your option) any later version. | |
16 | ;;; | |
17 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;;; GNU General Public License for more details. | |
21 | ;;; | |
22 | ;;; You should have received a copy of the GNU General Public License | |
23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
24 | ||
1ffa7090 | 25 | (define-module (gnu packages xml) |
f0444eaf | 26 | #:use-module (gnu packages) |
0899144f | 27 | #:use-module (gnu packages autotools) |
322cbda7 | 28 | #:use-module (gnu packages compression) |
58cc3b38 | 29 | #:use-module (gnu packages gnupg) |
f0444eaf AE |
30 | #:use-module (gnu packages perl) |
31 | #:use-module (gnu packages python) | |
a7fd7b68 | 32 | #:use-module (gnu packages tls) |
ad871fc6 | 33 | #:use-module (gnu packages web) |
b5b73a82 | 34 | #:use-module ((guix licenses) #:prefix license:) |
d0414883 LC |
35 | #:use-module (guix packages) |
36 | #:use-module (guix download) | |
6ce212b8 | 37 | #:use-module (guix build-system cmake) |
2a1e82bb | 38 | #:use-module (guix build-system gnu) |
37f9ff63 | 39 | #:use-module (guix build-system perl) |
7ce32242 | 40 | #:use-module (guix build-system python) |
37f9ff63 | 41 | #:use-module (gnu packages linux)) |
d0414883 LC |
42 | |
43 | (define-public expat | |
44 | (package | |
45 | (name "expat") | |
46 | (version "2.1.0") | |
47 | (source (origin | |
48 | (method url-fetch) | |
49 | (uri (string-append "mirror://sourceforge/expat/expat/" | |
50 | version "/expat-" version ".tar.gz")) | |
51 | (sha256 | |
52 | (base32 | |
99e29da1 MW |
53 | "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2")) |
54 | (patches (list (search-patch "expat-CVE-2015-1283.patch"))))) | |
d0414883 LC |
55 | (build-system gnu-build-system) |
56 | (home-page "http://www.libexpat.org/") | |
9e771e3b | 57 | (synopsis "Stream-oriented XML parser library written in C") |
d0414883 LC |
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))) | |
f0444eaf AE |
63 | |
64 | (define-public libxml2 | |
65 | (package | |
66 | (name "libxml2") | |
821060f3 | 67 | (version "2.9.3") |
f0444eaf AE |
68 | (source (origin |
69 | (method url-fetch) | |
70 | (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" | |
71 | version ".tar.gz")) | |
72 | (sha256 | |
73 | (base32 | |
821060f3 | 74 | "0bd17g6znn2r98gzpjppsqjg33iraky4px923j3k8kdl8qgy7sad")))) |
f0444eaf AE |
75 | (build-system gnu-build-system) |
76 | (home-page "http://www.xmlsoft.org/") | |
35b9e423 | 77 | (synopsis "C parser for XML") |
c1944c92 | 78 | (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'. |
7ce32242 | 79 | (native-inputs `(("perl" ,perl))) |
2a8d4401 LC |
80 | ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml' |
81 | ;; sub-directory of any given package. | |
74528069 LC |
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)))) | |
2a8d4401 | 88 | (search-paths native-search-paths) |
f0444eaf | 89 | (description |
7c125ce0 AK |
90 | "Libxml2 is the XML C parser and toolkit developed for the Gnome |
91 | project (but it is usable outside of the Gnome platform).") | |
f0444eaf | 92 | (license license:x11))) |
58cc3b38 | 93 | |
7ce32242 SB |
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 | ||
58cc3b38 AE |
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 | |
b4a88dc2 MW |
133 | "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz")) |
134 | (patches (list (search-patch "libxslt-CVE-2015-7995.patch"))))) | |
58cc3b38 AE |
135 | (build-system gnu-build-system) |
136 | (home-page "http://xmlsoft.org/XSLT/index.html") | |
35b9e423 | 137 | (synopsis "C library for applying XSLT stylesheets to XML documents") |
58cc3b38 AE |
138 | (inputs `(("libgcrypt" ,libgcrypt) |
139 | ("libxml2" ,libxml2) | |
95288fcc | 140 | ("python" ,python-minimal-wrapper) |
11e3f107 | 141 | ("zlib" ,zlib))) |
58cc3b38 | 142 | (description |
35b9e423 | 143 | "Libxslt is an XSLT C library developed for the GNOME project. It is |
58cc3b38 AE |
144 | based on libxml for XML parsing, tree manipulation and XPath support.") |
145 | (license license:x11))) | |
2a1e82bb LC |
146 | |
147 | (define-public perl-xml-parser | |
148 | (package | |
149 | (name "perl-xml-parser") | |
d495634b | 150 | (version "2.44") |
2a1e82bb LC |
151 | (source (origin |
152 | (method url-fetch) | |
153 | (uri (string-append | |
2b8c5f54 | 154 | "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-" |
2a1e82bb LC |
155 | version ".tar.gz")) |
156 | (sha256 | |
157 | (base32 | |
d495634b | 158 | "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s")))) |
2a1e82bb LC |
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.") | |
d495634b | 176 | (home-page "http://search.cpan.org/dist/XML-Parser"))) |
37f9ff63 | 177 | |
7339fbe2 | 178 | (define-public perl-libxml |
1385ba4f | 179 | (package |
7339fbe2 | 180 | (name "perl-libxml") |
1385ba4f AE |
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) | |
7b81406a | 191 | (propagated-inputs |
1385ba4f AE |
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 | ||
3dd6bee1 EB |
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 | ||
f7c4dc2f RW |
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 | ||
b715dbac EB |
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 | ||
18b8bbb3 EB |
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 | |
40b084a3 | 288 | 'install 'augment-path |
18b8bbb3 EB |
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 | ||
1ed6d5bc EB |
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 | ||
535dc6cf AE |
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) | |
27ef7f45 | 338 | (propagated-inputs |
535dc6cf AE |
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 | ||
a2e520af AE |
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 | ||
ad871fc6 AE |
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) | |
f7faff88 AE |
384 | (propagated-inputs |
385 | `(("perl-libwww" ,perl-libwww) | |
ad871fc6 | 386 | ("perl-libxml" ,perl-libxml) |
ad871fc6 AE |
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 | ||
649e1676 RW |
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 | ||
b494a5f1 RW |
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 | ||
c1d41b5d RW |
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 | ||
6ce212b8 RW |
470 | (define-public pugixml |
471 | (package | |
472 | (name "pugixml") | |
473 | (version "1.6") | |
474 | (source | |
475 | (origin | |
476 | (method url-fetch) | |
477 | (uri (string-append "https://github.com/zeux/pugixml/archive/v" | |
478 | version ".tar.gz")) | |
479 | (file-name (string-append name "-" version ".tar.gz")) | |
480 | (sha256 | |
481 | (base32 | |
482 | "0czbcv9aqf2rw3s9cljz2wb1f4zbhd07wnj7ykklklccl0ipfnwi")))) | |
483 | (build-system cmake-build-system) | |
484 | (arguments | |
485 | `(#:tests? #f | |
486 | #:out-of-source? #f | |
487 | #:phases (modify-phases %standard-phases | |
488 | (add-before | |
489 | 'configure 'chdir | |
490 | (lambda _ | |
491 | (chdir "scripts") | |
492 | #t))))) | |
493 | (home-page "http://pugixml.org") | |
494 | (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support") | |
495 | (description | |
496 | "pugixml is a C++ XML processing library, which consists of a DOM-like | |
497 | interface with rich traversal/modification capabilities, a fast XML parser | |
498 | which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 | |
499 | implementation for complex data-driven tree queries. Full Unicode support is | |
500 | also available, with Unicode interface variants and conversions between | |
501 | different Unicode encodings which happen automatically during | |
502 | parsing/saving.") | |
503 | (license license:expat))) | |
504 | ||
37f9ff63 AE |
505 | (define-public xmlto |
506 | (package | |
507 | (name "xmlto") | |
877a6466 | 508 | (version "0.0.28") |
37f9ff63 AE |
509 | (source |
510 | (origin | |
511 | (method url-fetch) | |
512 | (uri (string-append | |
513 | "https://fedorahosted.org/releases/x/m/xmlto/xmlto-" | |
514 | version ".tar.bz2")) | |
515 | (sha256 | |
516 | (base32 | |
877a6466 | 517 | "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i")))) |
37f9ff63 | 518 | (build-system gnu-build-system) |
ae0c1202 LC |
519 | (arguments |
520 | ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'. | |
521 | '(#:configure-flags (list (string-append "GETOPT=" | |
522 | (assoc-ref %build-inputs | |
523 | "util-linux") | |
524 | "/bin/getopt")))) | |
37f9ff63 | 525 | (inputs |
ae0c1202 LC |
526 | `(("util-linux" ,util-linux) ; for 'getopt' |
527 | ("libxml2" ,libxml2) ; for 'xmllint' | |
528 | ("libxslt" ,libxslt))) ; for 'xsltproc' | |
37f9ff63 AE |
529 | (home-page "http://cyberelk.net/tim/software/xmlto/") |
530 | (synopsis "Front-end to an XSL toolchain") | |
531 | (description | |
532 | "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate | |
533 | stylesheet for the conversion you want and applies it using an external | |
534 | XSL-T processor. It also performs any necessary post-processing.") | |
535 | (license license:gpl2+))) | |
0899144f AE |
536 | |
537 | (define-public xmlsec | |
538 | (package | |
539 | (name "xmlsec") | |
540 | (version "1.2.20") | |
541 | (source (origin | |
542 | (method url-fetch) | |
543 | (uri (string-append "https://www.aleksey.com/xmlsec/download/" | |
544 | name "1-" version ".tar.gz")) | |
545 | (sha256 | |
546 | (base32 | |
547 | "01bkbv2y3x8d1sf4dcln1x3y2jyj391s3208d9a2ndhglly5j89j")))) | |
548 | (build-system gnu-build-system) | |
549 | (propagated-inputs ; according to xmlsec1.pc | |
550 | `(("libxml2" ,libxml2) | |
551 | ("libxslt" ,libxslt))) | |
552 | (inputs | |
553 | `(("gnutls" ,gnutls) | |
554 | ("libgcrypt" ,libgcrypt) | |
555 | ("libltdl" ,libltdl))) | |
556 | (home-page "http://www.libexpat.org/") | |
557 | (synopsis "XML Security Library") | |
558 | (description | |
559 | "The XML Security Library is a C library based on Libxml2. It | |
560 | supports XML security standards such as XML Signature, XML Encryption, | |
561 | Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of | |
562 | Libxml2).") | |
563 | (license (license:x11-style "file://COPYING" | |
564 | "See 'COPYING' in the distribution.")))) | |
96f8d991 RW |
565 | |
566 | (define-public minixml | |
567 | (package | |
568 | (name "minixml") | |
569 | (version "2.9") | |
570 | (source (origin | |
571 | (method url-fetch) | |
572 | (uri (string-append "http://www.msweet.org/files/project3/mxml-" | |
573 | version ".tar.gz")) | |
574 | (sha256 | |
575 | (base32 | |
576 | "14pzhlfidj5v1qbxy7a59yn4jz9pnjrs2zwalz228jsq7ijm9vfd")))) | |
577 | (build-system gnu-build-system) | |
578 | (arguments | |
579 | `(#:tests? #f)) ;no "check" target | |
580 | (home-page "http://www.minixml.org/") | |
581 | (synopsis "Small XML parsing library") | |
582 | (description | |
583 | "Mini-XML is a small C library to read and write XML files and strings in | |
584 | UTF-8 and UTF-16 encoding.") | |
585 | ;; LGPL 2.0+ with additional exceptions for static linking | |
586 | (license license:lgpl2.0+))) | |
33ae9107 DT |
587 | |
588 | ;; TinyXML is an unmaintained piece of software, so the patches and build | |
589 | ;; system massaging have no upstream potential. | |
590 | (define-public tinyxml | |
591 | (package | |
592 | (name "tinyxml") | |
593 | (version "2.6.2") | |
594 | (source (origin | |
595 | (method url-fetch) | |
596 | (uri (string-append "mirror://sourceforge/tinyxml/tinyxml_" | |
597 | (string-join (string-split version #\.) "_") | |
598 | ".tar.gz")) | |
599 | (sha256 | |
600 | (base32 | |
601 | "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m")) | |
602 | (patches (list (search-patch "tinyxml-use-stl.patch"))))) | |
603 | (build-system gnu-build-system) | |
604 | ;; This library is missing *a lot* of the steps to make it usable, so we | |
605 | ;; have to add them here, like every other distro must do. | |
606 | (arguments | |
607 | `(#:phases | |
608 | (modify-phases %standard-phases | |
609 | (delete 'configure) | |
610 | (add-after 'build 'build-shared-library | |
611 | (lambda _ | |
612 | (zero? (system* "g++" "-Wall" "-O2" "-shared" "-fpic" | |
613 | "tinyxml.cpp" "tinyxmlerror.cpp" | |
614 | "tinyxmlparser.cpp" "tinystr.cpp" | |
615 | "-o" "libtinyxml.so")))) | |
616 | (replace 'check | |
617 | (lambda _ (zero? (system "./xmltest")))) | |
618 | (replace 'install | |
619 | (lambda* (#:key outputs #:allow-other-keys) | |
620 | (let* ((out (assoc-ref outputs "out")) | |
621 | (include (string-append out "/include")) | |
622 | (lib (string-append out "/lib")) | |
623 | (pkgconfig (string-append out "/lib/pkgconfig")) | |
624 | (doc (string-append out "/share/doc"))) | |
625 | ;; Install libs and headers. | |
626 | (install-file "libtinyxml.so" lib) | |
627 | (install-file "tinystr.h" include) | |
628 | (install-file "tinyxml.h" include) | |
629 | ;; Generate and install pkg-config file. | |
630 | (mkdir-p pkgconfig) | |
631 | ;; Software such as Kodi expect this file to be present, but | |
632 | ;; it's not provided in the source code. | |
633 | (call-with-output-file (string-append pkgconfig "/tinyxml.pc") | |
634 | (lambda (port) | |
635 | (format port "prefix=~a | |
636 | exec_prefix=${prefix} | |
637 | libdir=${exec_prefix}/lib | |
638 | includedir=${prefix}/include | |
639 | ||
640 | Name: TinyXML | |
641 | Description: A simple, small, C++ XML parser | |
642 | Version: ~a | |
643 | Libs: -L${libdir} -ltinyxml | |
644 | Cflags: -I${includedir} | |
645 | " | |
646 | out ,version))) | |
647 | ;; Install docs. | |
648 | (mkdir-p doc) | |
649 | (copy-recursively "docs" (string-append doc "tinyxml")) | |
650 | #t)))))) | |
651 | (synopsis "Small XML parser for C++") | |
652 | (description "TinyXML is a small and simple XML parsing library for the | |
653 | C++ programming langauge.") | |
654 | (home-page "http://www.grinninglizard.com/tinyxml/index.html") | |
655 | (license license:zlib))) |