You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

197 lines
7.9 KiB

  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. (define-module (gnu packages xml)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages compression)
  22. #:use-module (gnu packages gnupg)
  23. #:use-module (gnu packages perl)
  24. #:use-module (gnu packages python)
  25. #:use-module ((guix licenses)
  26. #:renamer (symbol-prefix-proc 'license:))
  27. #:use-module (guix packages)
  28. #:use-module (guix download)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (guix build-system perl)
  31. #:use-module (gnu packages linux))
  32. (define-public expat
  33. (package
  34. (name "expat")
  35. (version "2.1.0")
  36. (source (origin
  37. (method url-fetch)
  38. (uri (string-append "mirror://sourceforge/expat/expat/"
  39. version "/expat-" version ".tar.gz"))
  40. (sha256
  41. (base32
  42. "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))))
  43. (build-system gnu-build-system)
  44. (home-page "http://www.libexpat.org/")
  45. (synopsis "A stream-oriented XML parser library written in C")
  46. (description
  47. "Expat is an XML parser library written in C. It is a
  48. stream-oriented parser in which an application registers handlers for
  49. things the parser might find in the XML document (like start tags).")
  50. (license license:expat)))
  51. (define-public libxml2
  52. (package
  53. (name "libxml2")
  54. (version "2.9.0")
  55. (source (origin
  56. (method url-fetch)
  57. (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
  58. version ".tar.gz"))
  59. (sha256
  60. (base32
  61. "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd"))))
  62. (build-system gnu-build-system)
  63. (home-page "http://www.xmlsoft.org/")
  64. (synopsis "libxml2, a C parser for XML")
  65. (inputs `(("perl" ,perl)
  66. ("python" ,python-2) ; incompatible with Python 3 (print syntax)
  67. ("zlib" ,zlib)))
  68. (arguments
  69. `(#:phases
  70. (alist-replace
  71. 'install
  72. (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
  73. (let ((install (assoc-ref %standard-phases 'install))
  74. (glibc (assoc-ref inputs "libc"))
  75. (out (assoc-ref outputs "out")))
  76. (apply install args)
  77. (chdir "python")
  78. (substitute* "setup.py" (("/opt/include") (string-append glibc "/include")))
  79. (system* "python" "setup.py" "install" (string-append "--prefix=" out))))
  80. %standard-phases)))
  81. (description
  82. "Libxml2 is the XML C parser and toolkit developed for the Gnome project
  83. (but it is usable outside of the Gnome platform).")
  84. (license license:x11)))
  85. (define-public libxslt
  86. (package
  87. (name "libxslt")
  88. (version "1.1.28")
  89. (source (origin
  90. (method url-fetch)
  91. (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
  92. version ".tar.gz"))
  93. (sha256
  94. (base32
  95. "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
  96. (build-system gnu-build-system)
  97. (home-page "http://xmlsoft.org/XSLT/index.html")
  98. (synopsis "libxslt, a C library for applying XSLT stylesheets to XML documents")
  99. (inputs `(("libgcrypt" ,libgcrypt)
  100. ("libxml2" ,libxml2)
  101. ("python" ,python-wrapper)
  102. ("zlib" ,zlib)))
  103. (description
  104. "Libxslt is an XSLT C library developed for the GNOME project. It is
  105. based on libxml for XML parsing, tree manipulation and XPath support.")
  106. (license license:x11)))
  107. (define-public perl-xml-parser
  108. (package
  109. (name "perl-xml-parser")
  110. (version "2.41")
  111. (source (origin
  112. (method url-fetch)
  113. (uri (string-append
  114. "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
  115. version ".tar.gz"))
  116. (sha256
  117. (base32
  118. "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
  119. (build-system perl-build-system)
  120. (arguments `(#:make-maker-flags
  121. (let ((expat (assoc-ref %build-inputs "expat")))
  122. (list (string-append "EXPATLIBPATH=" expat "/lib")
  123. (string-append "EXPATINCPATH=" expat "/include")))))
  124. (inputs `(("expat" ,expat)))
  125. (license (package-license perl))
  126. (synopsis "Perl bindings to the Expat XML parsing library")
  127. (description
  128. "This module provides ways to parse XML documents. It is built on top of
  129. XML::Parser::Expat, which is a lower level interface to James Clark's expat
  130. library. Each call to one of the parsing methods creates a new instance of
  131. XML::Parser::Expat which is then used to parse the document. Expat options
  132. may be provided when the XML::Parser object is created. These options are
  133. then passed on to the Expat object on each parse call. They can also be given
  134. as extra arguments to the parse methods, in which case they override options
  135. given at XML::Parser creation time.")
  136. (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))
  137. (define-public perl-xml-simple
  138. (package
  139. (name "perl-xml-simple")
  140. (version "2.20")
  141. (source (origin
  142. (method url-fetch)
  143. (uri (string-append
  144. "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
  145. version ".tar.gz"))
  146. (sha256
  147. (base32
  148. "0jj3jiray1l4pi9wkjcpxjc3v431whdwx5aqnhgdm4i7h3817zsw"))))
  149. (build-system perl-build-system)
  150. (inputs
  151. `(("perl-xml-parser" ,perl-xml-parser)))
  152. (license (package-license perl))
  153. (synopsis "Perl module for easy reading/writing of XML files")
  154. (description
  155. "The XML::Simple module provides a simple API layer on top of an
  156. underlying XML parsing module (either XML::Parser or one of the SAX2
  157. parser modules).")
  158. (home-page "http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm")))
  159. (define-public xmlto
  160. (package
  161. (name "xmlto")
  162. (version "0.0.25")
  163. (source
  164. (origin
  165. (method url-fetch)
  166. (uri (string-append
  167. "https://fedorahosted.org/releases/x/m/xmlto/xmlto-"
  168. version ".tar.bz2"))
  169. (sha256
  170. (base32
  171. "0dp5nxq491gymq806za0dk4hngfmq65ysrqbn0ypajqbbl6vf71n"))))
  172. (build-system gnu-build-system)
  173. (arguments
  174. ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
  175. '(#:configure-flags (list (string-append "GETOPT="
  176. (assoc-ref %build-inputs
  177. "util-linux")
  178. "/bin/getopt"))))
  179. (inputs
  180. `(("util-linux" ,util-linux) ; for 'getopt'
  181. ("libxml2" ,libxml2) ; for 'xmllint'
  182. ("libxslt" ,libxslt))) ; for 'xsltproc'
  183. (home-page "http://cyberelk.net/tim/software/xmlto/")
  184. (synopsis "Front-end to an XSL toolchain")
  185. (description
  186. "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
  187. stylesheet for the conversion you want and applies it using an external
  188. XSL-T processor. It also performs any necessary post-processing.")
  189. (license license:gpl2+)))