gnu: gnupg: Upgrade support libraries.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages xml)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages compression)
23 #:use-module (gnu packages gnupg)
24 #:use-module (gnu packages perl)
25 #:use-module (gnu packages python)
26 #:use-module ((guix licenses)
27 #:renamer (symbol-prefix-proc 'license:))
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system perl))
32
33 (define-public expat
34 (package
35 (name "expat")
36 (version "2.1.0")
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "mirror://sourceforge/expat/expat/"
40 version "/expat-" version ".tar.gz"))
41 (sha256
42 (base32
43 "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))))
44 (build-system gnu-build-system)
45 (home-page "http://www.libexpat.org/")
46 (synopsis "A stream-oriented XML parser library written in C")
47 (description
48 "Expat is an XML parser library written in C. It is a
49 stream-oriented parser in which an application registers handlers for
50 things the parser might find in the XML document (like start tags).")
51 (license license:expat)))
52
53 (define-public libxml2
54 (package
55 (name "libxml2")
56 (version "2.9.0")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
60 version ".tar.gz"))
61 (sha256
62 (base32
63 "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd"))))
64 (build-system gnu-build-system)
65 (home-page "http://www.xmlsoft.org/")
66 (synopsis "libxml2, a C parser for XML")
67 (inputs `(("perl" ,perl)
68 ("python" ,python)
69 ("zlib" ,zlib)))
70 (arguments
71 `(#:phases
72 (alist-replace
73 'install
74 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
75 (let ((install (assoc-ref %standard-phases 'install))
76 (glibc (assoc-ref inputs "libc"))
77 (out (assoc-ref outputs "out")))
78 (apply install args)
79 (chdir "python")
80 (substitute* "setup.py" (("/opt/include") (string-append glibc "/include")))
81 (system* "python" "setup.py" "install" (string-append "--prefix=" out))))
82 %standard-phases)))
83 (description
84 "Libxml2 is the XML C parser and toolkit developed for the Gnome project
85 (but it is usable outside of the Gnome platform).")
86 (license license:x11)))
87
88 (define-public libxslt
89 (package
90 (name "libxslt")
91 (version "1.1.28")
92 (source (origin
93 (method url-fetch)
94 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
95 version ".tar.gz"))
96 (sha256
97 (base32
98 "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
99 (build-system gnu-build-system)
100 (home-page "http://xmlsoft.org/XSLT/index.html")
101 (synopsis "libxslt, a C library for applying XSLT stylesheets to XML documents")
102 (inputs `(("libgcrypt" ,libgcrypt)
103 ("libxml2" ,libxml2)
104 ("python" ,python)
105 ("zlib" ,zlib)))
106 (description
107 "Libxslt is an XSLT C library developed for the GNOME project. It is
108 based on libxml for XML parsing, tree manipulation and XPath support.")
109 (license license:x11)))
110
111 (define-public perl-xml-parser
112 (package
113 (name "perl-xml-parser")
114 (version "2.41")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append
118 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
119 version ".tar.gz"))
120 (sha256
121 (base32
122 "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
123 (build-system perl-build-system)
124 (arguments `(#:make-maker-flags
125 (let ((expat (assoc-ref %build-inputs "expat")))
126 (list (string-append "EXPATLIBPATH=" expat "/lib")
127 (string-append "EXPATINCPATH=" expat "/include")))))
128 (inputs `(("expat" ,expat)))
129 (license (package-license perl))
130 (synopsis "Perl bindings to the Expat XML parsing library")
131 (description
132 "This module provides ways to parse XML documents. It is built on top of
133 XML::Parser::Expat, which is a lower level interface to James Clark's expat
134 library. Each call to one of the parsing methods creates a new instance of
135 XML::Parser::Expat which is then used to parse the document. Expat options
136 may be provided when the XML::Parser object is created. These options are
137 then passed on to the Expat object on each parse call. They can also be given
138 as extra arguments to the parse methods, in which case they override options
139 given at XML::Parser creation time.")
140 (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))