Commit | Line | Data |
---|---|---|
d0414883 | 1 | ;;; GNU Guix --- Functional package management for GNU |
3a2efbc8 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 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> |
cc537187 | 6 | ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net> |
96fd87c9 | 7 | ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org> |
0efb6452 | 8 | ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
fe9451c5 | 9 | ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com> |
c74c7c13 | 10 | ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> |
e9f62e52 | 11 | ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name> |
5eec378b | 12 | ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> |
19c33040 | 13 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
3c986a7d | 14 | ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> |
bafafa80 | 15 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
c950a2a5 | 16 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
f9f67fcb | 17 | ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> |
5bc2d579 | 18 | ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net> |
76fed2b3 | 19 | ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> |
3b695802 | 20 | ;;; Copyright © 2017 Petter <petter@mykolab.ch> |
767d24e8 | 21 | ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at> |
2cce23bf | 22 | ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> |
f85c8dd8 | 23 | ;;; Copyright © 2018 Jack Hill <jackhill@jackhill.us> |
8fda8b7d | 24 | ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> |
f2a53a4a | 25 | ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com> |
d0414883 LC |
26 | ;;; |
27 | ;;; This file is part of GNU Guix. | |
28 | ;;; | |
29 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
30 | ;;; under the terms of the GNU General Public License as published by | |
31 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
32 | ;;; your option) any later version. | |
33 | ;;; | |
34 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
35 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
36 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
37 | ;;; GNU General Public License for more details. | |
38 | ;;; | |
39 | ;;; You should have received a copy of the GNU General Public License | |
40 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
41 | ||
1ffa7090 | 42 | (define-module (gnu packages xml) |
f0444eaf | 43 | #:use-module (gnu packages) |
0899144f | 44 | #:use-module (gnu packages autotools) |
79a0eabd | 45 | #:use-module (gnu packages check) |
322cbda7 | 46 | #:use-module (gnu packages compression) |
2cce23bf | 47 | #:use-module (gnu packages curl) |
cc537187 RW |
48 | #:use-module (gnu packages docbook) |
49 | #:use-module (gnu packages documentation) | |
50 | #:use-module (gnu packages glib) | |
58cc3b38 | 51 | #:use-module (gnu packages gnupg) |
cc537187 RW |
52 | #:use-module (gnu packages gnome) |
53 | #:use-module (gnu packages graphviz) | |
1a17ca26 | 54 | #:use-module (gnu packages java) |
aff0cce9 | 55 | #:use-module (gnu packages nss) |
f0444eaf | 56 | #:use-module (gnu packages perl) |
5ccde207 | 57 | #:use-module (gnu packages perl-check) |
f0444eaf | 58 | #:use-module (gnu packages python) |
a7fd7b68 | 59 | #:use-module (gnu packages tls) |
ad871fc6 | 60 | #:use-module (gnu packages web) |
b5b73a82 | 61 | #:use-module ((guix licenses) #:prefix license:) |
d0414883 LC |
62 | #:use-module (guix packages) |
63 | #:use-module (guix download) | |
3047c7ba | 64 | #:use-module (guix git-download) |
77d7b57c | 65 | #:use-module (guix build-system ant) |
6ce212b8 | 66 | #:use-module (guix build-system cmake) |
2a1e82bb | 67 | #:use-module (guix build-system gnu) |
37f9ff63 | 68 | #:use-module (guix build-system perl) |
7ce32242 | 69 | #:use-module (guix build-system python) |
e4aab734 RW |
70 | #:use-module (gnu packages linux) |
71 | #:use-module (gnu packages pkg-config)) | |
d0414883 LC |
72 | |
73 | (define-public expat | |
74 | (package | |
75 | (name "expat") | |
6cd34029 | 76 | (version "2.2.9") |
f85c8dd8 JH |
77 | (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c)))) |
78 | (origin | |
79 | (method url-fetch) | |
80 | (uri (list (string-append "mirror://sourceforge/expat/expat/" | |
fb9a23a3 | 81 | version "/expat-" version ".tar.xz") |
f85c8dd8 JH |
82 | (string-append |
83 | "https://github.com/libexpat/libexpat/releases/download/R_" | |
84 | (string-map dot->underscore version) | |
fb9a23a3 | 85 | "/expat-" version ".tar.xz"))) |
f85c8dd8 JH |
86 | (sha256 |
87 | (base32 | |
6cd34029 | 88 | "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy"))))) |
d0414883 | 89 | (build-system gnu-build-system) |
767abd37 MB |
90 | (arguments |
91 | '(#:configure-flags '("--disable-static"))) | |
e5e33f90 | 92 | (home-page "https://libexpat.github.io/") |
9e771e3b | 93 | (synopsis "Stream-oriented XML parser library written in C") |
d0414883 LC |
94 | (description |
95 | "Expat is an XML parser library written in C. It is a | |
96 | stream-oriented parser in which an application registers handlers for | |
97 | things the parser might find in the XML document (like start tags).") | |
98 | (license license:expat))) | |
f0444eaf | 99 | |
5bc2d579 GG |
100 | (define-public libebml |
101 | (package | |
102 | (name "libebml") | |
bceadaf4 | 103 | (version "1.4.0") |
5bc2d579 GG |
104 | (source |
105 | (origin | |
106 | (method url-fetch) | |
079321fa TGR |
107 | (uri (string-append "https://dl.matroska.org/downloads/libebml/" |
108 | "libebml-" version ".tar.xz")) | |
5bc2d579 | 109 | (sha256 |
bceadaf4 | 110 | (base32 "1cy4hbk8qbxn4c6pwvlsvr1rp8vhfach9rwfg4c50qa94nlckaw0")))) |
f3d89181 TGR |
111 | (build-system cmake-build-system) |
112 | (arguments | |
113 | `(#:configure-flags | |
114 | (list "-DBUILD_SHARED_LIBS=YES") | |
115 | #:tests? #f)) ; no test suite | |
a040db6d | 116 | (home-page "https://matroska-org.github.io/libebml/") |
cb778117 TGR |
117 | (synopsis "C++ library to parse EBML files") |
118 | (description "libebml is a C++ library to read and write @dfn{EBML} | |
119 | (Extensible Binary Meta Language) files. EBML was designed to be a simplified | |
120 | binary extension of XML for the purpose of storing and manipulating data in a | |
5bc2d579 GG |
121 | hierarchical form with variable field lengths.") |
122 | (license license:lgpl2.1))) | |
123 | ||
f0444eaf AE |
124 | (define-public libxml2 |
125 | (package | |
126 | (name "libxml2") | |
c9bba992 | 127 | (version "2.9.10") |
f0444eaf AE |
128 | (source (origin |
129 | (method url-fetch) | |
130 | (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" | |
131 | version ".tar.gz")) | |
132 | (sha256 | |
133 | (base32 | |
c9bba992 | 134 | "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma")))) |
f0444eaf | 135 | (build-system gnu-build-system) |
5f8642ea MB |
136 | (outputs '("out" "static")) |
137 | (arguments | |
138 | `(#:phases (modify-phases %standard-phases | |
139 | (add-after 'install 'move-static-libs | |
140 | (lambda* (#:key outputs #:allow-other-keys) | |
141 | (let ((src (string-append (assoc-ref outputs "out") "/lib")) | |
142 | (dst (string-append (assoc-ref outputs "static") | |
143 | "/lib"))) | |
144 | (mkdir-p dst) | |
145 | (for-each (lambda (ar) | |
146 | (rename-file ar (string-append dst "/" | |
147 | (basename ar)))) | |
148 | (find-files src "\\.a$")) | |
d52680ee MB |
149 | |
150 | ;; Remove reference to the static library from the .la | |
151 | ;; file such that Libtool does the right thing when both | |
152 | ;; the shared and static variants are available. | |
153 | (substitute* (string-append src "/libxml2.la") | |
154 | (("^old_library='libxml2.a'") "old_library=''")) | |
5f8642ea | 155 | #t)))))) |
f0444eaf | 156 | (home-page "http://www.xmlsoft.org/") |
35b9e423 | 157 | (synopsis "C parser for XML") |
7ba79d5d | 158 | (inputs `(("xz" ,xz))) |
c1944c92 | 159 | (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'. |
7ce32242 | 160 | (native-inputs `(("perl" ,perl))) |
2a8d4401 LC |
161 | ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml' |
162 | ;; sub-directory of any given package. | |
74528069 LC |
163 | (native-search-paths (list (search-path-specification |
164 | (variable "XML_CATALOG_FILES") | |
165 | (separator " ") | |
166 | (files '("xml")) | |
167 | (file-pattern "^catalog\\.xml$") | |
168 | (file-type 'regular)))) | |
2a8d4401 | 169 | (search-paths native-search-paths) |
f0444eaf | 170 | (description |
7c125ce0 AK |
171 | "Libxml2 is the XML C parser and toolkit developed for the Gnome |
172 | project (but it is usable outside of the Gnome platform).") | |
f0444eaf | 173 | (license license:x11))) |
58cc3b38 | 174 | |
cc537187 RW |
175 | ;; This is the latest stable release. |
176 | (define-public libxmlplusplus | |
177 | (package | |
178 | (name "libxmlplusplus") | |
179 | (version "3.2.0") | |
180 | (source (origin | |
181 | (method git-fetch) | |
182 | (uri (git-reference | |
183 | (url "https://github.com/libxmlplusplus/libxmlplusplus.git") | |
184 | (commit version))) | |
185 | (file-name (git-file-name name version)) | |
186 | (sha256 | |
187 | (base32 | |
188 | "0wjz591rjlgbah7dcq8i0yn0zw9d62b7g6r0pppx81ic0cx8n8ga")))) | |
189 | (build-system gnu-build-system) | |
190 | (arguments | |
191 | `(#:phases | |
192 | (modify-phases %standard-phases | |
193 | (add-after 'unpack 'fix-documentation | |
194 | (lambda* (#:key inputs #:allow-other-keys) | |
195 | (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") | |
196 | "/xml/dtd/docbook")) | |
197 | (xsldoc (string-append (assoc-ref inputs "docbook-xsl") | |
198 | "/xml/xsl/docbook-xsl-" | |
199 | ,(package-version docbook-xsl)))) | |
200 | (substitute* '("examples/dom_xpath/example.xml" | |
201 | "docs/manual/libxml++_without_code.xml") | |
202 | (("http://.*/docbookx\\.dtd") | |
203 | (string-append xmldoc "/docbookx.dtd"))) | |
204 | (setenv "SGML_CATALOG_FILES" | |
205 | (string-append xmldoc "/catalog.xml")) | |
206 | (substitute* "docs/manual/docbook-customisation.xsl" | |
207 | (("http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl") | |
208 | (string-append xsldoc "/html/chunk.xsl")))) | |
209 | #t))))) | |
210 | (propagated-inputs | |
211 | `(("libxml2" ,libxml2))) | |
212 | (inputs | |
213 | `(("glibmm" ,glibmm))) | |
214 | (native-inputs | |
215 | `(("autoconf" ,autoconf) | |
216 | ("automake" ,automake) | |
217 | ("doxygen" ,doxygen) | |
218 | ("docbook-xml" ,docbook-xml) | |
219 | ("docbook-xsl" ,docbook-xsl) | |
220 | ("graphviz" ,graphviz) ; for dot | |
221 | ("libtool" ,libtool) | |
222 | ("libxslt" ,libxslt) | |
223 | ("mm-common" ,mm-common) | |
224 | ("perl" ,perl) | |
225 | ("pkg-config" ,pkg-config))) | |
226 | (home-page "https://github.com/libxmlplusplus/libxmlplusplus/") | |
227 | (synopsis "C++ bindings for libxml2") | |
228 | (description | |
229 | "libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files. | |
230 | It uses libxml2 to access the XML files.") | |
231 | (license license:lgpl2.1+))) | |
232 | ||
c2bb58f6 RW |
233 | ;; This is the last release providing the 2.6 API, hence the name. |
234 | ;; This is needed by tascam-gtk | |
235 | (define-public libxmlplusplus-2.6 | |
236 | (package | |
237 | (inherit libxmlplusplus) | |
238 | (name "libxmlplusplus") | |
239 | (version "2.40.1") | |
240 | (source (origin | |
241 | (method git-fetch) | |
242 | (uri (git-reference | |
243 | (url "https://github.com/libxmlplusplus/libxmlplusplus.git") | |
244 | (commit version))) | |
245 | (file-name (git-file-name name version)) | |
246 | (sha256 | |
247 | (base32 | |
248 | "0gbfi4l88w828gmyc9br11l003ylyi4vigp5d1kfgsn0k4cig3y9")))))) | |
249 | ||
7ce32242 | 250 | (define-public python-libxml2 |
e428b2c0 | 251 | (package/inherit libxml2 |
7ce32242 | 252 | (name "python-libxml2") |
785fcb62 MB |
253 | (source (origin |
254 | (inherit (package-source libxml2)) | |
255 | (patches (cons (search-patch "python-libxml2-utf8.patch") | |
256 | (origin-patches (package-source libxml2)))))) | |
7ce32242 | 257 | (build-system python-build-system) |
d3028f5b | 258 | (outputs '("out")) |
7ce32242 SB |
259 | (arguments |
260 | `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'. | |
261 | #:tests? #f | |
262 | #:phases | |
263 | (modify-phases %standard-phases | |
264 | (add-before | |
265 | 'build 'configure | |
266 | (lambda* (#:key inputs #:allow-other-keys) | |
267 | (chdir "python") | |
268 | (let ((glibc (assoc-ref inputs ,(if (%current-target-system) | |
269 | "cross-libc" "libc"))) | |
270 | (libxml2 (assoc-ref inputs "libxml2"))) | |
271 | (substitute* "setup.py" | |
272 | ;; For 'libxml2/libxml/tree.h'. | |
273 | (("ROOT = r'/usr'") | |
274 | (format #f "ROOT = r'~a'" libxml2)) | |
275 | ;; For 'iconv.h'. | |
276 | (("/opt/include") | |
aa6f87a2 MW |
277 | (string-append glibc "/include")))) |
278 | #t))))) | |
7ce32242 SB |
279 | (inputs `(("libxml2" ,libxml2))) |
280 | (synopsis "Python bindings for the libxml2 library"))) | |
281 | ||
282 | (define-public python2-libxml2 | |
283 | (package-with-python2 python-libxml2)) | |
284 | ||
58cc3b38 AE |
285 | (define-public libxslt |
286 | (package | |
287 | (name "libxslt") | |
badcb119 | 288 | (version "1.1.34") |
58cc3b38 AE |
289 | (source (origin |
290 | (method url-fetch) | |
291 | (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-" | |
292 | version ".tar.gz")) | |
293 | (sha256 | |
294 | (base32 | |
badcb119 | 295 | "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq")) |
28b33172 | 296 | (patches (search-patches "libxslt-generated-ids.patch")))) |
58cc3b38 | 297 | (build-system gnu-build-system) |
badcb119 MB |
298 | (arguments |
299 | `(#:phases (modify-phases %standard-phases | |
300 | (add-before 'check 'disable-fuzz-tests | |
301 | (lambda _ | |
302 | ;; Disable libFuzzer tests, because they require | |
303 | ;; instrumentation builds of libxml2 and libxslt. | |
304 | (substitute* "tests/Makefile" | |
305 | (("exslt plugins fuzz") | |
306 | "exslt plugins")) | |
307 | #t))))) | |
58cc3b38 | 308 | (home-page "http://xmlsoft.org/XSLT/index.html") |
35b9e423 | 309 | (synopsis "C library for applying XSLT stylesheets to XML documents") |
58cc3b38 AE |
310 | (inputs `(("libgcrypt" ,libgcrypt) |
311 | ("libxml2" ,libxml2) | |
95288fcc | 312 | ("python" ,python-minimal-wrapper) |
60825fdd MO |
313 | ("zlib" ,zlib) |
314 | ("xz" ,xz))) | |
da66bd38 MO |
315 | (native-inputs |
316 | `(("pkg-config" ,pkg-config))) | |
58cc3b38 | 317 | (description |
35b9e423 | 318 | "Libxslt is an XSLT C library developed for the GNOME project. It is |
58cc3b38 AE |
319 | based on libxml for XML parsing, tree manipulation and XPath support.") |
320 | (license license:x11))) | |
2a1e82bb | 321 | |
5eec378b BW |
322 | (define-public perl-graph-readwrite |
323 | (package | |
324 | (name "perl-graph-readwrite") | |
ffbc7d65 | 325 | (version "2.09") |
5eec378b BW |
326 | (source |
327 | (origin | |
328 | (method url-fetch) | |
329 | (uri (string-append | |
330 | "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-" | |
331 | version | |
332 | ".tar.gz")) | |
333 | (sha256 | |
334 | (base32 | |
ffbc7d65 | 335 | "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh")))) |
5eec378b BW |
336 | (build-system perl-build-system) |
337 | (propagated-inputs | |
338 | `(("perl-graph" ,perl-graph) | |
339 | ("perl-parse-yapp" ,perl-parse-yapp) | |
340 | ("perl-xml-parser" ,perl-xml-parser) | |
341 | ("perl-xml-writer" ,perl-xml-writer))) | |
9aba9b12 | 342 | (home-page "https://metacpan.org/release/Graph-ReadWrite") |
5eec378b BW |
343 | (synopsis "Modules for reading and writing directed graphs") |
344 | (description "This is a collection of perl classes for reading and writing | |
345 | directed graphs in a variety of file formats. The graphs are represented in | |
346 | Perl using Jarkko Hietaniemi's @code{Graph} classes. | |
347 | ||
348 | There are two base classes. @code{Graph::Reader} is the base class for classes | |
349 | which read a graph file and create an instance of the Graph class. | |
350 | @code{Graph::Writer} is the base class for classes which take an instance of | |
351 | the @code{Graph} class and write it out in a specific file format.") | |
2f3108ad | 352 | (license license:perl-license))) |
5eec378b | 353 | |
b2696a58 | 354 | (define-public perl-xml-atom |
355 | (package | |
356 | (name "perl-xml-atom") | |
522f1995 | 357 | (version "0.42") |
b2696a58 | 358 | (source (origin |
359 | (method url-fetch) | |
360 | (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/" | |
361 | "XML-Atom-" version ".tar.gz")) | |
362 | (sha256 | |
363 | (base32 | |
522f1995 | 364 | "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6")))) |
b2696a58 | 365 | (build-system perl-build-system) |
522f1995 MB |
366 | (arguments |
367 | `(#:phases | |
368 | (modify-phases %standard-phases | |
369 | (add-before 'check 'set-perl-search-path | |
370 | (lambda _ | |
371 | (setenv "PERL5LIB" | |
372 | (string-append (getcwd) ":" | |
373 | (getenv "PERL5LIB"))) | |
374 | #t))))) | |
b2696a58 | 375 | (native-inputs |
50632f0a TGR |
376 | ;; TODO package: perl-datetime-format-atom |
377 | `(("perl-html-tagset" ,perl-html-tagset) | |
522f1995 | 378 | ("perl-module-build-tiny" ,perl-module-build-tiny) |
50632f0a TGR |
379 | ("perl-module-install" ,perl-module-install))) |
380 | (propagated-inputs | |
b2696a58 | 381 | `(("perl-class-data-inheritable" ,perl-class-data-inheritable) |
382 | ("perl-datetime" ,perl-datetime) | |
383 | ("perl-datetime-timezone" ,perl-datetime-timezone) | |
384 | ("perl-digest-sha1" ,perl-digest-sha1) | |
385 | ("perl-libwww" ,perl-libwww) | |
386 | ("perl-uri" ,perl-uri) | |
387 | ("perl-xml-libxml" ,perl-xml-libxml) | |
388 | ("perl-xml-xpath" ,perl-xml-xpath))) | |
9aba9b12 | 389 | (home-page "https://metacpan.org/release/XML-Atom") |
b2696a58 | 390 | (synopsis "Atom feed and API implementation") |
391 | (description | |
392 | "Atom is a syndication, API, and archiving format for weblogs and other data. | |
393 | @code{XML::Atom} implements the feed format as well as a client for the API.") | |
2f3108ad | 394 | (license license:perl-license))) |
b2696a58 | 395 | |
d66fa696 MB |
396 | (define-public perl-xml-descent |
397 | (package | |
398 | (name "perl-xml-descent") | |
399 | (version "1.04") | |
400 | (source (origin | |
401 | (method url-fetch) | |
402 | (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/" | |
403 | "XML-Descent-" version ".tar.gz")) | |
404 | (sha256 | |
405 | (base32 | |
406 | "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7")))) | |
407 | (build-system perl-build-system) | |
408 | (native-inputs | |
409 | `(("perl-module-build" ,perl-module-build))) | |
410 | (propagated-inputs | |
411 | `(("perl-test-differences" ,perl-test-differences) | |
412 | ("perl-xml-tokeparser" ,perl-xml-tokeparser))) | |
9aba9b12 | 413 | (home-page "https://metacpan.org/release/XML-Descent") |
d66fa696 MB |
414 | (synopsis "Recursive descent XML parsing") |
415 | (description | |
416 | "The conventional models for parsing XML are either @dfn{DOM} | |
417 | (a data structure representing the entire document tree is created) or | |
418 | @dfn{SAX} (callbacks are issued for each element in the XML). | |
419 | ||
420 | XML grammar is recursive - so it's nice to be able to write recursive | |
421 | parsers for it. @code{XML::Descent} allows such parsers to be created.") | |
2f3108ad | 422 | (license license:perl-license))) |
d66fa696 | 423 | |
2a1e82bb LC |
424 | (define-public perl-xml-parser |
425 | (package | |
426 | (name "perl-xml-parser") | |
8b53495d | 427 | (version "2.46") |
2a1e82bb LC |
428 | (source (origin |
429 | (method url-fetch) | |
430 | (uri (string-append | |
2b8c5f54 | 431 | "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-" |
2a1e82bb LC |
432 | version ".tar.gz")) |
433 | (sha256 | |
434 | (base32 | |
8b53495d | 435 | "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk")))) |
2a1e82bb LC |
436 | (build-system perl-build-system) |
437 | (arguments `(#:make-maker-flags | |
438 | (let ((expat (assoc-ref %build-inputs "expat"))) | |
439 | (list (string-append "EXPATLIBPATH=" expat "/lib") | |
440 | (string-append "EXPATINCPATH=" expat "/include"))))) | |
441 | (inputs `(("expat" ,expat))) | |
2f3108ad | 442 | (license license:perl-license) |
2a1e82bb LC |
443 | (synopsis "Perl bindings to the Expat XML parsing library") |
444 | (description | |
445 | "This module provides ways to parse XML documents. It is built on top of | |
446 | XML::Parser::Expat, which is a lower level interface to James Clark's expat | |
447 | library. Each call to one of the parsing methods creates a new instance of | |
448 | XML::Parser::Expat which is then used to parse the document. Expat options | |
449 | may be provided when the XML::Parser object is created. These options are | |
450 | then passed on to the Expat object on each parse call. They can also be given | |
451 | as extra arguments to the parse methods, in which case they override options | |
452 | given at XML::Parser creation time.") | |
9aba9b12 | 453 | (home-page "https://metacpan.org/release/XML-Parser"))) |
37f9ff63 | 454 | |
62b28f19 MB |
455 | (define-public perl-xml-tokeparser |
456 | (package | |
457 | (name "perl-xml-tokeparser") | |
458 | (version "0.05") | |
459 | (source (origin | |
460 | (method url-fetch) | |
461 | (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/" | |
462 | "XML-TokeParser-" version ".tar.gz")) | |
463 | (sha256 | |
464 | (base32 | |
465 | "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5")))) | |
466 | (build-system perl-build-system) | |
467 | (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser))) | |
9aba9b12 | 468 | (home-page "https://metacpan.org/release/XML-TokeParser") |
62b28f19 MB |
469 | (synopsis "Simplified interface to XML::Parser") |
470 | (description | |
471 | "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface | |
472 | to @code{XML::Parser} in much the same way that Gisle Aas' | |
473 | @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}. | |
474 | @code{XML::TokeParser} splits its XML input up into \"tokens\", each | |
475 | corresponding to an @code{XML::Parser} event.") | |
2f3108ad | 476 | (license license:perl-license))) |
62b28f19 | 477 | |
7339fbe2 | 478 | (define-public perl-libxml |
1385ba4f | 479 | (package |
7339fbe2 | 480 | (name "perl-libxml") |
1385ba4f AE |
481 | (version "0.08") |
482 | (source (origin | |
483 | (method url-fetch) | |
484 | (uri (string-append | |
485 | "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-" | |
486 | version ".tar.gz")) | |
487 | (sha256 | |
488 | (base32 | |
489 | "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5")))) | |
490 | (build-system perl-build-system) | |
7b81406a | 491 | (propagated-inputs |
1385ba4f | 492 | `(("perl-xml-parser" ,perl-xml-parser))) |
2f3108ad | 493 | (license license:perl-license) |
2db5f9b6 | 494 | (synopsis "Perl modules for working with XML") |
1385ba4f | 495 | (description |
2db5f9b6 TGR |
496 | "libxml-perl is a collection of smaller Perl modules, scripts, and |
497 | documents for working with XML in Perl. libxml-perl software works in | |
498 | combination with @code{XML::Parser}, PerlSAX, @code{XML::DOM}, | |
499 | @code{XML::Grove}, and others.") | |
9aba9b12 | 500 | (home-page "https://metacpan.org/release/libxml-perl"))) |
1385ba4f | 501 | |
3dd6bee1 EB |
502 | (define-public perl-xml-libxml |
503 | (package | |
504 | (name "perl-xml-libxml") | |
d71184f8 | 505 | (version "2.0134") |
3dd6bee1 EB |
506 | (source |
507 | (origin | |
508 | (method url-fetch) | |
509 | (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" | |
510 | "XML-LibXML-" version ".tar.gz")) | |
511 | (sha256 | |
512 | (base32 | |
d71184f8 | 513 | "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h")))) |
3dd6bee1 EB |
514 | (build-system perl-build-system) |
515 | (propagated-inputs | |
516 | `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport) | |
517 | ("perl-xml-sax" ,perl-xml-sax))) | |
518 | (inputs | |
519 | `(("libxml2" ,libxml2))) | |
9aba9b12 | 520 | (home-page "https://metacpan.org/release/XML-LibXML") |
3dd6bee1 EB |
521 | (synopsis "Perl interface to libxml2") |
522 | (description "This module implements a Perl interface to the libxml2 | |
54c3c140 | 523 | library which provides interfaces for parsing and manipulating XML files. This |
3dd6bee1 EB |
524 | module allows Perl programmers to make use of the highly capable validating |
525 | XML parser and the high performance DOM implementation.") | |
2f3108ad | 526 | (license license:perl-license))) |
3dd6bee1 | 527 | |
f7c4dc2f RW |
528 | (define-public perl-xml-libxml-simple |
529 | (package | |
530 | (name "perl-xml-libxml-simple") | |
d21fb90a | 531 | (version "0.99") |
f7c4dc2f RW |
532 | (source (origin |
533 | (method url-fetch) | |
534 | (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" | |
535 | "XML-LibXML-Simple-" version ".tar.gz")) | |
536 | (sha256 | |
537 | (base32 | |
d21fb90a | 538 | "0i4ybiqdnvnbfxqslw2y392kvy7i752dl8n99bqiqv5kzk4lbzhl")))) |
f7c4dc2f RW |
539 | (build-system perl-build-system) |
540 | (propagated-inputs | |
541 | `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny) | |
542 | ("perl-xml-libxml" ,perl-xml-libxml))) | |
9aba9b12 | 543 | (home-page "https://metacpan.org/release/XML-LibXML-Simple") |
f7c4dc2f RW |
544 | (synopsis "XML::LibXML based XML::Simple clone") |
545 | (description | |
546 | "This package provides the same API as @code{XML::Simple} but is based on | |
547 | @code{XML::LibXML}.") | |
2f3108ad | 548 | (license license:perl-license))) |
f7c4dc2f | 549 | |
93863a5e RW |
550 | (define-public perl-xml-libxslt |
551 | (package | |
552 | (name "perl-xml-libxslt") | |
73a3e98f | 553 | (version "1.96") |
93863a5e RW |
554 | (source |
555 | (origin | |
556 | (method url-fetch) | |
557 | (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" | |
558 | "XML-LibXSLT-" version ".tar.gz")) | |
559 | (sha256 | |
560 | (base32 | |
73a3e98f | 561 | "0wyl8klgr65j8y8fzgwz9jlvfjwvxazna8j3dg9gksd2v973fpia")))) |
93863a5e RW |
562 | (build-system perl-build-system) |
563 | (inputs | |
564 | `(("libxslt" ,libxslt))) | |
565 | (propagated-inputs | |
566 | `(("perl-xml-libxml" ,perl-xml-libxml))) | |
9aba9b12 | 567 | (home-page "https://metacpan.org/release/XML-LibXSLT") |
93863a5e RW |
568 | (synopsis "Perl bindings to GNOME libxslt library") |
569 | (description "This Perl module is an interface to the GNOME project's | |
570 | libxslt library.") | |
2f3108ad | 571 | (license license:perl-license))) |
93863a5e | 572 | |
b715dbac EB |
573 | (define-public perl-xml-namespacesupport |
574 | (package | |
575 | (name "perl-xml-namespacesupport") | |
88958ee0 | 576 | (version "1.12") |
b715dbac EB |
577 | (source |
578 | (origin | |
579 | (method url-fetch) | |
580 | (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/" | |
581 | "XML-NamespaceSupport-" version ".tar.gz")) | |
582 | (sha256 | |
583 | (base32 | |
88958ee0 | 584 | "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7")))) |
b715dbac | 585 | (build-system perl-build-system) |
9aba9b12 | 586 | (home-page "https://metacpan.org/release/XML-NamespaceSupport") |
b715dbac EB |
587 | (synopsis "XML namespace support class") |
588 | (description "This module offers a simple to process namespaced XML | |
589 | names (unames) from within any application that may need them. It also helps | |
590 | maintain a prefix to namespace URI map, and provides a number of basic | |
591 | checks.") | |
2f3108ad | 592 | (license license:perl-license))) |
b715dbac | 593 | |
a022b23f | 594 | (define-public perl-xml-rss |
595 | (package | |
596 | (name "perl-xml-rss") | |
73662141 | 597 | (version "1.61") |
a022b23f | 598 | (source (origin |
599 | (method url-fetch) | |
600 | (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" | |
601 | "XML-RSS-" version ".tar.gz")) | |
602 | (sha256 | |
603 | (base32 | |
73662141 | 604 | "03f983l2dnkvcw6iyg1s0xmv5wn793d3kvqlshmhm01ibp7ffvzs")))) |
a022b23f | 605 | (build-system perl-build-system) |
606 | (native-inputs | |
607 | `(("perl-module-build" ,perl-module-build) | |
608 | ("perl-test-manifest" ,perl-test-manifest) | |
609 | ("perl-test-differences" ,perl-test-differences) | |
610 | ("perl-test-pod" ,perl-test-pod) | |
611 | ("perl-test-pod-coverage" ,perl-test-pod-coverage))) | |
612 | ;; XXX: The test which uses this modules does not run, even when it is included | |
613 | ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace) | |
614 | (inputs | |
615 | `(("perl-datetime" ,perl-datetime) | |
616 | ("perl-datetime-format-mail" ,perl-datetime-format-mail) | |
617 | ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf) | |
618 | ("perl-html-parser" ,perl-html-parser) | |
619 | ("perl-xml-parser" ,perl-xml-parser))) | |
9aba9b12 | 620 | (home-page "https://metacpan.org/release/XML-RSS") |
a022b23f | 621 | (synopsis "Creates and updates RSS files") |
622 | (description | |
623 | "This module provides a basic framework for creating and maintaining | |
624 | RDF Site Summary (RSS) files. This distribution also contains many examples | |
625 | that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and | |
626 | 1.0 version, and more.") | |
2f3108ad | 627 | (license license:perl-license))) |
a022b23f | 628 | |
18b8bbb3 EB |
629 | (define-public perl-xml-sax |
630 | (package | |
631 | (name "perl-xml-sax") | |
2dcde3c7 | 632 | (version "1.02") |
18b8bbb3 EB |
633 | (source |
634 | (origin | |
635 | (method url-fetch) | |
636 | (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/" | |
637 | "XML-SAX-" version ".tar.gz")) | |
638 | (sha256 | |
2dcde3c7 | 639 | (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5")))) |
18b8bbb3 EB |
640 | (build-system perl-build-system) |
641 | (propagated-inputs | |
642 | `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport) | |
643 | ("perl-xml-sax-base" ,perl-xml-sax-base))) | |
644 | (arguments | |
645 | `(#:phases (modify-phases %standard-phases | |
646 | (add-before | |
40b084a3 | 647 | 'install 'augment-path |
18b8bbb3 EB |
648 | ;; The install target tries to load the newly-installed |
649 | ;; XML::SAX module, but can't find it, so we need to tell | |
650 | ;; perl where to look. | |
651 | (lambda* (#:key outputs #:allow-other-keys) | |
652 | (setenv "PERL5LIB" | |
653 | (string-append (getenv "PERL5LIB") ":" | |
654 | (assoc-ref outputs "out") | |
aa6f87a2 MW |
655 | "/lib/perl5/site_perl")) |
656 | #t))))) | |
9aba9b12 | 657 | (home-page "https://metacpan.org/release/XML-SAX") |
18b8bbb3 EB |
658 | (synopsis "Perl API for XML") |
659 | (description "XML::SAX consists of several framework classes for using and | |
660 | building Perl SAX2 XML parsers, filters, and drivers.") | |
2f3108ad | 661 | (license license:perl-license))) |
18b8bbb3 | 662 | |
1ed6d5bc EB |
663 | (define-public perl-xml-sax-base |
664 | (package | |
665 | (name "perl-xml-sax-base") | |
fa964e96 | 666 | (version "1.09") |
1ed6d5bc EB |
667 | (source |
668 | (origin | |
669 | (method url-fetch) | |
670 | (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/" | |
671 | "XML-SAX-Base-" version ".tar.gz")) | |
672 | (sha256 | |
673 | (base32 | |
fa964e96 | 674 | "1l1ai9g1z11ja7mvnfl5mj346r13jyckbg9qlw6c2izglidkbjv6")))) |
1ed6d5bc | 675 | (build-system perl-build-system) |
9aba9b12 | 676 | (home-page "https://metacpan.org/release/XML-SAX-Base") |
1ed6d5bc EB |
677 | (synopsis "Base class for SAX Drivers and Filters") |
678 | (description "This module has a very simple task - to be a base class for | |
679 | PerlSAX drivers and filters. It's default behaviour is to pass the input | |
680 | directly to the output unchanged. It can be useful to use this module as a | |
681 | base class so you don't have to, for example, implement the characters() | |
682 | callback.") | |
2f3108ad | 683 | (license license:perl-license))) |
1ed6d5bc | 684 | |
535dc6cf AE |
685 | (define-public perl-xml-simple |
686 | (package | |
687 | (name "perl-xml-simple") | |
fa3fff43 | 688 | (version "2.25") |
535dc6cf AE |
689 | (source (origin |
690 | (method url-fetch) | |
691 | (uri (string-append | |
692 | "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-" | |
693 | version ".tar.gz")) | |
694 | (sha256 | |
695 | (base32 | |
fa3fff43 | 696 | "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk")))) |
535dc6cf | 697 | (build-system perl-build-system) |
27ef7f45 | 698 | (propagated-inputs |
e831256f EF |
699 | `(("perl-xml-parser" ,perl-xml-parser) |
700 | ("perl-xml-sax" ,perl-xml-sax))) | |
2f3108ad | 701 | (license license:perl-license) |
535dc6cf AE |
702 | (synopsis "Perl module for easy reading/writing of XML files") |
703 | (description | |
704 | "The XML::Simple module provides a simple API layer on top of an | |
705 | underlying XML parsing module (either XML::Parser or one of the SAX2 | |
706 | parser modules).") | |
9aba9b12 | 707 | (home-page "https://metacpan.org/release/XML-Simple"))) |
535dc6cf | 708 | |
a2e520af AE |
709 | (define-public perl-xml-regexp |
710 | (package | |
711 | (name "perl-xml-regexp") | |
712 | (version "0.04") | |
713 | (source (origin | |
714 | (method url-fetch) | |
715 | (uri (string-append | |
716 | "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-" | |
717 | version ".tar.gz")) | |
718 | (sha256 | |
719 | (base32 | |
720 | "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz")))) | |
721 | (build-system perl-build-system) | |
722 | (inputs | |
723 | `(("perl-xml-parser" ,perl-xml-parser))) | |
2f3108ad | 724 | (license license:perl-license) |
a2e520af AE |
725 | (synopsis "Perl regular expressions for XML tokens") |
726 | (description | |
727 | "XML::RegExp contains regular expressions for the following XML tokens: | |
728 | BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar, | |
729 | EntityRef, CharRef, Reference, Name, NmToken, and AttValue.") | |
9aba9b12 | 730 | (home-page "https://metacpan.org/release/XML-RegExp"))) |
a2e520af | 731 | |
ad871fc6 AE |
732 | (define-public perl-xml-dom |
733 | (package | |
734 | (name "perl-xml-dom") | |
4e5465f2 | 735 | (version "1.46") |
ad871fc6 AE |
736 | (source (origin |
737 | (method url-fetch) | |
738 | (uri (string-append | |
739 | "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-" | |
740 | version ".tar.gz")) | |
741 | (sha256 | |
742 | (base32 | |
4e5465f2 | 743 | "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb")))) |
ad871fc6 | 744 | (build-system perl-build-system) |
f7faff88 AE |
745 | (propagated-inputs |
746 | `(("perl-libwww" ,perl-libwww) | |
ad871fc6 | 747 | ("perl-libxml" ,perl-libxml) |
4e5465f2 | 748 | ("perl-xml-parser" ,perl-xml-parser) |
ad871fc6 | 749 | ("perl-xml-regexp" ,perl-xml-regexp))) |
2f3108ad | 750 | (license license:perl-license) |
ad871fc6 AE |
751 | (synopsis |
752 | "Perl module for building DOM Level 1 compliant document structures") | |
753 | (description | |
754 | "This module extends the XML::Parser module by Clark Cooper. The | |
755 | XML::Parser module is built on top of XML::Parser::Expat, which is a lower | |
756 | level interface to James Clark's expat library. XML::DOM::Parser is derived | |
757 | from XML::Parser. It parses XML strings or files and builds a data structure | |
758 | that conforms to the API of the Document Object Model.") | |
9aba9b12 | 759 | (home-page "https://metacpan.org/release/XML-DOM"))) |
ad871fc6 | 760 | |
649e1676 RW |
761 | (define-public perl-xml-compile-tester |
762 | (package | |
763 | (name "perl-xml-compile-tester") | |
9af5a513 | 764 | (version "0.91") |
649e1676 RW |
765 | (source (origin |
766 | (method url-fetch) | |
767 | (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" | |
768 | "XML-Compile-Tester-" version ".tar.gz")) | |
769 | (sha256 | |
770 | (base32 | |
9af5a513 | 771 | "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75")))) |
649e1676 RW |
772 | (build-system perl-build-system) |
773 | (propagated-inputs | |
774 | `(("perl-log-report" ,perl-log-report) | |
775 | ("perl-test-deep" ,perl-test-deep))) | |
9aba9b12 | 776 | (home-page "https://metacpan.org/release/XML-Compile-Tester") |
649e1676 RW |
777 | (synopsis "XML::Compile related regression testing") |
778 | (description | |
779 | "The @code{XML::Compile} module suite has extensive regression testing. | |
780 | This module provide functions which simplify writing tests for | |
781 | @code{XML::Compile} related distributions.") | |
2f3108ad | 782 | (license license:perl-license))) |
649e1676 | 783 | |
b494a5f1 RW |
784 | (define-public perl-xml-compile |
785 | (package | |
786 | (name "perl-xml-compile") | |
78ca483a | 787 | (version "1.63") |
b494a5f1 RW |
788 | (source (origin |
789 | (method url-fetch) | |
790 | (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" | |
791 | "XML-Compile-" version ".tar.gz")) | |
792 | (sha256 | |
793 | (base32 | |
78ca483a | 794 | "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b")))) |
b494a5f1 RW |
795 | (build-system perl-build-system) |
796 | (propagated-inputs | |
174988fa TGR |
797 | `(("perl-carp" ,perl-carp) |
798 | ("perl-log-report" ,perl-log-report) | |
b494a5f1 RW |
799 | ("perl-xml-compile-tester" ,perl-xml-compile-tester) |
800 | ("perl-xml-libxml" ,perl-xml-libxml) | |
174988fa TGR |
801 | ("perl-scalar-list-utils" ,perl-scalar-list-utils) |
802 | ("perl-test-deep" ,perl-test-deep) | |
803 | ("perl-types-serialiser" ,perl-types-serialiser))) | |
9aba9b12 | 804 | (home-page "https://metacpan.org/release/XML-Compile") |
b494a5f1 RW |
805 | (synopsis "Compilation-based XML processing") |
806 | (description | |
807 | "@code{XML::Compile} can be used to translate a Perl data-structure into | |
808 | XML or XML into a Perl data-structure, both directions under rigid control by | |
809 | a schema.") | |
2f3108ad | 810 | (license license:perl-license))) |
b494a5f1 | 811 | |
c1d41b5d RW |
812 | (define-public perl-xml-compile-cache |
813 | (package | |
814 | (name "perl-xml-compile-cache") | |
503a0059 | 815 | (version "1.06") |
c1d41b5d RW |
816 | (source (origin |
817 | (method url-fetch) | |
818 | (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" | |
819 | "XML-Compile-Cache-" version ".tar.gz")) | |
820 | (sha256 | |
821 | (base32 | |
503a0059 | 822 | "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr")))) |
c1d41b5d RW |
823 | (build-system perl-build-system) |
824 | (propagated-inputs | |
825 | `(("perl-log-report" ,perl-log-report) | |
826 | ("perl-xml-compile" ,perl-xml-compile) | |
827 | ("perl-xml-compile-tester" ,perl-xml-compile-tester) | |
828 | ("perl-xml-libxml-simple" ,perl-xml-libxml-simple))) | |
9aba9b12 | 829 | (home-page "https://metacpan.org/release/XML-Compile-Cache") |
c1d41b5d RW |
830 | (synopsis "Cache compiled XML translators") |
831 | (description | |
832 | "This package provides methods to cache compiled XML translators.") | |
2f3108ad | 833 | (license license:perl-license))) |
c1d41b5d | 834 | |
baeab9b8 RW |
835 | (define-public perl-xml-compile-soap |
836 | (package | |
837 | (name "perl-xml-compile-soap") | |
1d9b041c | 838 | (version "3.24") |
baeab9b8 RW |
839 | (source (origin |
840 | (method url-fetch) | |
841 | (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" | |
842 | "XML-Compile-SOAP-" version ".tar.gz")) | |
843 | (sha256 | |
844 | (base32 | |
1d9b041c | 845 | "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1")))) |
baeab9b8 RW |
846 | (build-system perl-build-system) |
847 | (propagated-inputs | |
848 | `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny) | |
849 | ("perl-libwww" ,perl-libwww) | |
850 | ("perl-log-report" ,perl-log-report) | |
851 | ("perl-xml-compile" ,perl-xml-compile) | |
852 | ("perl-xml-compile-cache" ,perl-xml-compile-cache) | |
853 | ("perl-xml-compile-tester" ,perl-xml-compile-tester))) | |
9aba9b12 | 854 | (home-page "https://metacpan.org/release/XML-Compile-SOAP") |
baeab9b8 RW |
855 | (synopsis "Base-class for SOAP implementations") |
856 | (description | |
857 | "This module provides a class to handle the SOAP protocol. The first | |
858 | implementation is @url{SOAP1.1, | |
859 | http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often | |
860 | used.") | |
2f3108ad | 861 | (license license:perl-license))) |
baeab9b8 | 862 | |
6a914948 RW |
863 | (define-public perl-xml-compile-wsdl11 |
864 | (package | |
865 | (name "perl-xml-compile-wsdl11") | |
4b4a4f5c | 866 | (version "3.07") |
6a914948 RW |
867 | (source (origin |
868 | (method url-fetch) | |
869 | (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" | |
870 | "XML-Compile-WSDL11-" version ".tar.gz")) | |
871 | (sha256 | |
872 | (base32 | |
4b4a4f5c | 873 | "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba")))) |
6a914948 RW |
874 | (build-system perl-build-system) |
875 | (propagated-inputs | |
876 | `(("perl-log-report" ,perl-log-report) | |
877 | ("perl-xml-compile" ,perl-xml-compile) | |
878 | ("perl-xml-compile-cache" ,perl-xml-compile-cache) | |
879 | ("perl-xml-compile-soap" ,perl-xml-compile-soap))) | |
9aba9b12 | 880 | (home-page "https://metacpan.org/release/XML-Compile-WSDL11") |
6a914948 RW |
881 | (synopsis "Create SOAP messages defined by WSDL 1.1") |
882 | (description | |
883 | "This module understands WSDL version 1.1. A WSDL file defines a set of | |
884 | messages to be send and received over SOAP connections. This involves | |
885 | encoding of the message to be send into XML, sending the message to the | |
886 | server, collect the answer, and finally decoding the XML to Perl.") | |
2f3108ad | 887 | (license license:perl-license))) |
6a914948 | 888 | |
246455c2 | 889 | (define-public perl-xml-feed |
890 | (package | |
891 | (name "perl-xml-feed") | |
8dfdd746 | 892 | (version "0.59") |
246455c2 | 893 | (source (origin |
894 | (method url-fetch) | |
895 | (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/" | |
896 | "XML-Feed-" version ".tar.gz")) | |
897 | (sha256 | |
898 | (base32 | |
8dfdd746 | 899 | "1z1a88bpy64j42bbyl8acbfl3dn9iaz47gx6clkgy5sbn4kr0kgk")))) |
246455c2 | 900 | (build-system perl-build-system) |
246455c2 | 901 | (native-inputs |
902 | `(("perl-module-build" ,perl-module-build) | |
903 | ("perl-uri" ,perl-uri) | |
904 | ("perl-class-data-inheritable" ,perl-class-data-inheritable))) | |
40b793fd | 905 | (propagated-inputs |
246455c2 | 906 | `(("perl-class-errorhandler" ,perl-class-errorhandler) |
907 | ("perl-datetime" ,perl-datetime) | |
f2a53a4a PG |
908 | ("perl-datetime-format-flexible" ,perl-datetime-format-flexible) |
909 | ("perl-datetime-format-iso8601" ,perl-datetime-format-iso8601) | |
246455c2 | 910 | ("perl-datetime-format-mail" ,perl-datetime-format-mail) |
f2a53a4a | 911 | ("perl-datetime-format-natural" ,perl-datetime-format-natural) |
246455c2 | 912 | ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf) |
913 | ("perl-feed-find" ,perl-feed-find) | |
914 | ("perl-html-parser" ,perl-html-parser) | |
915 | ("perl-libwww-perl" ,perl-libwww) | |
916 | ("perl-module-pluggable" ,perl-module-pluggable) | |
917 | ("perl-uri-fetch" ,perl-uri-fetch) | |
918 | ("perl-xml-atom" ,perl-xml-atom) | |
919 | ("perl-xml-libxml" ,perl-xml-libxml) | |
920 | ("perl-xml-rss" ,perl-xml-rss))) | |
9aba9b12 | 921 | (home-page "https://metacpan.org/release/XML-Feed") |
246455c2 | 922 | (synopsis "XML Syndication Feed Support") |
923 | (description "@code{XML::Feed} is a syndication feed parser for both RSS and | |
924 | Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI. | |
925 | @code{XML::Feed} supports the following syndication feed formats: | |
926 | RSS 0.91, RSS 1.0, RSS 2.0, Atom") | |
2f3108ad | 927 | (license license:perl-license))) |
246455c2 | 928 | |
0c1bab36 | 929 | (define-public perl-xml-xpath |
930 | (package | |
931 | (name "perl-xml-xpath") | |
fc82538c | 932 | (version "1.44") |
0c1bab36 | 933 | (source (origin |
934 | (method url-fetch) | |
935 | (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/" | |
936 | "XML-XPath-" version ".tar.gz")) | |
937 | (sha256 | |
938 | (base32 | |
fc82538c | 939 | "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w")))) |
0c1bab36 | 940 | (build-system perl-build-system) |
941 | (native-inputs | |
942 | `(("perl-path-tiny" ,perl-path-tiny))) | |
9332d706 | 943 | (propagated-inputs |
0c1bab36 | 944 | `(("perl-xml-parser" ,perl-xml-parser))) |
9aba9b12 | 945 | (home-page "https://metacpan.org/release/XML-XPath") |
0c1bab36 | 946 | (synopsis "Parse and evaluate XPath statements") |
947 | (description | |
948 | "This module aims to comply exactly to the @url{XPath specification, | |
949 | https://www.w3.org/TR/xpath} and yet allow extensions to be added in | |
950 | the form of functions.") | |
2f3108ad | 951 | (license license:perl-license))) |
0c1bab36 | 952 | |
6ce212b8 RW |
953 | (define-public pugixml |
954 | (package | |
955 | (name "pugixml") | |
bc134c77 | 956 | (version "1.10") |
6ce212b8 RW |
957 | (source |
958 | (origin | |
959 | (method url-fetch) | |
0562a81e EF |
960 | (uri (string-append "https://github.com/zeux/pugixml/releases/download/v" |
961 | version "/pugixml-" version ".tar.gz")) | |
6ce212b8 | 962 | (sha256 |
bc134c77 | 963 | (base32 "02l7nllhydggf7s64d2x84kckbmwag4lsn28sc82953hnkxrkwsm")))) |
6ce212b8 RW |
964 | (build-system cmake-build-system) |
965 | (arguments | |
7fda7b8f | 966 | `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON") |
bc134c77 | 967 | #:tests? #f)) ; no tests |
7fda7b8f MB |
968 | (native-inputs |
969 | `(("pkg-config" ,pkg-config))) | |
28655227 | 970 | (home-page "https://pugixml.org") |
6ce212b8 RW |
971 | (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support") |
972 | (description | |
973 | "pugixml is a C++ XML processing library, which consists of a DOM-like | |
974 | interface with rich traversal/modification capabilities, a fast XML parser | |
975 | which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 | |
976 | implementation for complex data-driven tree queries. Full Unicode support is | |
977 | also available, with Unicode interface variants and conversions between | |
978 | different Unicode encodings which happen automatically during | |
979 | parsing/saving.") | |
980 | (license license:expat))) | |
981 | ||
c2efe1ae MB |
982 | (define-public python-pyxb |
983 | (package | |
984 | (name "python-pyxb") | |
4ef6cfef | 985 | (version "1.2.6") |
c2efe1ae MB |
986 | (source (origin |
987 | (method url-fetch) | |
988 | (uri (pypi-uri "PyXB" version)) | |
989 | (sha256 | |
990 | (base32 | |
4ef6cfef | 991 | "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a")))) |
c2efe1ae MB |
992 | (build-system python-build-system) |
993 | (home-page "http://pyxb.sourceforge.net/") | |
994 | (synopsis "Python XML Schema Bindings") | |
995 | (description | |
996 | "PyXB (\"pixbee\") is a pure Python package that generates Python source | |
997 | code for classes that correspond to data structures defined by XMLSchema.") | |
998 | (license (list license:asl2.0 ; Most files. | |
999 | license:expat ; pyxb/utils/six.py | |
1000 | license:gpl2 ; bundled jquery in doc is dual MIT/GPL2 | |
1001 | license:psfl)))) ; pyxb/utils/activestate.py | |
1002 | ||
1003 | (define-public python2-pyxb | |
1004 | (package-with-python2 python-pyxb)) | |
1005 | ||
37f9ff63 AE |
1006 | (define-public xmlto |
1007 | (package | |
1008 | (name "xmlto") | |
877a6466 | 1009 | (version "0.0.28") |
37f9ff63 AE |
1010 | (source |
1011 | (origin | |
1012 | (method url-fetch) | |
7bc19c92 LF |
1013 | ;; The old source on fedorahosted.org is offline permanently: |
1014 | ;; <https://bugs.gnu.org/25989> | |
1015 | (uri (string-append "mirror://debian/pool/main/x/xmlto/" | |
1016 | "xmlto_" version ".orig.tar.bz2")) | |
1017 | (file-name (string-append name "-" version ".tar.bz2")) | |
37f9ff63 AE |
1018 | (sha256 |
1019 | (base32 | |
877a6466 | 1020 | "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i")))) |
37f9ff63 | 1021 | (build-system gnu-build-system) |
ae0c1202 LC |
1022 | (arguments |
1023 | ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'. | |
1024 | '(#:configure-flags (list (string-append "GETOPT=" | |
1025 | (assoc-ref %build-inputs | |
1026 | "util-linux") | |
1027 | "/bin/getopt")))) | |
14755541 MO |
1028 | (native-inputs |
1029 | `(("util-linux" ,util-linux))) | |
37f9ff63 | 1030 | (inputs |
ae0c1202 LC |
1031 | `(("util-linux" ,util-linux) ; for 'getopt' |
1032 | ("libxml2" ,libxml2) ; for 'xmllint' | |
1033 | ("libxslt" ,libxslt))) ; for 'xsltproc' | |
37f9ff63 AE |
1034 | (home-page "http://cyberelk.net/tim/software/xmlto/") |
1035 | (synopsis "Front-end to an XSL toolchain") | |
1036 | (description | |
1037 | "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate | |
1038 | stylesheet for the conversion you want and applies it using an external | |
1039 | XSL-T processor. It also performs any necessary post-processing.") | |
1040 | (license license:gpl2+))) | |
0899144f AE |
1041 | |
1042 | (define-public xmlsec | |
1043 | (package | |
1044 | (name "xmlsec") | |
f9fee9d3 | 1045 | (version "1.2.30") |
0899144f | 1046 | (source (origin |
50f5aa4b TGR |
1047 | (method url-fetch) |
1048 | (uri (string-append "https://www.aleksey.com/xmlsec/download/" | |
1049 | "xmlsec1-" version ".tar.gz")) | |
1050 | (sha256 | |
1051 | (base32 | |
f9fee9d3 | 1052 | "1j5bf7ni45jghyrbf7a14wx2pvfara557zyry7g7h8840c5kd11d")))) |
0899144f | 1053 | (build-system gnu-build-system) |
50f5aa4b | 1054 | (propagated-inputs ; according to xmlsec1.pc |
0899144f AE |
1055 | `(("libxml2" ,libxml2) |
1056 | ("libxslt" ,libxslt))) | |
1057 | (inputs | |
1058 | `(("gnutls" ,gnutls) | |
1059 | ("libgcrypt" ,libgcrypt) | |
1060 | ("libltdl" ,libltdl))) | |
e4aab734 RW |
1061 | (native-inputs |
1062 | `(("pkg-config" ,pkg-config))) | |
a5b570b4 | 1063 | (home-page "https://www.aleksey.com/xmlsec/") |
0899144f AE |
1064 | (synopsis "XML Security Library") |
1065 | (description | |
1066 | "The XML Security Library is a C library based on Libxml2. It | |
1067 | supports XML security standards such as XML Signature, XML Encryption, | |
1068 | Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of | |
1069 | Libxml2).") | |
1070 | (license (license:x11-style "file://COPYING" | |
1071 | "See 'COPYING' in the distribution.")))) | |
96f8d991 | 1072 | |
b4c9a317 MB |
1073 | (define-public xmlsec-nss |
1074 | (package | |
1075 | (inherit xmlsec) | |
1076 | (name "xmlsec-nss") | |
3825b444 TGR |
1077 | (native-inputs |
1078 | ;; For tests. | |
1079 | `(("nss:bin" ,nss "bin") ; for certutil | |
1080 | ,@(package-native-inputs xmlsec))) | |
b4c9a317 MB |
1081 | (inputs |
1082 | `(("nss" ,nss) | |
1083 | ("libltdl" ,libltdl))) | |
1084 | (synopsis "XML Security Library (using NSS instead of GnuTLS)"))) | |
1085 | ||
96f8d991 RW |
1086 | (define-public minixml |
1087 | (package | |
1088 | (name "minixml") | |
5b59c775 | 1089 | (version "2.12") |
96f8d991 | 1090 | (source (origin |
ee4e439a | 1091 | (method url-fetch) |
eba9ecd4 | 1092 | (uri (string-append "https://github.com/michaelrsweet/mxml/" |
b7cbcee5 | 1093 | "releases/download/v" version |
eba9ecd4 | 1094 | "/mxml-" version ".tar.gz")) |
96f8d991 RW |
1095 | (sha256 |
1096 | (base32 | |
ee4e439a | 1097 | "0kq3wiycb40dcyswvajrqb1n5ffm5xcnsfxxaml92vhpl6x57yvb")))) |
96f8d991 RW |
1098 | (build-system gnu-build-system) |
1099 | (arguments | |
5b59c775 TGR |
1100 | `(#:configure-flags |
1101 | (list (string-append "LDFLAGS=-Wl,-rpath=" | |
1102 | (assoc-ref %outputs "out") "/lib")) | |
b7cbcee5 | 1103 | #:tests? #f)) ; tests are run during build |
eba9ecd4 | 1104 | (home-page "https://michaelrsweet.github.io/mxml") |
96f8d991 RW |
1105 | (synopsis "Small XML parsing library") |
1106 | (description | |
1107 | "Mini-XML is a small C library to read and write XML files and strings in | |
1108 | UTF-8 and UTF-16 encoding.") | |
1109 | ;; LGPL 2.0+ with additional exceptions for static linking | |
1110 | (license license:lgpl2.0+))) | |
33ae9107 DT |
1111 | |
1112 | ;; TinyXML is an unmaintained piece of software, so the patches and build | |
1113 | ;; system massaging have no upstream potential. | |
1114 | (define-public tinyxml | |
1115 | (package | |
1116 | (name "tinyxml") | |
1117 | (version "2.6.2") | |
1118 | (source (origin | |
1119 | (method url-fetch) | |
de67e922 LF |
1120 | (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/" |
1121 | version "/tinyxml_" | |
33ae9107 DT |
1122 | (string-join (string-split version #\.) "_") |
1123 | ".tar.gz")) | |
671249b9 | 1124 | (file-name (string-append name "-" version ".tar.gz")) |
33ae9107 DT |
1125 | (sha256 |
1126 | (base32 | |
1127 | "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m")) | |
fc1adab1 | 1128 | (patches (search-patches "tinyxml-use-stl.patch")))) |
33ae9107 DT |
1129 | (build-system gnu-build-system) |
1130 | ;; This library is missing *a lot* of the steps to make it usable, so we | |
1131 | ;; have to add them here, like every other distro must do. | |
1132 | (arguments | |
1133 | `(#:phases | |
1134 | (modify-phases %standard-phases | |
1135 | (delete 'configure) | |
1136 | (add-after 'build 'build-shared-library | |
1137 | (lambda _ | |
0efb6452 EF |
1138 | (invoke "g++" "-Wall" "-O2" "-shared" "-fpic" |
1139 | "tinyxml.cpp" "tinyxmlerror.cpp" | |
1140 | "tinyxmlparser.cpp" "tinystr.cpp" | |
1141 | "-o" "libtinyxml.so"))) | |
33ae9107 | 1142 | (replace 'check |
0efb6452 | 1143 | (lambda _ (invoke "./xmltest"))) |
33ae9107 DT |
1144 | (replace 'install |
1145 | (lambda* (#:key outputs #:allow-other-keys) | |
1146 | (let* ((out (assoc-ref outputs "out")) | |
1147 | (include (string-append out "/include")) | |
1148 | (lib (string-append out "/lib")) | |
1149 | (pkgconfig (string-append out "/lib/pkgconfig")) | |
1150 | (doc (string-append out "/share/doc"))) | |
1151 | ;; Install libs and headers. | |
1152 | (install-file "libtinyxml.so" lib) | |
1153 | (install-file "tinystr.h" include) | |
1154 | (install-file "tinyxml.h" include) | |
1155 | ;; Generate and install pkg-config file. | |
1156 | (mkdir-p pkgconfig) | |
1157 | ;; Software such as Kodi expect this file to be present, but | |
1158 | ;; it's not provided in the source code. | |
1159 | (call-with-output-file (string-append pkgconfig "/tinyxml.pc") | |
1160 | (lambda (port) | |
1161 | (format port "prefix=~a | |
1162 | exec_prefix=${prefix} | |
1163 | libdir=${exec_prefix}/lib | |
1164 | includedir=${prefix}/include | |
1165 | ||
1166 | Name: TinyXML | |
1167 | Description: A simple, small, C++ XML parser | |
1168 | Version: ~a | |
1169 | Libs: -L${libdir} -ltinyxml | |
1170 | Cflags: -I${includedir} | |
1171 | " | |
1172 | out ,version))) | |
1173 | ;; Install docs. | |
1174 | (mkdir-p doc) | |
1175 | (copy-recursively "docs" (string-append doc "tinyxml")) | |
1176 | #t)))))) | |
1177 | (synopsis "Small XML parser for C++") | |
1178 | (description "TinyXML is a small and simple XML parsing library for the | |
05077200 | 1179 | C++ programming language.") |
33ae9107 DT |
1180 | (home-page "http://www.grinninglizard.com/tinyxml/index.html") |
1181 | (license license:zlib))) | |
fe9451c5 | 1182 | |
931bd7f6 TGR |
1183 | (define-public tinyxml2 |
1184 | (package | |
1185 | (name "tinyxml2") | |
70d1e971 | 1186 | (version "8.0.0") |
931bd7f6 TGR |
1187 | (source |
1188 | (origin | |
4bad4fbd TGR |
1189 | (method git-fetch) |
1190 | (uri (git-reference | |
b0e7b699 | 1191 | (url "https://github.com/leethomason/tinyxml2") |
4bad4fbd TGR |
1192 | (commit version))) |
1193 | (file-name (git-file-name name version)) | |
931bd7f6 | 1194 | (sha256 |
70d1e971 | 1195 | (base32 "0raa8r2hsagk7gjlqjwax95ib8d47ba79n91r4aws2zg8y6ssv1d")))) |
931bd7f6 | 1196 | (build-system cmake-build-system) |
931bd7f6 TGR |
1197 | (synopsis "Small XML parser for C++") |
1198 | (description "TinyXML2 is a small and simple XML parsing library for the | |
1199 | C++ programming language.") | |
1200 | (home-page "http://www.grinninglizard.com/tinyxml2/") | |
1201 | (license license:zlib))) | |
1202 | ||
fe9451c5 RG |
1203 | (define-public xmlstarlet |
1204 | (package | |
1205 | (name "xmlstarlet") | |
1206 | (version "1.6.1") | |
1207 | (source | |
1208 | (origin | |
1209 | (method url-fetch) | |
1210 | (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/" | |
1211 | version "/xmlstarlet-" version ".tar.gz")) | |
1212 | (sha256 | |
1213 | (base32 | |
1214 | "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m")))) | |
1215 | (build-system gnu-build-system) | |
22ea0235 MB |
1216 | (arguments |
1217 | '(#:phases | |
1218 | (modify-phases %standard-phases | |
1219 | (add-before 'check 'drop-failing-tests | |
1220 | (lambda _ | |
1221 | ;; FIXME: Why are these tests failing. | |
1222 | (substitute* "Makefile" | |
1223 | (("^examples/schema1\\\\") "\\") | |
1224 | (("^examples/valid1\\\\") "\\")) | |
1225 | #t))))) | |
fe9451c5 RG |
1226 | (inputs |
1227 | `(("libxslt" ,libxslt) | |
1228 | ("libxml2" ,libxml2))) | |
1229 | (home-page "http://xmlstar.sourceforge.net/") | |
1230 | (synopsis "Command line XML toolkit") | |
1231 | (description "XMLStarlet is a set of command line utilities which can be | |
1232 | used to transform, query, validate, and edit XML documents. XPath is used to | |
1233 | match and extract data, and elements can be added, deleted or modified using | |
1234 | XSLT and EXSLT.") | |
1235 | (license license:x11))) | |
19c33040 | 1236 | |
767d24e8 SR |
1237 | (define-public html-xml-utils |
1238 | (package | |
1239 | (name "html-xml-utils") | |
bafafa80 | 1240 | (version "7.8") |
767d24e8 SR |
1241 | (source |
1242 | (origin | |
1243 | (method url-fetch) | |
1244 | (uri (string-append | |
1245 | "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-" | |
1246 | version ".tar.gz")) | |
1247 | (sha256 | |
bafafa80 | 1248 | (base32 "0p8df3c6mw879vdi8l63kbdqylkf1is10b067mh9kipgfy91rd4s")))) |
767d24e8 SR |
1249 | (build-system gnu-build-system) |
1250 | (home-page "https://www.w3.org/Tools/HTML-XML-utils/") | |
1251 | (synopsis "Command line utilities to manipulate HTML and XML files") | |
1252 | (description "HTML-XML-utils provides a number of simple utilities for | |
1253 | manipulating and converting HTML and XML files in various ways. The suite | |
1254 | consists of the following tools: | |
1255 | ||
1256 | @itemize | |
1257 | @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities | |
1258 | @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8} | |
1259 | @item @command{hxaddid} add IDs to selected elements | |
1260 | @item @command{hxcite} replace bibliographic references by hyperlinks | |
1261 | @item @command{hxcite} mkbib - expand references and create bibliography | |
1262 | @item @command{hxclean} apply heuristics to correct an HTML file | |
1263 | @item @command{hxcopy} copy an HTML file while preserving relative links | |
1264 | @item @command{hxcount} count elements and attributes in HTML or XML files | |
1265 | @item @command{hxextract} extract selected elements | |
1266 | @item @command{hxincl} expand included HTML or XML files | |
1267 | @item @command{hxindex} create an alphabetically sorted index | |
1268 | @item @command{hxmkbib} create bibliography from a template | |
1269 | @item @command{hxmultitoc} create a table of contents for a set of HTML files | |
1270 | @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A | |
1271 | elements to their parents | |
1272 | @item @command{hxnormalize} pretty-print an HTML file | |
1273 | @item @command{hxnsxml} convert output of hxxmlns back to normal XML | |
1274 | @item @command{hxnum} number section headings in an HTML file | |
1275 | @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK | |
1276 | @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file | |
1277 | @item @command{hxprune} remove marked elements from an HTML file | |
1278 | @item @command{hxref} generate cross-references | |
1279 | @item @command{hxselect} extract elements that match a (CSS) selector | |
1280 | @item @command{hxtoc} insert a table of contents in an HTML file | |
1281 | @item @command{hxuncdata} replace CDATA sections by character entities | |
1282 | @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8} | |
1283 | @item @command{hxunpipe} convert output of pipe back to XML format | |
1284 | @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes | |
1285 | @item @command{hxwls} list links in an HTML file | |
1286 | @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\" | |
1287 | @end itemize | |
1288 | ") | |
1289 | (license license:expat))) | |
1290 | ||
19c33040 JN |
1291 | (define-public xlsx2csv |
1292 | (package | |
1293 | (name "xlsx2csv") | |
3255fc3b | 1294 | (version "0.7.4") |
3047c7ba TGR |
1295 | (source |
1296 | (origin | |
1297 | (method git-fetch) | |
1298 | (uri (git-reference | |
b0e7b699 | 1299 | (url "https://github.com/dilshod/xlsx2csv") |
3047c7ba TGR |
1300 | (commit version))) |
1301 | (file-name (git-file-name name version)) | |
1302 | (sha256 | |
1303 | (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939")))) | |
19c33040 JN |
1304 | (build-system python-build-system) |
1305 | (arguments | |
3255fc3b | 1306 | `(#:python ,python-2 ; use python-2 for the test script |
19c33040 JN |
1307 | #:phases |
1308 | (modify-phases %standard-phases | |
1309 | (replace 'check | |
1310 | (lambda _ | |
1311 | (substitute* "test/run" | |
3255fc3b | 1312 | ;; Run tests with `python' only. |
19c33040 | 1313 | (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']"))) |
aa6f87a2 | 1314 | (invoke "test/run")))))) |
19c33040 JN |
1315 | (home-page "https://github.com/dilshod/xlsx2csv") |
1316 | (synopsis "XLSX to CSV converter") | |
1317 | (description | |
1318 | "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and | |
1319 | XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV) | |
1320 | files. It is designed to be fast and to handle large input files.") | |
1321 | (license license:gpl2+))) | |
d2b51c08 | 1322 | |
1323 | (define-public python-defusedxml | |
1324 | (package | |
1325 | (name "python-defusedxml") | |
4ee948e3 | 1326 | (version "0.6.0") |
d2b51c08 | 1327 | (source |
1328 | (origin | |
1329 | (method url-fetch) | |
1330 | (uri (pypi-uri "defusedxml" version)) | |
1331 | (sha256 | |
1332 | (base32 | |
4ee948e3 | 1333 | "1xbp8fivl3wlbyg2jrvs4lalaqv1xp9a9f29p75wdx2s2d6h717n")))) |
d2b51c08 | 1334 | (build-system python-build-system) |
1335 | (home-page "https://bitbucket.org/tiran/defusedxml") | |
1336 | (synopsis "XML bomb protection for Python stdlib modules") | |
1337 | (description | |
1338 | "Defusedxml provides XML bomb protection for Python stdlib modules.") | |
1339 | (license license:psfl))) | |
1340 | ||
1341 | (define-public python2-defusedxml | |
1342 | (package-with-python2 python-defusedxml)) | |
ca8f3f9a | 1343 | |
623fb4d1 AP |
1344 | (define-public freexl |
1345 | (package | |
1346 | (name "freexl") | |
5275f69e | 1347 | (version "1.0.5") |
623fb4d1 AP |
1348 | (source (origin |
1349 | (method url-fetch) | |
1350 | (uri (string-append "http://www.gaia-gis.it/gaia-sins/" | |
1351 | name "-" version ".tar.gz")) | |
1352 | (sha256 | |
1353 | (base32 | |
5275f69e | 1354 | "03bmwq6hngmzwpqpb7c2amqlspz4q69iv96nlf0f5c0qs98b3j9x")))) |
623fb4d1 AP |
1355 | (build-system gnu-build-system) |
1356 | (home-page "https://www.gaia-gis.it/fossil/freexl/index") | |
1357 | (synopsis "Read Excel files") | |
1358 | (description | |
1359 | "FreeXL is a C library to extract valid data from within an Excel (.xls) | |
1360 | spreadsheet.") | |
1361 | ;; Any of these licenses may be picked. | |
1362 | (license (list license:gpl2+ | |
1363 | license:lgpl2.1+ | |
1364 | license:mpl1.1)))) | |
d00d6cea RW |
1365 | |
1366 | (define-public xerces-c | |
1367 | (package | |
1368 | (name "xerces-c") | |
3e7a4867 | 1369 | (version "3.2.3") |
d00d6cea RW |
1370 | (source (origin |
1371 | (method url-fetch) | |
1372 | (uri (string-append "mirror://apache/xerces/c/3/sources/" | |
1373 | "xerces-c-" version ".tar.xz")) | |
1374 | (sha256 | |
1375 | (base32 | |
3e7a4867 | 1376 | "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j")))) |
d00d6cea RW |
1377 | (build-system gnu-build-system) |
1378 | (arguments | |
1379 | (let ((system (or (%current-target-system) | |
1380 | (%current-system)))) | |
1381 | (if (string-prefix? "x86_64" system) | |
1382 | '() | |
1383 | '(#:configure-flags '("--disable-sse2"))))) | |
1384 | (native-inputs | |
1385 | `(("perl" ,perl))) | |
c61bfa08 | 1386 | (home-page "https://xerces.apache.org/xerces-c/") |
d00d6cea RW |
1387 | (synopsis "Validating XML parser library for C++") |
1388 | (description "Xerces-C++ is a validating XML parser written in a portable | |
1389 | subset of C++. Xerces-C++ makes it easy to give your application the ability | |
1390 | to read and write XML data. A shared library is provided for parsing, | |
1391 | generating, manipulating, and validating XML documents using the DOM, SAX, and | |
1392 | SAX2 APIs.") | |
1393 | (license license:asl2.0))) | |
77d7b57c RW |
1394 | |
1395 | (define-public java-simple-xml | |
1396 | (package | |
1397 | (name "java-simple-xml") | |
1398 | (version "2.7.1") | |
1399 | (source (origin | |
1400 | (method url-fetch) | |
1401 | (uri (string-append "mirror://sourceforge/simple/simple-xml-" | |
1402 | version ".zip")) | |
1403 | (sha256 | |
1404 | (base32 | |
3c274149 GB |
1405 | "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5")) |
1406 | (patches (search-patches "java-simple-xml-fix-tests.patch")))) | |
77d7b57c RW |
1407 | (build-system ant-build-system) |
1408 | (arguments | |
1409 | `(#:build-target "build" | |
1410 | #:test-target "test" | |
1411 | #:phases | |
1412 | (modify-phases %standard-phases | |
1413 | (replace 'install (install-jars "jar"))))) | |
1414 | (native-inputs | |
1415 | `(("unzip" ,unzip))) | |
1416 | (home-page "http://simple.sourceforge.net/") | |
1417 | (synopsis "XML serialization framework for Java") | |
1418 | (description "Simple is a high performance XML serialization and | |
1419 | configuration framework for Java. Its goal is to provide an XML framework | |
1420 | that enables rapid development of XML configuration and communication systems. | |
1421 | This framework aids the development of XML systems with minimal effort and | |
1422 | reduced errors. It offers full object serialization and deserialization, | |
1423 | maintaining each reference encountered.") | |
1424 | (license license:asl2.0))) | |
3b695802 P |
1425 | |
1426 | (define-public perl-xml-xpathengine | |
1427 | (package | |
1428 | (name "perl-xml-xpathengine") | |
1429 | (version "0.14") | |
1430 | (source (origin | |
1431 | (method url-fetch) | |
1432 | (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/" | |
1433 | "XML-XPathEngine-" version ".tar.gz")) | |
1434 | (sha256 | |
1435 | (base32 | |
1436 | "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj")))) | |
1437 | (build-system perl-build-system) | |
9aba9b12 | 1438 | (home-page "https://metacpan.org/release/XML-XPathEngine") |
3b695802 P |
1439 | (synopsis "Re-usable XPath engine for DOM-like trees") |
1440 | (description | |
1441 | "This module provides an XPath engine, that can be re-used by other | |
1442 | modules/classes that implement trees. | |
1443 | ||
2847df6b | 1444 | In order to use the XPath engine, nodes in the user module need to mimic DOM |
3b695802 P |
1445 | nodes. The degree of similitude between the user tree and a DOM dictates how |
1446 | much of the XPath features can be used. A module implementing all of the DOM | |
1447 | should be able to use this module very easily (you might need to add the | |
1448 | @code{cmp} method on nodes in order to get ordered result sets).") | |
1449 | (license license:perl-license))) | |
9e1c3581 P |
1450 | |
1451 | (define-public perl-tree-xpathengine | |
1452 | (package | |
1453 | (name "perl-tree-xpathengine") | |
1454 | (version "0.05") | |
1455 | (source (origin | |
1456 | (method url-fetch) | |
1457 | (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/" | |
1458 | "Tree-XPathEngine-" version ".tar.gz")) | |
1459 | (sha256 | |
1460 | (base32 | |
1461 | "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9")))) | |
1462 | (build-system perl-build-system) | |
9aba9b12 | 1463 | (home-page "https://metacpan.org/release/Tree-XPathEngine") |
9e1c3581 P |
1464 | (synopsis "Re-usable XPath engine") |
1465 | (description | |
1466 | "This module provides an XPath engine, that can be re-used by other | |
1467 | module/classes that implement trees. It is designed to be compatible with | |
1468 | @code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath} | |
1469 | by @code{Tree::XPathEngine}.") | |
1470 | (license license:perl-license))) | |
b7c59195 P |
1471 | |
1472 | (define-public perl-xml-filter-buffertext | |
1473 | (package | |
1474 | (name "perl-xml-filter-buffertext") | |
1475 | (version "1.01") | |
1476 | (source | |
1477 | (origin | |
1478 | (method url-fetch) | |
1479 | (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/" | |
1480 | "XML-Filter-BufferText-" version ".tar.gz")) | |
1481 | (sha256 | |
1482 | (base32 | |
1483 | "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg")))) | |
1484 | (build-system perl-build-system) | |
1485 | (propagated-inputs | |
1486 | `(("perl-xml-sax-base" ,perl-xml-sax-base))) | |
9aba9b12 | 1487 | (home-page "https://metacpan.org/release/XML-Filter-BufferText") |
b7c59195 P |
1488 | (synopsis "Filter to put all characters() in one event") |
1489 | (description "This is a very simple filter. One common cause of | |
1490 | grief (and programmer error) is that XML parsers aren't required to provide | |
1491 | character events in one chunk. They can, but are not forced to, and most | |
1492 | don't. This filter does the trivial but oft-repeated task of putting all | |
1493 | characters into a single event.") | |
1494 | (license license:perl-license))) | |
33b592ee P |
1495 | |
1496 | (define-public perl-xml-sax-writer | |
1497 | (package | |
1498 | (name "perl-xml-sax-writer") | |
1499 | (version "0.57") | |
1500 | (source (origin | |
1501 | (method url-fetch) | |
1502 | (uri (string-append | |
1503 | "mirror://cpan/authors/id/P/PE/PERIGRIN/" | |
1504 | "XML-SAX-Writer-" version ".tar.gz")) | |
1505 | (sha256 | |
1506 | (base32 | |
1507 | "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x")))) | |
1508 | (build-system perl-build-system) | |
1509 | (propagated-inputs | |
1510 | `(("perl-libxml" ,perl-libxml) | |
1511 | ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext) | |
c695fb76 | 1512 | ("perl-xml-namespacesupport" ,perl-xml-namespacesupport) |
33b592ee | 1513 | ("perl-xml-sax-base" ,perl-xml-sax-base))) |
9aba9b12 | 1514 | (home-page "https://metacpan.org/release/XML-SAX-Writer") |
33b592ee P |
1515 | (synopsis "SAX2 XML Writer") |
1516 | (description | |
1517 | "This is an XML writer that understands SAX2. It is based on | |
1518 | @code{XML::Handler::YAWriter}.") | |
1519 | (license license:perl-license))) | |
9e88b210 P |
1520 | |
1521 | (define-public perl-xml-handler-yawriter | |
1522 | (package | |
1523 | (name "perl-xml-handler-yawriter") | |
1524 | (version "0.23") | |
1525 | (source | |
1526 | (origin | |
1527 | (method url-fetch) | |
1528 | (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/" | |
1529 | "XML-Handler-YAWriter-" version ".tar.gz")) | |
1530 | (sha256 | |
1531 | (base32 | |
1532 | "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77")))) | |
1533 | (build-system perl-build-system) | |
1534 | (propagated-inputs | |
1535 | `(("perl-libxml" ,perl-libxml))) | |
9aba9b12 | 1536 | (home-page "https://metacpan.org/release/XML-Handler-YAWriter") |
9e88b210 P |
1537 | (synopsis "Yet another Perl SAX XML Writer") |
1538 | (description "YAWriter implements Yet Another @code{XML::Handler::Writer}. | |
1539 | It provides a flexible escaping technique and pretty printing.") | |
1540 | (license license:perl-license))) | |
85f225fb P |
1541 | |
1542 | (define-public perl-xml-twig | |
1543 | (package | |
1544 | (name "perl-xml-twig") | |
1545 | (version "3.52") | |
1546 | (source (origin | |
1547 | (method url-fetch) | |
1548 | (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/" | |
1549 | "XML-Twig-" version ".tar.gz")) | |
1550 | (sha256 | |
1551 | (base32 | |
1552 | "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy")))) | |
1553 | (build-system perl-build-system) | |
1554 | (inputs | |
1555 | `(("expat" ,expat))) | |
1556 | (propagated-inputs | |
1557 | `(("perl-html-tidy" ,perl-html-tidy) | |
1558 | ("perl-html-tree" ,perl-html-tree) | |
1559 | ("perl-io-captureoutput" ,perl-io-captureoutput) | |
1560 | ("perl-io-string" ,perl-io-string) | |
1561 | ("perl-io-stringy" ,perl-io-stringy) | |
1562 | ("perl-libxml" ,perl-libxml) | |
1563 | ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext) | |
1564 | ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter) | |
1565 | ("perl-xml-parser" ,perl-xml-parser) | |
1566 | ("perl-xml-sax-writer" ,perl-xml-sax-writer) | |
1567 | ("perl-xml-simple" ,perl-xml-simple) | |
1568 | ("perl-xml-xpathengine" ,perl-xml-xpathengine) | |
c695fb76 | 1569 | ("perl-test-pod" ,perl-test-pod) |
85f225fb | 1570 | ("perl-tree-xpathengine" ,perl-tree-xpathengine))) |
9aba9b12 | 1571 | (home-page "https://metacpan.org/release/XML-Twig") |
85f225fb P |
1572 | (synopsis "Perl module for processing huge XML documents in tree mode") |
1573 | (description "@code{XML::Twig} is an XML transformation module. Its | |
1574 | strong points: can be used to process huge documents while still being in tree | |
1575 | mode; not bound by DOM or SAX, so it is very perlish and offers a very | |
1576 | comprehensive set of methods; simple to use; DWIMs as much as possible. | |
1577 | ||
1578 | What it doesn't offer: full SAX support (it can export SAX, but only reads | |
1579 | XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM | |
1580 | support.") | |
1581 | (license license:perl-license))) | |
1a17ca26 JL |
1582 | |
1583 | ;; TODO: Debian builds several jars out of this: jaxp-1.4.jar, | |
1584 | ;; xml-apis.jar and xml-apis-1.4.01.jar. | |
1585 | (define-public java-jaxp | |
1586 | (package | |
1587 | (name "java-jaxp") | |
1588 | (version "1.4.01") | |
1589 | (source | |
1590 | (origin | |
1591 | (method url-fetch) | |
1592 | (uri (string-append "mirror://apache/xerces/xml-commons/source/" | |
1593 | "xml-commons-external-" version "-src.tar.gz")) | |
1594 | (sha256 | |
1595 | (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk")))) | |
1596 | (build-system ant-build-system) | |
1597 | (arguments | |
1598 | `(#:jar-name "jaxp.jar" | |
1599 | #:jdk ,icedtea-8 | |
1600 | #:source-dir ".." | |
1601 | #:tests? #f)); no tests | |
1602 | (home-page "http://xerces.apache.org/xml-commons/") | |
1603 | (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)") | |
1604 | (description "Jaxp from the Apache XML Commons project is used by | |
1605 | the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs: | |
1606 | ||
1607 | @itemize | |
1608 | @item Document Object Model (DOM) | |
1609 | @item Simple API for XML (SAX) | |
1610 | @item Java APIs for XML Processing (JAXP) | |
1611 | @item Transformation API for XML (TrAX) | |
1612 | @item Document Object Model (DOM) Load and Save | |
1613 | @item JSR 206 Java API for XML Processing | |
1614 | @end itemize") | |
1615 | (license (list license:asl2.0 | |
1616 | license:w3c ;; Files under org.w3c | |
1617 | license:public-domain)))) ;; org.xml.sax | |
9a86ee78 JL |
1618 | |
1619 | (define-public java-apache-xml-commons-resolver | |
1620 | (package | |
1621 | (name "java-apache-xml-commons-resolver") | |
1622 | (version "1.2") | |
1623 | (source | |
1624 | (origin | |
1625 | (method url-fetch) | |
1626 | (uri (string-append "mirror://apache/xerces/xml-commons/" | |
1627 | "xml-commons-resolver-" version ".tar.gz")) | |
1628 | (sha256 | |
1629 | (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm")) | |
1630 | (modules '((guix build utils))) | |
1631 | (snippet | |
1632 | '(begin | |
1633 | (for-each delete-file (find-files "." ".*\\.(jar|zip)")) | |
1634 | #t)))) | |
1635 | (build-system ant-build-system) | |
1636 | (arguments | |
1637 | `(#:jar-name (string-append "xml-resolver.jar") | |
1638 | #:tests? #f)); no tests | |
1639 | (inputs | |
1640 | `(("java-junit" ,java-junit))) | |
1641 | (home-page "http://xerces.apache.org/xml-commons/") | |
1642 | (synopsis "Catalog-based entity and URI resolution") | |
1643 | (description "The resolver class implements the full semantics of OASIS Technical | |
1644 | Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug | |
1645 | 2001 Committee Specification of OASIS XML Catalogs. | |
1646 | ||
1647 | It also includes a framework of classes designed to read catalog files | |
1648 | in a number of formats: | |
1649 | ||
1650 | @itemize | |
1651 | @item The plain-text flavor described by TR9401. | |
1652 | @item The XCatalog XML format defined by John Cowan | |
1653 | @item The XML Catalog format defined by the OASIS Entity Resolution | |
1654 | Technical Committee. | |
1655 | @end itemize") | |
1656 | (license license:asl2.0))) | |
7eae94d8 JL |
1657 | |
1658 | ;; Jaxen requires java-dom4j and java-xom that in turn require jaxen. | |
1659 | ;; This package is a bootstrap version without dependencies on dom4j and xom. | |
1660 | (define java-jaxen-bootstrap | |
1661 | (package | |
1662 | (name "java-jaxen-bootstrap") | |
1663 | (version "1.1.6") | |
1664 | (source (origin | |
1665 | (method url-fetch) | |
1666 | ;; No release on github | |
1667 | (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/" | |
1668 | version "/jaxen-" version "-sources.jar")) | |
1669 | (sha256 | |
1670 | (base32 | |
1671 | "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx")))) | |
1672 | (build-system ant-build-system) | |
1673 | (arguments | |
1674 | `(#:jar-name "jaxen.jar" | |
1675 | #:source-dir "src" | |
1676 | #:tests? #f; no tests | |
1677 | #:phases | |
1678 | (modify-phases %standard-phases | |
1679 | (add-before 'build 'remove-dom4j | |
1680 | (lambda _ | |
1681 | (delete-file-recursively "src/org/jaxen/dom4j") | |
1682 | (delete-file-recursively "src/org/jaxen/xom") | |
1683 | #t))))) | |
1684 | (inputs | |
1685 | `(("java-jdom" ,java-jdom))) | |
1686 | (home-page "https://github.com/jaxen-xpath/jaxen") | |
1687 | (synopsis "XPath library") | |
1688 | (description "Jaxen is an XPath library written in Java. It is adaptable | |
1689 | to many different object models, including DOM, XOM, dom4j, and JDOM. It is | |
1690 | also possible to write adapters that treat non-XML trees such as compiled | |
1691 | Java byte code or Java beans as XML, thus enabling you to query these trees | |
1692 | with XPath too.") | |
1693 | (license license:bsd-3))) | |
5552080d | 1694 | |
be0524f4 JL |
1695 | (define-public java-jaxen |
1696 | (package | |
1697 | (inherit java-jaxen-bootstrap) | |
1698 | (name "java-jaxen") | |
1699 | (inputs | |
1700 | `(("java-jdom" ,java-jdom) | |
1701 | ("java-xom" ,java-xom) | |
1702 | ("java-dom4j" ,java-dom4j))))) | |
1703 | ||
5552080d JL |
1704 | (define-public java-xom |
1705 | (package | |
1706 | (name "java-xom") | |
1707 | (version "127") | |
1708 | (source (origin | |
eed5e162 TGR |
1709 | (method git-fetch) |
1710 | (uri (git-reference | |
b0e7b699 | 1711 | (url "https://github.com/elharo/xom") |
eed5e162 TGR |
1712 | (commit (string-append "XOM_" version)))) |
1713 | (file-name (git-file-name name version)) | |
5552080d JL |
1714 | (sha256 |
1715 | (base32 | |
eed5e162 | 1716 | "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq")) |
5552080d JL |
1717 | (modules '((guix build utils))) |
1718 | (snippet | |
1719 | '(begin | |
1720 | (for-each delete-file | |
1721 | (find-files "." "\\.jar$")) | |
1722 | #t)))) | |
1723 | (build-system ant-build-system) | |
1724 | (arguments | |
1725 | `(#:jar-name "xom.jar" | |
1726 | #:jdk ,icedtea-8 | |
eed5e162 | 1727 | #:tests? #f ; no tests |
5552080d JL |
1728 | #:phases |
1729 | (modify-phases %standard-phases | |
eed5e162 TGR |
1730 | (add-after 'unpack 'make-git-checkout-writable |
1731 | (lambda _ | |
1732 | (for-each make-file-writable (find-files ".")) | |
1733 | #t)) | |
5552080d JL |
1734 | (add-before 'configure 'fix-tagsoup-dep |
1735 | (lambda _ | |
1736 | ;; FIXME: Where is tagsoup source? | |
1737 | (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java") | |
1738 | #t))))) | |
1739 | (inputs | |
1740 | `(("java-jdom" ,java-jdom) | |
1741 | ("java-junit" ,java-junit) | |
1742 | ("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
1743 | ("java-jaxen-bootstrap" ,java-jaxen-bootstrap) | |
1744 | ("java-xerces" ,java-xerces))) | |
1745 | (home-page "https://xom.nu/") | |
1746 | (synopsis "XML Object Model") | |
1747 | (description "XOM is a new XML Object Model for processing XML with Java | |
1748 | that strives for correctness and simplicity.") | |
1749 | ;; 2.1 only | |
1750 | (license license:lgpl2.1))) | |
96f31935 JL |
1751 | |
1752 | (define-public java-xsdlib | |
1753 | (package | |
1754 | (name "java-xsdlib") | |
1755 | (version "2013.2") | |
1756 | (source (origin | |
1757 | (method url-fetch) | |
c3d56df5 | 1758 | (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/" |
96f31935 JL |
1759 | "datatype/xsd/xsdlib/" version "/xsdlib-" |
1760 | version "-sources.jar")) | |
1761 | (sha256 | |
1762 | (base32 | |
1763 | "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim")))) | |
1764 | (build-system ant-build-system) | |
1765 | (arguments | |
1766 | `(#:tests? #f; no tests | |
1767 | #:jar-name "xsdlib.jar" | |
1768 | #:jdk ,icedtea-8)) | |
1769 | (inputs | |
1770 | `(("java-xerces" ,java-xerces))) | |
c3d56df5 BH |
1771 | (home-page (string-append "https://web.archive.org/web/20161127144537/" |
1772 | "https://msv.java.net//")) | |
96f31935 JL |
1773 | (synopsis "Sun Multi-Schema Validator") |
1774 | (description "Xsdlib contains an implementation of sun.com.msv, an XML | |
1775 | validator.") | |
1776 | (license license:bsd-2))) | |
82d7d4e1 JL |
1777 | |
1778 | (define-public java-xpp3 | |
1779 | (package | |
1780 | (name "java-xpp3") | |
1781 | (version "1.1.4") | |
1782 | (source (origin | |
1783 | (method url-fetch) | |
1784 | (uri (string-append "http://www.extreme.indiana.edu/dist/" | |
1785 | "java-repository/xpp3/distributions/xpp3-" | |
1786 | version "_src.tgz")) | |
1787 | (sha256 | |
1788 | (base32 | |
1789 | "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p")) | |
1790 | (modules '((guix build utils))) | |
1791 | (snippet | |
1792 | '(begin ;; Delete bundled jar archives. | |
1793 | (for-each delete-file (find-files "." ".*\\.jar")) | |
1794 | #t)))) | |
1795 | (build-system ant-build-system) | |
1796 | (arguments | |
1797 | `(#:tests? #f; no tests | |
1798 | #:build-target "jar" | |
1799 | #:phases | |
1800 | (modify-phases %standard-phases | |
1801 | (replace 'install (install-jars "build"))))) | |
1802 | (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/") | |
1803 | (synopsis "Streaming pull XML parser") | |
1804 | (description "Xml Pull Parser (in short XPP) is a streaming pull XML | |
1805 | parser and should be used when there is a need to process quickly and | |
1806 | efficiently all input elements (for example in SOAP processors). This | |
1807 | package is a stable XmlPull parsing engine that is based on ideas from XPP | |
1808 | and in particular XPP2 but completely revised and rewritten to take the best | |
1809 | advantage of JIT JVMs.") | |
1810 | (license (license:non-copyleft "file://LICENSE.txt")))) | |
9421f682 JL |
1811 | |
1812 | (define-public java-xmlpull2 | |
1813 | (package | |
1814 | (name "java-xmlpull2") | |
1815 | (version "2.1.10") | |
1816 | (source (origin | |
1817 | (method url-fetch) | |
1818 | (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/" | |
1819 | "PullParser/PullParser" version ".tgz")) | |
1820 | (sha256 | |
1821 | (base32 | |
1822 | "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md")) | |
1823 | (modules '((guix build utils))) | |
1824 | (snippet | |
1825 | '(begin ;; Delete bundled jar archives. | |
1826 | (for-each delete-file (find-files "." ".*\\.jar")) | |
1827 | #t)))) | |
1828 | (build-system ant-build-system) | |
1829 | (arguments | |
1830 | `(#:tests? #f; no tests | |
1831 | #:build-target "impl" | |
1832 | #:phases | |
1833 | (modify-phases %standard-phases | |
1834 | (replace 'install (install-jars "build/lib"))))) | |
1835 | (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/") | |
1836 | (synopsis "Streaming pull XML parser") | |
1837 | (description "Xml Pull Parser (in short XPP) is a streaming pull XML | |
1838 | parser and should be used when there is a need to process quickly and | |
1839 | efficiently all input elements (for example in SOAP processors). This | |
1840 | package is in maintenance mode.") | |
1841 | (license (license:non-copyleft "file:///LICENSE.txt")))) | |
605c23df JL |
1842 | |
1843 | (define-public java-dom4j | |
1844 | (package | |
1845 | (name "java-dom4j") | |
f1afdaf4 | 1846 | (version "2.1.1") |
605c23df | 1847 | (source (origin |
9d670526 TGR |
1848 | (method git-fetch) |
1849 | (uri (git-reference | |
b0e7b699 | 1850 | (url "https://github.com/dom4j/dom4j") |
9d670526 TGR |
1851 | (commit (string-append "version-" version)))) |
1852 | (file-name (git-file-name name version)) | |
605c23df JL |
1853 | (sha256 |
1854 | (base32 | |
f1afdaf4 | 1855 | "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl")) |
605c23df JL |
1856 | (modules '((guix build utils))) |
1857 | (snippet | |
1858 | '(begin ;; Delete bundled jar archives. | |
1859 | (for-each delete-file (find-files "." ".*\\.jar")) | |
1860 | #t)))) | |
1861 | (build-system ant-build-system) | |
1862 | (arguments | |
1863 | `(#:jar-name "dom4j.jar" | |
1864 | #:jdk ,icedtea-8 | |
1865 | #:source-dir "src/main/java" | |
1866 | ;; FIXME: Requires xalan, but xalan depends on java-cup which has a | |
1867 | ;; dependency on itself through jflex. | |
1868 | #:tests? #f | |
1869 | #:phases | |
1870 | (modify-phases %standard-phases | |
1871 | (add-before 'build 'copy-jaxen-sources | |
1872 | ;; java-jaxen-bootstrap is not enough. These files have a circular | |
1873 | ;; dependency and there is no subset of dom4j that would allow | |
1874 | ;; breaking the circle. | |
1875 | (lambda* (#:key inputs #:allow-other-keys) | |
1876 | (mkdir-p "jaxen-sources") | |
1877 | (with-directory-excursion "jaxen-sources" | |
1878 | (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources"))) | |
1879 | (mkdir-p "src/main/java/org/jaxen/dom4j") | |
1880 | (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java" | |
1881 | "src/main/java/org/jaxen/dom4j/DocumentNavigator.java") | |
1882 | (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java" | |
1883 | "src/main/java/org/jaxen/dom4j/Dom4jXPath.java") | |
1884 | #t)) | |
1885 | (add-before 'build 'fix-old-xpp2 | |
1886 | (lambda _ | |
1887 | ;; This package normally depends on xpp2 2.0, but version 2.1.10 | |
1888 | ;; is the only version whose source code is published. | |
1889 | (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java" | |
1890 | (("public void resetStartTag") | |
1891 | "public boolean removeAttributeByRawName(String name) {\n | |
1892 | return false;\n | |
1893 | }\n | |
1894 | public boolean removeAttributeByName(String name, String name2) {\n | |
1895 | return false;\n | |
1896 | }\n\npublic void resetStartTag") | |
1897 | (("Atttribute") "Attribute")) | |
1898 | #t))))) | |
1899 | (inputs | |
1900 | `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap) | |
1901 | ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap)) | |
1902 | ("java-xmlpull2" ,java-xmlpull2) | |
1903 | ("java-xpp3" ,java-xpp3) | |
1904 | ("java-xsdlib" ,java-xsdlib))) | |
1905 | (native-inputs | |
1906 | `(("java-testng" ,java-testng) | |
1907 | ("java-xerces" ,java-xerces))) | |
1908 | (home-page "https://dom4j.github.io/") | |
1909 | (synopsis "Flexible XML framework for Java") | |
1910 | (description "Dom4j is a flexible XML framework for Java. DOM4J works | |
1911 | with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very | |
1912 | low memory footprint.") | |
1913 | ;; some BSD-like 5-clause license | |
1914 | (license (license:non-copyleft "file://LICENSE")))) | |
3058d8ec JL |
1915 | |
1916 | (define-public java-kxml2 | |
1917 | (package | |
1918 | (name "java-kxml2") | |
1919 | (version "2.4.2") | |
1920 | (source (origin | |
00fc9389 TGR |
1921 | (method git-fetch) |
1922 | (uri (git-reference | |
b0e7b699 | 1923 | (url "https://github.com/stefanhaustein/kxml2") |
00fc9389 TGR |
1924 | (commit (string-append "v" version)))) |
1925 | (file-name (git-file-name name version)) | |
3058d8ec JL |
1926 | (sha256 |
1927 | (base32 | |
00fc9389 | 1928 | "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg")))) |
3058d8ec JL |
1929 | (build-system ant-build-system) |
1930 | (arguments | |
1931 | `(#:jar-name "kxml2.jar" | |
1932 | #:source-dir "src/main/java" | |
1933 | #:test-include (list "TestWb.java") | |
1934 | ;; Test failure: it was expected to get an XML entity but got the | |
1935 | ;; equivalent Unicode character instead. | |
1936 | #:tests? #f | |
1937 | #:phases | |
1938 | (modify-phases %standard-phases | |
00fc9389 TGR |
1939 | (add-after 'unpack 'make-git-checkout-writable |
1940 | (lambda _ | |
1941 | (for-each make-file-writable (find-files ".")) | |
1942 | #t)) | |
3058d8ec JL |
1943 | (add-before 'build 'copy-resources |
1944 | (lambda _ | |
aa6f87a2 MW |
1945 | (copy-recursively "src/main/resources" "build/classes") |
1946 | #t))))) | |
3058d8ec JL |
1947 | (inputs |
1948 | `(("java-xpp3" ,java-xpp3))) | |
1949 | (native-inputs | |
1950 | `(("java-junit" ,java-junit))) | |
1951 | (home-page "http://kxml.org") | |
1952 | (synopsis "XML pull parser") | |
1953 | (description "kXML is a small XML pull parser, specially designed for | |
1954 | constrained environments such as Applets, Personal Java or devices compliant | |
1955 | with the Mobile Information Device Profile (MIDP).") | |
1956 | (license license:expat))) | |
4c7759f0 JL |
1957 | |
1958 | (define-public java-stax | |
1959 | (package | |
1960 | (name "java-stax") | |
1961 | (version "1.2.0") | |
1962 | (source (origin | |
1963 | (method url-fetch) | |
1964 | (uri (string-append "https://repo1.maven.org/maven2/stax/stax/" | |
1965 | version "/stax-" version "-sources.jar")) | |
1966 | (sha256 | |
1967 | (base32 | |
1968 | "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z")))) | |
1969 | (build-system ant-build-system) | |
1970 | (arguments | |
1971 | `(#:jar-name "stax.jar" | |
1972 | #:tests? #f; no tests | |
1973 | #:phases | |
1974 | (modify-phases %standard-phases | |
1975 | (add-before 'configure 'fix-utf8 | |
1976 | (lambda _ | |
1977 | ;; This file is ISO-8859-1 but java expects UTF-8. | |
1978 | ;; Remove special characters in comments. | |
1979 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | |
1980 | (substitute* "src/com/wutka/dtd/Scanner.java" | |
1981 | (("//.*") "\n"))) | |
1982 | #t))))) | |
1983 | (home-page "https://repo1.maven.org/maven2/stax/stax/") | |
1984 | (synopsis "Streaming API for XML") | |
1985 | (description "This package provides the reference implementation of the | |
1986 | @dfn{Streaming API for XML} (StAX). It is used for streaming XML data to | |
1987 | and from a Java application. It provides a standard pull parser interface.") | |
1988 | (license license:asl2.0))) | |
b8798817 JL |
1989 | |
1990 | (define-public java-jettison | |
1991 | (package | |
1992 | (name "java-jettison") | |
1993 | (version "1.3.7") | |
1994 | (source (origin | |
a4b96726 TGR |
1995 | (method git-fetch) |
1996 | (uri (git-reference | |
b0e7b699 | 1997 | (url "https://github.com/codehaus/jettison") |
a4b96726 TGR |
1998 | (commit (string-append "jettison-" version)))) |
1999 | (file-name (git-file-name name version)) | |
b8798817 JL |
2000 | (sha256 |
2001 | (base32 | |
a4b96726 | 2002 | "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw")))) |
b8798817 JL |
2003 | (build-system ant-build-system) |
2004 | (arguments | |
2005 | `(#:jar-name "jettison.jar" | |
2006 | #:source-dir "src/main/java" | |
2007 | #:test-exclude (list "**/Abstract*.java" | |
2008 | ;; Abstract classes | |
2009 | "**/DOMTest.java" | |
2010 | "**/BadgerFishDOMTest.java" | |
2011 | "**/MappedDOMTest.java"))) | |
2012 | (native-inputs | |
2013 | `(("java-junit" ,java-junit))) | |
2014 | (home-page "https://github.com/codehaus/jettison") | |
2015 | (synopsis "StAX implementation for JSON") | |
2016 | (description "Jettison is a Java library for converting XML to JSON and | |
2017 | vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It | |
2018 | implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports | |
2019 | @code{Mapped} and @code{BadgerFish} conventions.") | |
2020 | (license license:asl2.0))) | |
a5ec8a5c JL |
2021 | |
2022 | (define-public java-jdom2 | |
2023 | (package | |
2024 | (name "java-jdom") | |
2025 | (version "2.0.6") | |
2026 | (source (origin | |
951bdf5a TGR |
2027 | (method git-fetch) |
2028 | (uri (git-reference | |
b0e7b699 | 2029 | (url "https://github.com/hunterhacker/jdom") |
951bdf5a TGR |
2030 | (commit (string-append "JDOM-" version)))) |
2031 | (file-name (git-file-name name version)) | |
a5ec8a5c JL |
2032 | (sha256 |
2033 | (base32 | |
951bdf5a | 2034 | "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq")))) |
a5ec8a5c JL |
2035 | (build-system ant-build-system) |
2036 | (arguments | |
2037 | `(#:build-target "package" | |
951bdf5a | 2038 | #:tests? #f ; tests are run as part of the build process |
a5ec8a5c JL |
2039 | #:phases |
2040 | (modify-phases %standard-phases | |
2041 | (replace 'install | |
2042 | (install-jars "build"))))) | |
2043 | (home-page "http://jdom.org/") | |
2044 | (synopsis "Access, manipulate, and output XML data") | |
2045 | (description "Jdom is a Java-based solution for accessing, manipulating, and | |
2046 | outputting XML data from Java code.") | |
2047 | (license license:bsd-4))) | |
5ee7b02f JL |
2048 | |
2049 | (define-public java-xstream | |
2050 | (package | |
2051 | (name "java-xstream") | |
2052 | (version "1.4.10") | |
b05bc3c4 TGR |
2053 | (source |
2054 | (origin | |
2055 | (method git-fetch) | |
2056 | (uri (git-reference | |
b0e7b699 | 2057 | (url "https://github.com/x-stream/xstream") |
b05bc3c4 TGR |
2058 | (commit (string-append |
2059 | "XSTREAM_" | |
2060 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) | |
2061 | version))))) | |
2062 | (file-name (git-file-name name version)) | |
2063 | (sha256 | |
2064 | (base32 "12m2bw8bapdc1w0pni9wl5hh2y8jfdgcvxd464jl9917dsp3ai2n")))) | |
5ee7b02f JL |
2065 | (build-system ant-build-system) |
2066 | (arguments | |
2067 | `(#:jar-name "xstream.jar" | |
b05bc3c4 | 2068 | ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system. |
5ee7b02f JL |
2069 | #:tests? #f |
2070 | #:jdk ,icedtea-8 | |
2071 | #:source-dir "xstream/src/java")) | |
2072 | (inputs | |
2073 | `(("java-jdom" ,java-jdom) | |
2074 | ("java-jdom2" ,java-jdom2) | |
2075 | ("java-cglib" ,java-cglib) | |
2076 | ("java-joda-time" ,java-joda-time) | |
2077 | ("java-jettison" ,java-jettison) | |
2078 | ("java-xom" ,java-xom) | |
2079 | ("java-xpp3" ,java-xpp3) | |
2080 | ("java-dom4j" ,java-dom4j) | |
2081 | ("java-stax2-api" ,java-stax2-api) | |
2082 | ("java-woodstox-core" ,java-woodstox-core) | |
2083 | ("java-kxml2" ,java-kxml2) | |
2084 | ("java-stax" ,java-stax))) | |
2085 | (home-page "https://x-stream.github.io") | |
2086 | (synopsis "XML serialization library") | |
2087 | (description "XStream is a simple library to serialize Java objects to XML | |
2088 | and back again.") | |
2089 | (license license:bsd-3))) | |
5c1cf7f3 | 2090 | |
2cce23bf PN |
2091 | (define-public xmlrpc-c |
2092 | (package | |
2093 | (name "xmlrpc-c") | |
2094 | (version "1.43.08") | |
2095 | (source (origin | |
2096 | (method url-fetch) | |
2097 | (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/" | |
2098 | version "/xmlrpc-c-" version ".tgz")) | |
2099 | (sha256 | |
2100 | (base32 | |
2101 | "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9")))) | |
2102 | (build-system gnu-build-system) | |
2103 | (inputs | |
2104 | `(("curl" ,curl))) | |
2105 | (native-inputs | |
2106 | `(;; For tools, if ever needed. | |
2107 | ("perl" ,perl))) | |
2108 | (arguments | |
2109 | `(#:make-flags ; Add $libdir to the RUNPATH of all the executables. | |
2110 | (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib")) | |
2111 | #:phases | |
2112 | (modify-phases %standard-phases | |
2113 | (add-after 'unpack 'fix-/bin/sh-in-tests | |
2114 | (lambda _ | |
2115 | (substitute* "GNUmakefile" | |
2116 | (("#! /bin/sh") (which "sh"))) | |
2117 | #t))))) | |
2118 | (home-page "http://xmlrpc-c.sourceforge.net/") | |
2119 | (synopsis "Lightweight RPC library based on XML and HTTP") | |
2120 | (description | |
2121 | "XML-RPC is a quick-and-easy way to make procedure calls over the Internet. | |
2122 | It converts the procedure call into an XML document, sends it to a remote | |
2123 | server using HTTP, and gets back the response as XML. This library provides a | |
2124 | modular implementation of XML-RPC for C and C++.") | |
2125 | (license (list license:psfl license:expat)))) | |
79a0eabd | 2126 | |
8fda8b7d MB |
2127 | (define-public python-elementpath |
2128 | (package | |
2129 | (name "python-elementpath") | |
e272783b | 2130 | (version "1.4.0") |
8fda8b7d MB |
2131 | (source |
2132 | (origin | |
2133 | (method url-fetch) | |
2134 | (uri (pypi-uri "elementpath" version)) | |
2135 | (sha256 | |
2136 | (base32 | |
e272783b | 2137 | "15h7d41v48q31hzjay7qzixdv531hnga3h35hksk7x52pgqcrkz7")))) |
8fda8b7d MB |
2138 | (build-system python-build-system) |
2139 | (home-page | |
2140 | "https://github.com/sissaschool/elementpath") | |
2141 | (synopsis | |
2142 | "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml") | |
2143 | (description | |
2144 | "The proposal of this package is to provide XPath 1.0 and 2.0 selectors | |
2145 | for Python's ElementTree XML data structures, both for the standard | |
2146 | ElementTree library and for the @uref{http://lxml.de, lxml.etree} library. | |
2147 | ||
2148 | For lxml.etree this package can be useful for providing XPath 2.0 selectors, | |
2149 | because lxml.etree already has it's own implementation of XPath 1.0.") | |
2150 | (license license:expat))) | |
2151 | ||
55e1475c MB |
2152 | (define-public python-lxml |
2153 | (package | |
2154 | (name "python-lxml") | |
2155 | (version "4.4.2") | |
2156 | (source | |
2157 | (origin | |
2158 | (method url-fetch) | |
2159 | (uri (pypi-uri "lxml" version)) | |
2160 | (sha256 | |
2161 | (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg")))) | |
2162 | (build-system python-build-system) | |
2163 | (arguments | |
2164 | `(#:phases (modify-phases %standard-phases | |
2165 | (replace 'check | |
2166 | (lambda _ | |
2167 | (invoke "make" "test")))))) | |
2168 | (inputs | |
2169 | `(("libxml2" ,libxml2) | |
2170 | ("libxslt" ,libxslt))) | |
2171 | (home-page "https://lxml.de/") | |
2172 | (synopsis "Python XML processing library") | |
2173 | (description | |
2174 | "The lxml XML toolkit is a Pythonic binding for the C libraries | |
2175 | libxml2 and libxslt.") | |
2176 | (license license:bsd-3))) ; and a few more, see LICENSES.txt | |
2177 | ||
2178 | (define-public python2-lxml | |
2179 | (package-with-python2 python-lxml)) | |
2180 | ||
c950a2a5 MB |
2181 | (define-public python-xmlschema |
2182 | (package | |
2183 | (name "python-xmlschema") | |
447f9acf | 2184 | (version "1.1.2") |
c950a2a5 | 2185 | (source (origin |
f8a94609 MB |
2186 | ;; Unit tests are not distributed with the PyPI archive. |
2187 | (method git-fetch) | |
2188 | (uri (git-reference | |
2189 | (url "https://github.com/sissaschool/xmlschema") | |
2190 | (commit (string-append "v" version)))) | |
2191 | (file-name (git-file-name name version)) | |
c950a2a5 MB |
2192 | (sha256 |
2193 | (base32 | |
447f9acf | 2194 | "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw")))) |
c950a2a5 MB |
2195 | (build-system python-build-system) |
2196 | (arguments | |
2197 | '(#:phases | |
2198 | (modify-phases %standard-phases | |
2199 | (replace 'check | |
2200 | (lambda* (#:key (tests? #t) #:allow-other-keys) | |
2201 | (if tests? | |
2202 | (begin | |
2203 | (setenv "PYTHONPATH" | |
2204 | (string-append "./build/lib:" | |
2205 | (getenv "PYTHONPATH"))) | |
f8a94609 | 2206 | (invoke "python" "-m" "unittest" "-v")) |
c950a2a5 MB |
2207 | (format #t "test suite not run~%")) |
2208 | #t))))) | |
2209 | (native-inputs | |
2210 | `(("python-lxml" ,python-lxml))) ;for tests | |
2211 | (propagated-inputs | |
2212 | `(("python-elementpath" ,python-elementpath))) | |
2213 | (home-page "https://github.com/sissaschool/xmlschema") | |
2214 | (synopsis "XML Schema validator and data conversion library") | |
2215 | (description | |
2216 | "The @code{xmlschema} library is an implementation of | |
2217 | @url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has | |
2218 | full support for the XSD 1.0 and 1.1 standards, an XPath-based API for | |
2219 | finding schema's elements and attributes; and can encode and decode | |
2220 | XML data to JSON and other formats.") | |
2221 | (license license:expat))) | |
2222 | ||
79a0eabd OP |
2223 | (define-public python-xmltodict |
2224 | (package | |
2225 | (name "python-xmltodict") | |
f3e073b4 | 2226 | (version "0.12.0") |
79a0eabd | 2227 | (source |
db1adb42 BG |
2228 | (origin |
2229 | (method url-fetch) | |
2230 | (uri (pypi-uri "xmltodict" version)) | |
2231 | (sha256 | |
2232 | (base32 | |
2233 | "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h")))) | |
79a0eabd OP |
2234 | (build-system python-build-system) |
2235 | (native-inputs | |
2236 | `(("python-coverage" ,python-coverage) | |
2237 | ("python-nose" ,python-nose))) | |
2238 | (home-page "https://github.com/martinblech/xmltodict") | |
2239 | (synopsis "Work with XML like you are working with JSON") | |
2240 | (description "This package provides a Python library to convert XML to | |
2241 | @code{OrderedDict}.") | |
2242 | (license license:expat))) |