gnu: Some cleanup based on lint checkers.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
CommitLineData
d0414883 1;;; GNU Guix --- Functional package management for GNU
9e771e3b 2;;; Copyright © 2013, 2014 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")
c4c4cc05
JD
68 (inputs `(("zlib" ,zlib)))
69 (native-inputs `(("perl" ,perl)
70 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
322cbda7
AE
71 (arguments
72 `(#:phases
73 (alist-replace
74 'install
75 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
76 (let ((install (assoc-ref %standard-phases 'install))
5839958a
JD
77 (glibc (assoc-ref inputs ,(if (%current-target-system)
78 "cross-libc" "libc")))
322cbda7
AE
79 (out (assoc-ref outputs "out")))
80 (apply install args)
81 (chdir "python")
5839958a
JD
82 (substitute* "setup.py"
83 (("/opt/include")
84 (string-append glibc "/include")))
85 (system* "python" "setup.py" "install"
86 (string-append "--prefix=" out))))
322cbda7 87 %standard-phases)))
f0444eaf
AE
88 (description
89 "Libxml2 is the XML C parser and toolkit developed for the Gnome project
90(but it is usable outside of the Gnome platform).")
91 (license license:x11)))
58cc3b38
AE
92
93(define-public libxslt
94 (package
95 (name "libxslt")
96 (version "1.1.28")
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
100 version ".tar.gz"))
101 (sha256
102 (base32
103 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
104 (build-system gnu-build-system)
105 (home-page "http://xmlsoft.org/XSLT/index.html")
35b9e423 106 (synopsis "C library for applying XSLT stylesheets to XML documents")
58cc3b38
AE
107 (inputs `(("libgcrypt" ,libgcrypt)
108 ("libxml2" ,libxml2)
ee3e314b 109 ("python" ,python-wrapper)
11e3f107 110 ("zlib" ,zlib)))
58cc3b38 111 (description
35b9e423 112 "Libxslt is an XSLT C library developed for the GNOME project. It is
58cc3b38
AE
113based on libxml for XML parsing, tree manipulation and XPath support.")
114 (license license:x11)))
2a1e82bb
LC
115
116(define-public perl-xml-parser
117 (package
118 (name "perl-xml-parser")
119 (version "2.41")
120 (source (origin
121 (method url-fetch)
122 (uri (string-append
2b8c5f54 123 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
2a1e82bb
LC
124 version ".tar.gz"))
125 (sha256
126 (base32
127 "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
128 (build-system perl-build-system)
129 (arguments `(#:make-maker-flags
130 (let ((expat (assoc-ref %build-inputs "expat")))
131 (list (string-append "EXPATLIBPATH=" expat "/lib")
132 (string-append "EXPATINCPATH=" expat "/include")))))
133 (inputs `(("expat" ,expat)))
134 (license (package-license perl))
135 (synopsis "Perl bindings to the Expat XML parsing library")
136 (description
137 "This module provides ways to parse XML documents. It is built on top of
138XML::Parser::Expat, which is a lower level interface to James Clark's expat
139library. Each call to one of the parsing methods creates a new instance of
140XML::Parser::Expat which is then used to parse the document. Expat options
141may be provided when the XML::Parser object is created. These options are
142then passed on to the Expat object on each parse call. They can also be given
143as extra arguments to the parse methods, in which case they override options
144given at XML::Parser creation time.")
145 (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))
37f9ff63 146
7339fbe2 147(define-public perl-libxml
1385ba4f 148 (package
7339fbe2 149 (name "perl-libxml")
1385ba4f
AE
150 (version "0.08")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append
154 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
155 version ".tar.gz"))
156 (sha256
157 (base32
158 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
159 (build-system perl-build-system)
7b81406a 160 (propagated-inputs
1385ba4f
AE
161 `(("perl-xml-parser" ,perl-xml-parser)))
162 (license (package-license perl))
163 (synopsis "Perl SAX parser using XML::Parser")
164 (description
165 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
166module.")
167 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
168
535dc6cf
AE
169(define-public perl-xml-simple
170 (package
171 (name "perl-xml-simple")
172 (version "2.20")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append
176 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
177 version ".tar.gz"))
178 (sha256
179 (base32
180 "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
181 (build-system perl-build-system)
182 (inputs
183 `(("perl-xml-parser" ,perl-xml-parser)))
184 (license (package-license perl))
185 (synopsis "Perl module for easy reading/writing of XML files")
186 (description
187 "The XML::Simple module provides a simple API layer on top of an
188underlying XML parsing module (either XML::Parser or one of the SAX2
189parser modules).")
190 (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
191
a2e520af
AE
192(define-public perl-xml-regexp
193 (package
194 (name "perl-xml-regexp")
195 (version "0.04")
196 (source (origin
197 (method url-fetch)
198 (uri (string-append
199 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
200 version ".tar.gz"))
201 (sha256
202 (base32
203 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
204 (build-system perl-build-system)
205 (inputs
206 `(("perl-xml-parser" ,perl-xml-parser)))
207 (license (package-license perl))
208 (synopsis "Perl regular expressions for XML tokens")
209 (description
210 "XML::RegExp contains regular expressions for the following XML tokens:
211BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
212EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
213 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
214
ad871fc6
AE
215(define-public perl-xml-dom
216 (package
217 (name "perl-xml-dom")
218 (version "1.44")
219 (source (origin
220 (method url-fetch)
221 (uri (string-append
222 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
223 version ".tar.gz"))
224 (sha256
225 (base32
226 "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
227 (build-system perl-build-system)
f7faff88
AE
228 (propagated-inputs
229 `(("perl-libwww" ,perl-libwww)
ad871fc6 230 ("perl-libxml" ,perl-libxml)
ad871fc6
AE
231 ("perl-xml-regexp" ,perl-xml-regexp)))
232 (license (package-license perl))
233 (synopsis
234 "Perl module for building DOM Level 1 compliant document structures")
235 (description
236 "This module extends the XML::Parser module by Clark Cooper. The
237XML::Parser module is built on top of XML::Parser::Expat, which is a lower
238level interface to James Clark's expat library. XML::DOM::Parser is derived
239from XML::Parser. It parses XML strings or files and builds a data structure
240that conforms to the API of the Document Object Model.")
241 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
242
37f9ff63
AE
243(define-public xmlto
244 (package
245 (name "xmlto")
246 (version "0.0.25")
247 (source
248 (origin
249 (method url-fetch)
250 (uri (string-append
251 "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
252 version ".tar.bz2"))
253 (sha256
254 (base32
255 "0dp5nxq491gymq806za0dk4hngfmq65ysrqbn0ypajqbbl6vf71n"))))
256 (build-system gnu-build-system)
ae0c1202
LC
257 (arguments
258 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
259 '(#:configure-flags (list (string-append "GETOPT="
260 (assoc-ref %build-inputs
261 "util-linux")
262 "/bin/getopt"))))
37f9ff63 263 (inputs
ae0c1202
LC
264 `(("util-linux" ,util-linux) ; for 'getopt'
265 ("libxml2" ,libxml2) ; for 'xmllint'
266 ("libxslt" ,libxslt))) ; for 'xsltproc'
37f9ff63
AE
267 (home-page "http://cyberelk.net/tim/software/xmlto/")
268 (synopsis "Front-end to an XSL toolchain")
269 (description
270 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
271stylesheet for the conversion you want and applies it using an external
272XSL-T processor. It also performs any necessary post-processing.")
273 (license license:gpl2+)))