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