1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
21 (define-module (gnu packages xml)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages compression)
24 #:use-module (gnu packages gnupg)
25 #:use-module (gnu packages perl)
26 #:use-module (gnu packages python)
27 #:use-module (gnu packages web)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system perl)
33 #:use-module (gnu packages linux))
41 (uri (string-append "mirror://sourceforge/expat/expat/"
42 version "/expat-" version ".tar.gz"))
45 "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))))
46 (build-system gnu-build-system)
47 (home-page "http://www.libexpat.org/")
48 (synopsis "Stream-oriented XML parser library written in C")
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)))
55 (define-public libxml2
61 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
65 "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd"))))
66 (build-system gnu-build-system)
67 (home-page "http://www.xmlsoft.org/")
68 (synopsis "C parser for XML")
69 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
70 (native-inputs `(("perl" ,perl)
71 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
74 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
75 ;; sub-directory of any given package.
76 (native-search-paths (list (search-path-specification
77 (variable "XML_CATALOG_FILES")
80 (file-pattern "^catalog\\.xml$")
81 (file-type 'regular))))
82 (search-paths native-search-paths)
88 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
89 (let ((install (assoc-ref %standard-phases 'install))
90 (glibc (assoc-ref inputs ,(if (%current-target-system)
91 "cross-libc" "libc")))
92 (out (assoc-ref outputs "out")))
95 (substitute* "setup.py"
97 (string-append glibc "/include")))
98 (system* "python" "setup.py" "install"
99 (string-append "--prefix=" out))))
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)))
106 (define-public libxslt
112 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
116 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
117 (build-system gnu-build-system)
118 (home-page "http://xmlsoft.org/XSLT/index.html")
119 (synopsis "C library for applying XSLT stylesheets to XML documents")
120 (inputs `(("libgcrypt" ,libgcrypt)
122 ("python" ,python-wrapper)
125 "Libxslt is an XSLT C library developed for the GNOME project. It is
126 based on libxml for XML parsing, tree manipulation and XPath support.")
127 (license license:x11)))
129 (define-public perl-xml-parser
131 (name "perl-xml-parser")
136 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
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")
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")))
160 (define-public perl-libxml
167 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
171 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
172 (build-system perl-build-system)
174 `(("perl-xml-parser" ,perl-xml-parser)))
175 (license (package-license perl))
176 (synopsis "Perl SAX parser using XML::Parser")
178 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
180 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
182 (define-public perl-xml-namespacesupport
184 (name "perl-xml-namespacesupport")
189 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
190 "XML-NamespaceSupport-" version ".tar.gz"))
193 "1sklgcldl3w6gn706vx1cgz6pm4y5lfgsjxnfqyk20pilgq530bd"))))
194 (build-system perl-build-system)
195 (home-page "http://search.cpan.org/dist/XML-NamespaceSupport")
196 (synopsis "XML namespace support class")
197 (description "This module offers a simple to process namespaced XML
198 names (unames) from within any application that may need them. It also helps
199 maintain a prefix to namespace URI map, and provides a number of basic
201 (license (package-license perl))))
203 (define-public perl-xml-sax
205 (name "perl-xml-sax")
210 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
211 "XML-SAX-" version ".tar.gz"))
214 "115dypb50w1l94y3iwihv5nkixbsv1cxiqkd93y4rk5n6s74pc1j"))))
215 (build-system perl-build-system)
217 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
218 ("perl-xml-sax-base" ,perl-xml-sax-base)))
220 `(#:phases (modify-phases %standard-phases
223 ;; The install target tries to load the newly-installed
224 ;; XML::SAX module, but can't find it, so we need to tell
225 ;; perl where to look.
226 (lambda* (#:key outputs #:allow-other-keys)
228 (string-append (getenv "PERL5LIB") ":"
229 (assoc-ref outputs "out")
230 "/lib/perl5/site_perl")))))))
231 (home-page "http://search.cpan.org/dist/XML-SAX")
232 (synopsis "Perl API for XML")
233 (description "XML::SAX consists of several framework classes for using and
234 building Perl SAX2 XML parsers, filters, and drivers.")
235 (license (package-license perl))))
237 (define-public perl-xml-sax-base
239 (name "perl-xml-sax-base")
244 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
245 "XML-SAX-Base-" version ".tar.gz"))
248 "17i161rq1ngjlk0c8vdkrkkc56y1pf51k1g54y28py0micqp0qk6"))))
249 (build-system perl-build-system)
250 (home-page "http://search.cpan.org/dist/XML-SAX-Base")
251 (synopsis "Base class for SAX Drivers and Filters")
252 (description "This module has a very simple task - to be a base class for
253 PerlSAX drivers and filters. It's default behaviour is to pass the input
254 directly to the output unchanged. It can be useful to use this module as a
255 base class so you don't have to, for example, implement the characters()
257 (license (package-license perl))))
259 (define-public perl-xml-simple
261 (name "perl-xml-simple")
266 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
270 "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
271 (build-system perl-build-system)
273 `(("perl-xml-parser" ,perl-xml-parser)))
274 (license (package-license perl))
275 (synopsis "Perl module for easy reading/writing of XML files")
277 "The XML::Simple module provides a simple API layer on top of an
278 underlying XML parsing module (either XML::Parser or one of the SAX2
280 (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
282 (define-public perl-xml-regexp
284 (name "perl-xml-regexp")
289 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
293 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
294 (build-system perl-build-system)
296 `(("perl-xml-parser" ,perl-xml-parser)))
297 (license (package-license perl))
298 (synopsis "Perl regular expressions for XML tokens")
300 "XML::RegExp contains regular expressions for the following XML tokens:
301 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
302 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
303 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
305 (define-public perl-xml-dom
307 (name "perl-xml-dom")
312 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
316 "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
317 (build-system perl-build-system)
319 `(("perl-libwww" ,perl-libwww)
320 ("perl-libxml" ,perl-libxml)
321 ("perl-xml-regexp" ,perl-xml-regexp)))
322 (license (package-license perl))
324 "Perl module for building DOM Level 1 compliant document structures")
326 "This module extends the XML::Parser module by Clark Cooper. The
327 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
328 level interface to James Clark's expat library. XML::DOM::Parser is derived
329 from XML::Parser. It parses XML strings or files and builds a data structure
330 that conforms to the API of the Document Object Model.")
331 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
341 "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
345 "0dp5nxq491gymq806za0dk4hngfmq65ysrqbn0ypajqbbl6vf71n"))))
346 (build-system gnu-build-system)
348 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
349 '(#:configure-flags (list (string-append "GETOPT="
350 (assoc-ref %build-inputs
354 `(("util-linux" ,util-linux) ; for 'getopt'
355 ("libxml2" ,libxml2) ; for 'xmllint'
356 ("libxslt" ,libxslt))) ; for 'xsltproc'
357 (home-page "http://cyberelk.net/tim/software/xmlto/")
358 (synopsis "Front-end to an XSL toolchain")
360 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
361 stylesheet for the conversion you want and applies it using an external
362 XSL-T processor. It also performs any necessary post-processing.")
363 (license license:gpl2+)))