build-system/gnu: Strip with '--strip-all' instead of '--strip-debug'.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
32795fcf 2;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
b1a01474 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
1722d680 4;;;
233e7676 5;;; This file is part of GNU Guix.
1722d680 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
1722d680
LC
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;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
1722d680
LC
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
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
1722d680 19
1ffa7090 20(define-module (gnu packages guile)
4a44e743 21 #:use-module (guix licenses)
59a43334 22 #:use-module (gnu packages)
9c782445 23 #:use-module (gnu packages bash)
1ffa7090
LC
24 #:use-module (gnu packages bdw-gc)
25 #:use-module (gnu packages gawk)
26 #:use-module (gnu packages gperf)
27 #:use-module (gnu packages libffi)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages libunistring)
30 #:use-module (gnu packages m4)
31 #:use-module (gnu packages multiprecision)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages readline)
ef02e1e9 34 #:use-module (gnu packages ncurses)
87d836b2
LC
35 #:use-module (gnu packages ed)
36 #:use-module (gnu packages which)
12507a3e 37 #:use-module (gnu packages gtk)
1722d680 38 #:use-module (guix packages)
87f5d366 39 #:use-module (guix download)
32795fcf
LC
40 #:use-module (guix build-system gnu)
41 #:use-module (guix utils)
42 #:use-module (ice-9 match))
1722d680
LC
43
44;;; Commentary:
45;;;
c44899a2 46;;; GNU Guile, and modules and extensions.
1722d680
LC
47;;;
48;;; Code:
49
c44899a2
LC
50(define-public guile-1.8
51 (package
52 (name "guile")
53 (version "1.8.8")
54 (source (origin
87f5d366 55 (method url-fetch)
0db342a5 56 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
57 ".tar.gz"))
58 (sha256
59 (base32
01eafd38
LC
60 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
61 (patches (list (search-patch "guile-1.8-cpp-4.5.patch")))))
c44899a2
LC
62 (build-system gnu-build-system)
63 (arguments '(#:configure-flags '("--disable-error-on-warning")
c44899a2
LC
64
65 ;; Insert a phase before `configure' to patch things up.
66 #:phases (alist-cons-before
67 'configure
2f4fbe1c 68 'patch-stuff
c44899a2
LC
69 (lambda* (#:key outputs #:allow-other-keys)
70 ;; Add a call to `lt_dladdsearchdir' so that
71 ;; `libguile-readline.so' & co. are in the
72 ;; loader's search path.
73 (substitute* "libguile/dynl.c"
2f4fbe1c
LC
74 (("lt_dlinit.*$" match)
75 (format #f
76 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
77 match
78 (assoc-ref outputs "out"))))
79
80 ;; The usual /bin/sh...
81 (substitute* "ice-9/popen.scm"
82 (("/bin/sh") (which "sh"))))
c44899a2 83 %standard-phases)))
01eafd38 84 (inputs `(("gawk" ,gawk)
c44899a2
LC
85 ("readline" ,readline)))
86
87 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
88 ;; propagated.
89 (propagated-inputs `(("gmp" ,gmp)
90 ("libtool" ,libtool)))
91
92 ;; When cross-compiling, a native version of Guile itself is needed.
93 (self-native-input? #t)
94
9be8d7c8
LC
95 (native-search-paths
96 (list (search-path-specification
97 (variable "GUILE_LOAD_PATH")
98 (directories '("share/guile/site")))))
99
f50d2669 100 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 101 (description
a22dc0c4
LC
102 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
103official extension language of the GNU system. It is an implementation of
104the Scheme language which can be easily embedded in other applications to
105provide a convenient means of extending the functionality of the application
106without requiring the source code to be rewritten.")
c44899a2 107 (home-page "http://www.gnu.org/software/guile/")
4a44e743 108 (license lgpl2.0+)))
c44899a2
LC
109
110(define-public guile-2.0
111 (package
112 (name "guile")
b1a01474 113 (version "2.0.11")
c44899a2 114 (source (origin
87f5d366 115 (method url-fetch)
0db342a5 116 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
117 ".tar.xz"))
118 (sha256
119 (base32
b1a01474 120 "1qh3j7308qvsjgwf7h94yqgckpbgz2k3yqdkzsyhqcafvfka9l5f"))))
c44899a2
LC
121 (build-system gnu-build-system)
122 (native-inputs `(("pkgconfig" ,pkg-config)))
123 (inputs `(("libffi" ,libffi)
9c782445 124 ("readline" ,readline)
cba95006 125 ("bash" ,bash)))
c44899a2
LC
126
127 (propagated-inputs
128 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
129 ;; reads `-lltdl -lunistring', adding them here will add the needed
130 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
131 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
132 ("libunistring" ,libunistring)
133 ("libtool" ,libtool)
134
135 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
136 ;; must be propagated.
bda1bc6c 137 ("bdw-gc" ,libgc)
c44899a2
LC
138 ("gmp" ,gmp)))
139
140 (self-native-input? #t)
141
9bf62d9b
LC
142 (outputs '("out" "debug"))
143
8ffaa93b 144 (arguments
9c782445 145 `(#:phases (alist-cons-before
8ffaa93b
LC
146 'configure 'pre-configure
147 (lambda* (#:key inputs #:allow-other-keys)
58b4e8e8 148 ;; Tell (ice-9 popen) the file name of Bash.
8ffaa93b
LC
149 (let ((bash (assoc-ref inputs "bash")))
150 (substitute* "module/ice-9/popen.scm"
151 (("/bin/sh")
152 (string-append bash "/bin/bash")))))
db619089 153 %standard-phases)))
8ffaa93b 154
9be8d7c8
LC
155 (native-search-paths
156 (list (search-path-specification
157 (variable "GUILE_LOAD_PATH")
158 (directories '("share/guile/site/2.0")))
159 (search-path-specification
160 (variable "GUILE_LOAD_COMPILED_PATH")
161 (directories '("share/guile/site/2.0")))))
162
f50d2669 163 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 164 (description
a22dc0c4
LC
165 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
166official extension language of the GNU system. It is an implementation of
167the Scheme language which can be easily embedded in other applications to
168provide a convenient means of extending the functionality of the application
169without requiring the source code to be rewritten.")
c44899a2 170 (home-page "http://www.gnu.org/software/guile/")
4a44e743 171 (license lgpl3+)))
c44899a2 172
fa29b199
LC
173(define-public guile-2.0/fixed
174 ;; A package of Guile 2.0 that's rarely changed. It is the one used
175 ;; in the `base' module, and thus changing it entails a full rebuild.
bda1bc6c 176 guile-2.0)
fa29b199 177
c44899a2
LC
178\f
179;;;
180;;; Extensions.
181;;;
182
1722d680
LC
183(define (guile-reader guile)
184 "Build Guile-Reader against GUILE, a package of some version of Guile 1.8
185or 2.0."
186 (package
ba4bcae0 187 (name (string-append "guile-reader-for-guile_" (package-version guile)))
1722d680
LC
188 (version "0.6")
189 (source (origin
87f5d366 190 (method url-fetch)
1722d680
LC
191 (uri (string-append
192 "http://download-mirror.savannah.gnu.org/releases/guile-reader/guile-reader-"
193 version ".tar.gz"))
194 (sha256
195 (base32
196 "1svlyk5pm4fsdp2g7n6qffdl6fdggxnlicj0jn9s4lxd63gzxy1n"))))
197 (build-system gnu-build-system)
cb0d69ed 198 (native-inputs `(("pkgconfig" ,pkg-config)
1627f7f7 199 ("gperf" ,gperf)))
1722d680 200 (inputs `(("guile" ,guile)))
46614bba
LC
201 (arguments `(#:configure-flags
202 (let ((out (assoc-ref %outputs "out")))
203 ,(if (string-prefix? "2." (package-version guile))
204 '(list (string-append "--with-guilemoduledir="
205 out "/share/guile/site/2.0"))
206 '(list (string-append "--with-guilemoduledir="
207 out "/share/guile/site"))))))
208 (synopsis "Framework for building readers for GNU Guile")
d45122f5 209 (description
1722d680
LC
210"Guile-Reader is a simple framework for building readers for GNU Guile.
211
212The idea is to make it easy to build procedures that extend Guile’s read
35b9e423 213procedure. Readers supporting various syntax variants can easily be written,
1722d680 214possibly by re-using existing “token readers” of a standard Scheme
35b9e423 215readers. For example, it is used to implement Skribilo’s R5RS-derived
1722d680
LC
216document syntax.
217
218Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
219hopefully more powerful and flexible (for instance, one may instantiate as
220many readers as needed).")
221 (home-page "http://www.nongnu.org/guile-reader/")
4a44e743 222 (license gpl3+)))
1722d680
LC
223
224(define-public guile-reader/guile-1.8
225 ;; Guile-Reader built against Guile 1.8.
226 (guile-reader guile-1.8))
227
228(define-public guile-reader/guile-2.0
229 ;; Guile-Reader built against Guile 2.0.
230 (guile-reader guile-2.0))
231
ef02e1e9
LC
232(define-public guile-ncurses
233 (package
234 (name "guile-ncurses")
31a123fe 235 (version "1.6")
ef02e1e9
LC
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
239 version ".tar.gz"))
240 (sha256
241 (base32
31a123fe 242 "0wmk681zzi1wxw543r2s2r84ndnzxp69kr7pc01aw4l55hg7jn73"))))
ef02e1e9
LC
243 (build-system gnu-build-system)
244 (inputs `(("ncurses" ,ncurses)
245 ("guile" ,guile-2.0)))
246 (arguments
2c6b7c7d
LC
247 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
248 (string-append "--with-guilesitedir="
ef02e1e9 249 (assoc-ref %outputs "out")
3f69e393 250 "/share/guile/site/2.0"))
ef02e1e9
LC
251 #:phases (alist-cons-after
252 'install 'post-install
253 (lambda* (#:key outputs #:allow-other-keys)
254 (let* ((out (assoc-ref outputs "out"))
255 (dir (string-append out "/share/guile/site/"))
256 (files (find-files dir ".scm")))
257 (substitute* files
258 (("\"libguile-ncurses\"")
259 (format #f "\"~a/lib/libguile-ncurses\""
260 out)))))
261 %standard-phases)))
262 (home-page "http://www.gnu.org/software/guile-ncurses/")
f50d2669 263 (synopsis "Guile bindings to ncurses")
ef02e1e9 264 (description
12bcf94a 265 "guile-ncurses provides Guile language bindings for the ncurses
79c311b8 266library.")
ef02e1e9
LC
267 (license lgpl3+)))
268
87d836b2
LC
269(define-public mcron
270 (package
271 (name "mcron")
d12c626c 272 (version "1.0.8")
87d836b2
LC
273 (source (origin
274 (method url-fetch)
275 (uri (string-append "mirror://gnu/mcron/mcron-"
276 version ".tar.gz"))
277 (sha256
278 (base32
d12c626c 279 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
01eafd38 280 (patches (list (search-patch "mcron-install.patch")))))
87d836b2 281 (build-system gnu-build-system)
b6c18d6a
LC
282 (native-inputs `(("pkg-config" ,pkg-config)))
283 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
87d836b2 284 (home-page "http://www.gnu.org/software/mcron/")
f50d2669 285 (synopsis "Run jobs at scheduled times")
87d836b2 286 (description
79c311b8 287 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
a22dc0c4 288tasks on a schedule, such as every hour or every Monday. Mcron is written in
79c311b8
LC
289Guile, so its configuration can be written in Scheme; the original cron
290format is also supported.")
87d836b2
LC
291 (license gpl3+)))
292
3e9066fc
LC
293(define-public guile-lib
294 (package
295 (name "guile-lib")
296 (version "0.2.2")
297 (source (origin
298 (method url-fetch)
299 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
300 version ".tar.gz"))
301 (sha256
302 (base32
303 "1f9n2b5b5r75lzjinyk6zp6g20g60msa0jpfrk5hhg4j8cy0ih4b"))))
304 (build-system gnu-build-system)
305 (arguments
306 '(#:phases (alist-cons-before
307 'configure 'patch-module-dir
308 (lambda _
309 (substitute* "src/Makefile.in"
310 (("^moddir[[:blank:]]*=[[:blank:]]*([[:graph:]]+)" _ rhs)
311 (string-append "moddir = " rhs "/2.0\n"))))
312 %standard-phases)))
313 (inputs `(("guile" ,guile-2.0)))
314 (home-page "http://www.nongnu.org/guile-lib/")
315 (synopsis "Collection of useful Guile Scheme modules")
316 (description
35b9e423 317 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
3e9066fc
LC
318modules, allowing for people to cooperate integrating their generic Guile
319modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
320for Guile\".")
321
322 ;; The whole is under GPLv3+, but some modules are under laxer
323 ;; distribution terms such as LGPL and public domain. See `COPYING' for
324 ;; details.
325 (license gpl3+)))
326
6050a1fb
CR
327(define-public guile-json
328 (package
329 (name "guile-json")
cdf2b286 330 (version "0.4.0")
6050a1fb
CR
331 (source (origin
332 (method url-fetch)
333 (uri (string-append "mirror://savannah/guile-json/guile-json-"
334 version ".tar.gz"))
335 (sha256
336 (base32
cdf2b286 337 "0v06272rw4ycwzssjf3fzpk2vhpslvl55hz94q80vc6f74j0d5h6"))
bf6fcf54
LC
338 (modules '((guix build utils)))
339 (snippet
340 ;; Make sure everything goes under .../site/2.0, like Guile's
341 ;; search paths expects.
342 '(substitute* '("Makefile.in" "json/Makefile.in")
343 (("moddir =.*/share/guile/site" all)
344 (string-append all "/2.0"))))))
6050a1fb 345 (build-system gnu-build-system)
db5584dd 346 (native-inputs `(("guile" ,guile-2.0)))
6050a1fb
CR
347 (home-page "http://savannah.nongnu.org/projects/guile-json/")
348 (synopsis "JSON module for Guile")
349 (description
350 "Guile-json supports parsing and building JSON documents according to the
35b9e423 351http:://json.org specification. These are the main features:
6050a1fb
CR
352- Strictly complies to http://json.org specification.
353- Build JSON documents programmatically via macros.
354- Unicode support for strings.
355- Allows JSON pretty printing.")
356 (license lgpl3+)))
357
12507a3e
LC
358(define-public guile-charting
359 (package
360 (name "guile-charting")
f75426d5 361 (version "0.2.0")
12507a3e
LC
362 (source (origin
363 (method url-fetch)
364 (uri (string-append "http://wingolog.org/pub/guile-charting/"
365 "guile-charting-" version ".tar.gz"))
366 (sha256
367 (base32
f75426d5 368 "0w5qiyv9v0ip5li22x762bm48g8xnw281w66iyw094zdw611pb2m"))
12507a3e
LC
369 (modules '((guix build utils)))
370 (snippet
64a4a21e 371 '(begin
f75426d5
LC
372 ;; Use the standard location for modules.
373 (substitute* "Makefile.in"
374 (("godir = .*$")
375 "godir = $(moddir)\n"))))))
12507a3e
LC
376 (build-system gnu-build-system)
377 (native-inputs `(("pkg-config" ,pkg-config)))
64a4a21e
LC
378 (inputs `(("guile" ,guile-2.0)))
379 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
12507a3e
LC
380 (home-page "http://wingolog.org/software/guile-charting/")
381 (synopsis "Create charts and graphs in Guile")
382 (description
383 "Guile-Charting is a Guile Scheme library to create bar charts and graphs
384using the Cairo drawing library.")
385 (license lgpl2.1+)))
386
1722d680 387;;; guile.scm ends here