No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

330 líneas
13 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages guile)
  19. #:use-module (guix licenses)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages bash)
  22. #:use-module (gnu packages bdw-gc)
  23. #:use-module (gnu packages gawk)
  24. #:use-module (gnu packages gperf)
  25. #:use-module (gnu packages libffi)
  26. #:use-module (gnu packages autotools)
  27. #:use-module (gnu packages libunistring)
  28. #:use-module (gnu packages m4)
  29. #:use-module (gnu packages multiprecision)
  30. #:use-module (gnu packages pkg-config)
  31. #:use-module (gnu packages readline)
  32. #:use-module (gnu packages ncurses)
  33. #:use-module (gnu packages ed)
  34. #:use-module (gnu packages which)
  35. #:use-module (guix packages)
  36. #:use-module (guix download)
  37. #:use-module (guix build-system gnu))
  38. ;;; Commentary:
  39. ;;;
  40. ;;; GNU Guile, and modules and extensions.
  41. ;;;
  42. ;;; Code:
  43. (define-public guile-1.8
  44. (package
  45. (name "guile")
  46. (version "1.8.8")
  47. (source (origin
  48. (method url-fetch)
  49. (uri (string-append "mirror://gnu/guile/guile-" version
  50. ".tar.gz"))
  51. (sha256
  52. (base32
  53. "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
  54. (patches (list (search-patch "guile-1.8-cpp-4.5.patch")))))
  55. (build-system gnu-build-system)
  56. (arguments '(#:configure-flags '("--disable-error-on-warning")
  57. ;; Insert a phase before `configure' to patch things up.
  58. #:phases (alist-cons-before
  59. 'configure
  60. 'patch-stuff
  61. (lambda* (#:key outputs #:allow-other-keys)
  62. ;; Add a call to `lt_dladdsearchdir' so that
  63. ;; `libguile-readline.so' & co. are in the
  64. ;; loader's search path.
  65. (substitute* "libguile/dynl.c"
  66. (("lt_dlinit.*$" match)
  67. (format #f
  68. " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
  69. match
  70. (assoc-ref outputs "out"))))
  71. ;; The usual /bin/sh...
  72. (substitute* "ice-9/popen.scm"
  73. (("/bin/sh") (which "sh"))))
  74. %standard-phases)))
  75. (inputs `(("gawk" ,gawk)
  76. ("readline" ,readline)))
  77. ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
  78. ;; propagated.
  79. (propagated-inputs `(("gmp" ,gmp)
  80. ("libtool" ,libtool)))
  81. ;; When cross-compiling, a native version of Guile itself is needed.
  82. (self-native-input? #t)
  83. (native-search-paths
  84. (list (search-path-specification
  85. (variable "GUILE_LOAD_PATH")
  86. (directories '("share/guile/site")))))
  87. (synopsis "Scheme implementation intended especially for extensions")
  88. (description
  89. "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
  90. official extension language of the GNU system. It is an implementation of
  91. the Scheme language which can be easily embedded in other applications to
  92. provide a convenient means of extending the functionality of the application
  93. without requiring the source code to be rewritten.")
  94. (home-page "http://www.gnu.org/software/guile/")
  95. (license lgpl2.0+)))
  96. (define-public guile-2.0
  97. (package
  98. (name "guile")
  99. (version "2.0.9")
  100. (source (origin
  101. (method url-fetch)
  102. (uri (string-append "mirror://gnu/guile/guile-" version
  103. ".tar.xz"))
  104. (sha256
  105. (base32
  106. "0nw9y8vjyz4r61v06p9msks5lm58pd91irmzg4k487vmv743h2pp"))))
  107. (build-system gnu-build-system)
  108. (native-inputs `(("pkgconfig" ,pkg-config)))
  109. (inputs `(("libffi" ,libffi)
  110. ("readline" ,readline)
  111. ;; TODO: On next core-updates, make Bash input unconditional.
  112. ,@(if (%current-target-system)
  113. `(("bash" ,bash))
  114. '())))
  115. (propagated-inputs
  116. `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
  117. ;; reads `-lltdl -lunistring', adding them here will add the needed
  118. ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
  119. ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
  120. ("libunistring" ,libunistring)
  121. ("libtool" ,libtool)
  122. ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
  123. ;; must be propagated.
  124. ("bdw-gc" ,libgc)
  125. ("gmp" ,gmp)))
  126. (self-native-input? #t)
  127. (outputs '("out" "debug"))
  128. (arguments
  129. `(#:phases (alist-cons-before
  130. 'configure 'pre-configure
  131. (lambda* (#:key inputs #:allow-other-keys)
  132. ;; Tell (ice-9 popen) the file name of Bash.
  133. (let ((bash (assoc-ref inputs "bash")))
  134. (substitute* "module/ice-9/popen.scm"
  135. (("/bin/sh")
  136. (string-append bash "/bin/bash")))))
  137. %standard-phases)
  138. ,@(if (%current-target-system)
  139. '(#:configure-flags '("CC_FOR_BUILD=gcc"))
  140. '())))
  141. (native-search-paths
  142. (list (search-path-specification
  143. (variable "GUILE_LOAD_PATH")
  144. (directories '("share/guile/site/2.0")))
  145. (search-path-specification
  146. (variable "GUILE_LOAD_COMPILED_PATH")
  147. (directories '("share/guile/site/2.0")))))
  148. (synopsis "Scheme implementation intended especially for extensions")
  149. (description
  150. "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
  151. official extension language of the GNU system. It is an implementation of
  152. the Scheme language which can be easily embedded in other applications to
  153. provide a convenient means of extending the functionality of the application
  154. without requiring the source code to be rewritten.")
  155. (home-page "http://www.gnu.org/software/guile/")
  156. (license lgpl3+)))
  157. (define-public guile-2.0/fixed
  158. ;; A package of Guile 2.0 that's rarely changed. It is the one used
  159. ;; in the `base' module, and thus changing it entails a full rebuild.
  160. guile-2.0)
  161. ;;;
  162. ;;; Extensions.
  163. ;;;
  164. (define (guile-reader guile)
  165. "Build Guile-Reader against GUILE, a package of some version of Guile 1.8
  166. or 2.0."
  167. (package
  168. (name (string-append "guile-reader-for-guile_" (package-version guile)))
  169. (version "0.6")
  170. (source (origin
  171. (method url-fetch)
  172. (uri (string-append
  173. "http://download-mirror.savannah.gnu.org/releases/guile-reader/guile-reader-"
  174. version ".tar.gz"))
  175. (sha256
  176. (base32
  177. "1svlyk5pm4fsdp2g7n6qffdl6fdggxnlicj0jn9s4lxd63gzxy1n"))))
  178. (build-system gnu-build-system)
  179. (native-inputs `(("pkgconfig" ,pkg-config)
  180. ("gperf" ,gperf)))
  181. (inputs `(("guile" ,guile)))
  182. (arguments `(#:configure-flags
  183. (let ((out (assoc-ref %outputs "out")))
  184. ,(if (string-prefix? "2." (package-version guile))
  185. '(list (string-append "--with-guilemoduledir="
  186. out "/share/guile/site/2.0"))
  187. '(list (string-append "--with-guilemoduledir="
  188. out "/share/guile/site"))))))
  189. (synopsis "Framework for building readers for GNU Guile")
  190. (description
  191. "Guile-Reader is a simple framework for building readers for GNU Guile.
  192. The idea is to make it easy to build procedures that extend Guile’s read
  193. procedure. Readers supporting various syntax variants can easily be written,
  194. possibly by re-using existing “token readers” of a standard Scheme
  195. readers. For example, it is used to implement Skribilo’s R5RS-derived
  196. document syntax.
  197. Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
  198. hopefully more powerful and flexible (for instance, one may instantiate as
  199. many readers as needed).")
  200. (home-page "http://www.nongnu.org/guile-reader/")
  201. (license gpl3+)))
  202. (define-public guile-reader/guile-1.8
  203. ;; Guile-Reader built against Guile 1.8.
  204. (guile-reader guile-1.8))
  205. (define-public guile-reader/guile-2.0
  206. ;; Guile-Reader built against Guile 2.0.
  207. (guile-reader guile-2.0))
  208. (define-public guile-ncurses
  209. (package
  210. (name "guile-ncurses")
  211. (version "1.4")
  212. (source (origin
  213. (method url-fetch)
  214. (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
  215. version ".tar.gz"))
  216. (sha256
  217. (base32
  218. "070wl664lsm14hb6y9ch97x9q6cns4k6nxgdzbdzi5byixn74899"))))
  219. (build-system gnu-build-system)
  220. (inputs `(("ncurses" ,ncurses)
  221. ("guile" ,guile-2.0)))
  222. (arguments
  223. '(#:configure-flags (list (string-append "--with-guilesitedir="
  224. (assoc-ref %outputs "out")
  225. "/share/guile/site/2.0"))
  226. #:phases (alist-cons-after
  227. 'install 'post-install
  228. (lambda* (#:key outputs #:allow-other-keys)
  229. (let* ((out (assoc-ref outputs "out"))
  230. (dir (string-append out "/share/guile/site/"))
  231. (files (find-files dir ".scm")))
  232. (substitute* files
  233. (("\"libguile-ncurses\"")
  234. (format #f "\"~a/lib/libguile-ncurses\""
  235. out)))))
  236. %standard-phases)))
  237. (home-page "http://www.gnu.org/software/guile-ncurses/")
  238. (synopsis "Guile bindings to ncurses")
  239. (description
  240. "guile-ncurses provides guile bindings to the ncurses library.")
  241. (license lgpl3+)))
  242. (define-public mcron
  243. (package
  244. (name "mcron")
  245. (version "1.0.6")
  246. (source (origin
  247. (method url-fetch)
  248. (uri (string-append "mirror://gnu/mcron/mcron-"
  249. version ".tar.gz"))
  250. (sha256
  251. (base32
  252. "0yvrfzzdy2m7fbqkr61fw01wd9r2jpnbyabxhcsfivgxywknl0fy"))
  253. (patches (list (search-patch "mcron-install.patch")))))
  254. (build-system gnu-build-system)
  255. (inputs
  256. `(("ed" ,ed) ("which" ,which) ("guile" ,guile-1.8)))
  257. (home-page "http://www.gnu.org/software/mcron/")
  258. (synopsis "Run jobs at scheduled times")
  259. (description
  260. "Mcron is a complete replacement for Vixie cron. It is used to run
  261. tasks on a schedule, such as every hour or every Monday. Mcron is written in
  262. Guile, so its configuration can be written in Scheme, however the original
  263. cron format is also supported.")
  264. (license gpl3+)))
  265. (define-public guile-lib
  266. (package
  267. (name "guile-lib")
  268. (version "0.2.2")
  269. (source (origin
  270. (method url-fetch)
  271. (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
  272. version ".tar.gz"))
  273. (sha256
  274. (base32
  275. "1f9n2b5b5r75lzjinyk6zp6g20g60msa0jpfrk5hhg4j8cy0ih4b"))))
  276. (build-system gnu-build-system)
  277. (arguments
  278. '(#:phases (alist-cons-before
  279. 'configure 'patch-module-dir
  280. (lambda _
  281. (substitute* "src/Makefile.in"
  282. (("^moddir[[:blank:]]*=[[:blank:]]*([[:graph:]]+)" _ rhs)
  283. (string-append "moddir = " rhs "/2.0\n"))))
  284. %standard-phases)))
  285. (inputs `(("guile" ,guile-2.0)))
  286. (home-page "http://www.nongnu.org/guile-lib/")
  287. (synopsis "Collection of useful Guile Scheme modules")
  288. (description
  289. "guile-lib is intended as an accumulation place for pure-scheme Guile
  290. modules, allowing for people to cooperate integrating their generic Guile
  291. modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
  292. for Guile\".")
  293. ;; The whole is under GPLv3+, but some modules are under laxer
  294. ;; distribution terms such as LGPL and public domain. See `COPYING' for
  295. ;; details.
  296. (license gpl3+)))
  297. ;;; guile.scm ends here