1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages xml)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages compression)
23 #:use-module (gnu packages gnupg)
24 #:use-module (gnu packages perl)
25 #:use-module (gnu packages python)
26 #:use-module (gnu packages web)
27 #:use-module ((guix licenses)
28 #:renamer (symbol-prefix-proc '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 "A 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 "libxml2, a C parser for XML")
69 (inputs `(("zlib" ,zlib)))
70 (native-inputs `(("perl" ,perl)
71 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
76 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
77 (let ((install (assoc-ref %standard-phases 'install))
78 (glibc (assoc-ref inputs ,(if (%current-target-system)
79 "cross-libc" "libc")))
80 (out (assoc-ref outputs "out")))
83 (substitute* "setup.py"
85 (string-append glibc "/include")))
86 (system* "python" "setup.py" "install"
87 (string-append "--prefix=" out))))
90 "Libxml2 is the XML C parser and toolkit developed for the Gnome project
91 (but it is usable outside of the Gnome platform).")
92 (license license:x11)))
94 (define-public libxslt
100 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
104 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
105 (build-system gnu-build-system)
106 (home-page "http://xmlsoft.org/XSLT/index.html")
107 (synopsis "libxslt, a C library for applying XSLT stylesheets to XML documents")
108 (inputs `(("libgcrypt" ,libgcrypt)
110 ("python" ,python-wrapper)
113 "Libxslt is an XSLT C library developed for the GNOME project. It is
114 based on libxml for XML parsing, tree manipulation and XPath support.")
115 (license license:x11)))
117 (define-public perl-xml-parser
119 (name "perl-xml-parser")
124 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
128 "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
129 (build-system perl-build-system)
130 (arguments `(#:make-maker-flags
131 (let ((expat (assoc-ref %build-inputs "expat")))
132 (list (string-append "EXPATLIBPATH=" expat "/lib")
133 (string-append "EXPATINCPATH=" expat "/include")))))
134 (inputs `(("expat" ,expat)))
135 (license (package-license perl))
136 (synopsis "Perl bindings to the Expat XML parsing library")
138 "This module provides ways to parse XML documents. It is built on top of
139 XML::Parser::Expat, which is a lower level interface to James Clark's expat
140 library. Each call to one of the parsing methods creates a new instance of
141 XML::Parser::Expat which is then used to parse the document. Expat options
142 may be provided when the XML::Parser object is created. These options are
143 then passed on to the Expat object on each parse call. They can also be given
144 as extra arguments to the parse methods, in which case they override options
145 given at XML::Parser creation time.")
146 (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))
148 (define-public perl-libxml
155 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
159 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
160 (build-system perl-build-system)
162 `(("perl-xml-parser" ,perl-xml-parser)))
163 (license (package-license perl))
164 (synopsis "Perl SAX parser using XML::Parser")
166 "XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser
168 (home-page "http://search.cpan.org/~kmacleod/libxml-perl/lib/XML/Parser/PerlSAX.pm")))
170 (define-public perl-xml-simple
172 (name "perl-xml-simple")
177 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
181 "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
182 (build-system perl-build-system)
184 `(("perl-xml-parser" ,perl-xml-parser)))
185 (license (package-license perl))
186 (synopsis "Perl module for easy reading/writing of XML files")
188 "The XML::Simple module provides a simple API layer on top of an
189 underlying XML parsing module (either XML::Parser or one of the SAX2
191 (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
193 (define-public perl-xml-regexp
195 (name "perl-xml-regexp")
200 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
204 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
205 (build-system perl-build-system)
207 `(("perl-xml-parser" ,perl-xml-parser)))
208 (license (package-license perl))
209 (synopsis "Perl regular expressions for XML tokens")
211 "XML::RegExp contains regular expressions for the following XML tokens:
212 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
213 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
214 (home-page "http://search.cpan.org/~tjmather/XML-RegExp/lib/XML/RegExp.pm")))
216 (define-public perl-xml-dom
218 (name "perl-xml-dom")
223 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
227 "1r0ampc88ni3sjpzr583k86076qg399arfm9xirv3cw49k3k5bzn"))))
228 (build-system perl-build-system)
230 `(("perl-libwww" ,perl-libwww)
231 ("perl-libxml" ,perl-libxml)
232 ("perl-xml-regexp" ,perl-xml-regexp)))
233 (license (package-license perl))
235 "Perl module for building DOM Level 1 compliant document structures")
237 "This module extends the XML::Parser module by Clark Cooper. The
238 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
239 level interface to James Clark's expat library. XML::DOM::Parser is derived
240 from XML::Parser. It parses XML strings or files and builds a data structure
241 that conforms to the API of the Document Object Model.")
242 (home-page "http://search.cpan.org/~tjmather/XML-DOM-1.44/lib/XML/DOM.pm")))
252 "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
256 "0dp5nxq491gymq806za0dk4hngfmq65ysrqbn0ypajqbbl6vf71n"))))
257 (build-system gnu-build-system)
259 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
260 '(#:configure-flags (list (string-append "GETOPT="
261 (assoc-ref %build-inputs
265 `(("util-linux" ,util-linux) ; for 'getopt'
266 ("libxml2" ,libxml2) ; for 'xmllint'
267 ("libxslt" ,libxslt))) ; for 'xsltproc'
268 (home-page "http://cyberelk.net/tim/software/xmlto/")
269 (synopsis "Front-end to an XSL toolchain")
271 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
272 stylesheet for the conversion you want and applies it using an external
273 XSL-T processor. It also performs any necessary post-processing.")
274 (license license:gpl2+)))