Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
ef02e1e9 | 2 | ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> |
1722d680 | 3 | ;;; |
233e7676 | 4 | ;;; This file is part of GNU Guix. |
1722d680 | 5 | ;;; |
233e7676 | 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
1722d680 LC |
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 | ;;; | |
233e7676 | 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
1722d680 LC |
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 | |
233e7676 | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
1722d680 | 18 | |
1ffa7090 | 19 | (define-module (gnu packages guile) |
4a44e743 | 20 | #:use-module (guix licenses) |
59a43334 | 21 | #:use-module (gnu packages) |
1ffa7090 LC |
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) | |
ef02e1e9 | 32 | #:use-module (gnu packages ncurses) |
87d836b2 LC |
33 | #:use-module (gnu packages ed) |
34 | #:use-module (gnu packages which) | |
1722d680 | 35 | #:use-module (guix packages) |
87f5d366 | 36 | #:use-module (guix download) |
1722d680 LC |
37 | #:use-module (guix build-system gnu)) |
38 | ||
39 | ;;; Commentary: | |
40 | ;;; | |
c44899a2 | 41 | ;;; GNU Guile, and modules and extensions. |
1722d680 LC |
42 | ;;; |
43 | ;;; Code: | |
44 | ||
c44899a2 LC |
45 | (define-public guile-1.8 |
46 | (package | |
47 | (name "guile") | |
48 | (version "1.8.8") | |
49 | (source (origin | |
87f5d366 | 50 | (method url-fetch) |
0db342a5 | 51 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
52 | ".tar.gz")) |
53 | (sha256 | |
54 | (base32 | |
55 | "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3")))) | |
56 | (build-system gnu-build-system) | |
57 | (arguments '(#:configure-flags '("--disable-error-on-warning") | |
58 | #:patches (list (assoc-ref %build-inputs "patch/snarf")) | |
59 | ||
60 | ;; Insert a phase before `configure' to patch things up. | |
61 | #:phases (alist-cons-before | |
62 | 'configure | |
2f4fbe1c | 63 | 'patch-stuff |
c44899a2 LC |
64 | (lambda* (#:key outputs #:allow-other-keys) |
65 | ;; Add a call to `lt_dladdsearchdir' so that | |
66 | ;; `libguile-readline.so' & co. are in the | |
67 | ;; loader's search path. | |
68 | (substitute* "libguile/dynl.c" | |
2f4fbe1c LC |
69 | (("lt_dlinit.*$" match) |
70 | (format #f | |
71 | " ~a~% lt_dladdsearchdir(\"~a/lib\");~%" | |
72 | match | |
73 | (assoc-ref outputs "out")))) | |
74 | ||
75 | ;; The usual /bin/sh... | |
76 | (substitute* "ice-9/popen.scm" | |
77 | (("/bin/sh") (which "sh")))) | |
c44899a2 LC |
78 | %standard-phases))) |
79 | (inputs `(("patch/snarf" ,(search-patch "guile-1.8-cpp-4.5.patch")) | |
80 | ("gawk" ,gawk) | |
81 | ("readline" ,readline))) | |
82 | ||
83 | ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be | |
84 | ;; propagated. | |
85 | (propagated-inputs `(("gmp" ,gmp) | |
86 | ("libtool" ,libtool))) | |
87 | ||
88 | ;; When cross-compiling, a native version of Guile itself is needed. | |
89 | (self-native-input? #t) | |
90 | ||
91 | (synopsis "GNU Guile 1.8, an embeddable Scheme interpreter") | |
92 | (description | |
93 | "GNU Guile 1.8 is an interpreter for the Scheme programming language, | |
94 | packaged as a library that can be embedded into programs to make them | |
95 | extensible. It supports many SRFIs.") | |
96 | (home-page "http://www.gnu.org/software/guile/") | |
4a44e743 | 97 | (license lgpl2.0+))) |
c44899a2 LC |
98 | |
99 | (define-public guile-2.0 | |
100 | (package | |
101 | (name "guile") | |
3af4e053 | 102 | (version "2.0.7") |
c44899a2 | 103 | (source (origin |
87f5d366 | 104 | (method url-fetch) |
0db342a5 | 105 | (uri (string-append "mirror://gnu/guile/guile-" version |
c44899a2 LC |
106 | ".tar.xz")) |
107 | (sha256 | |
108 | (base32 | |
3af4e053 | 109 | "0f53pxkia4v17n0avwqlcjpy0n89hkazm2xsa6p84lv8k6k8y9vg")))) |
c44899a2 LC |
110 | (build-system gnu-build-system) |
111 | (native-inputs `(("pkgconfig" ,pkg-config))) | |
112 | (inputs `(("libffi" ,libffi) | |
113 | ("readline" ,readline))) | |
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 | ||
123 | ;; The headers and/or `guile-2.0.pc' refer to these packages, so they | |
124 | ;; must be propagated. | |
125 | ("bdw-gc" ,libgc) | |
126 | ("gmp" ,gmp))) | |
127 | ||
128 | (self-native-input? #t) | |
129 | ||
8ffaa93b LC |
130 | (arguments |
131 | '(#:phases (alist-cons-before | |
132 | 'configure 'pre-configure | |
133 | (lambda* (#:key inputs #:allow-other-keys) | |
134 | (let ((bash (assoc-ref inputs "bash"))) | |
135 | (substitute* "module/ice-9/popen.scm" | |
136 | (("/bin/sh") | |
137 | (string-append bash "/bin/bash"))))) | |
138 | %standard-phases))) | |
139 | ||
c44899a2 LC |
140 | (synopsis "GNU Guile 2.0, an embeddable Scheme implementation") |
141 | (description | |
142 | "GNU Guile is an implementation of the Scheme programming language, with | |
143 | support for many SRFIs, packaged for use in a wide variety of environments. | |
144 | In addition to implementing the R5RS Scheme standard and a large subset of | |
145 | R6RS, Guile includes a module system, full access to POSIX system calls, | |
146 | networking support, multiple threads, dynamic linking, a foreign function | |
147 | call interface, and powerful string processing.") | |
148 | (home-page "http://www.gnu.org/software/guile/") | |
4a44e743 | 149 | (license lgpl3+))) |
c44899a2 | 150 | |
fa29b199 LC |
151 | (define-public guile-2.0/fixed |
152 | ;; A package of Guile 2.0 that's rarely changed. It is the one used | |
153 | ;; in the `base' module, and thus changing it entails a full rebuild. | |
325285d5 | 154 | guile-2.0) |
fa29b199 | 155 | |
c44899a2 LC |
156 | \f |
157 | ;;; | |
158 | ;;; Extensions. | |
159 | ;;; | |
160 | ||
1722d680 LC |
161 | (define (guile-reader guile) |
162 | "Build Guile-Reader against GUILE, a package of some version of Guile 1.8 | |
163 | or 2.0." | |
164 | (package | |
ba4bcae0 | 165 | (name (string-append "guile-reader-for-guile_" (package-version guile))) |
1722d680 LC |
166 | (version "0.6") |
167 | (source (origin | |
87f5d366 | 168 | (method url-fetch) |
1722d680 LC |
169 | (uri (string-append |
170 | "http://download-mirror.savannah.gnu.org/releases/guile-reader/guile-reader-" | |
171 | version ".tar.gz")) | |
172 | (sha256 | |
173 | (base32 | |
174 | "1svlyk5pm4fsdp2g7n6qffdl6fdggxnlicj0jn9s4lxd63gzxy1n")))) | |
175 | (build-system gnu-build-system) | |
cb0d69ed | 176 | (native-inputs `(("pkgconfig" ,pkg-config) |
1627f7f7 | 177 | ("gperf" ,gperf))) |
1722d680 | 178 | (inputs `(("guile" ,guile))) |
d45122f5 | 179 | (synopsis "Guile-Reader, a simple framework for building readers for |
1722d680 | 180 | GNU Guile") |
d45122f5 | 181 | (description |
1722d680 LC |
182 | "Guile-Reader is a simple framework for building readers for GNU Guile. |
183 | ||
184 | The idea is to make it easy to build procedures that extend Guile’s read | |
185 | procedure. Readers supporting various syntax variants can easily be written, | |
186 | possibly by re-using existing “token readers” of a standard Scheme | |
187 | readers. For example, it is used to implement Skribilo’s R5RS-derived | |
188 | document syntax. | |
189 | ||
190 | Guile-Reader’s approach is similar to Common Lisp’s “read table”, but | |
191 | hopefully more powerful and flexible (for instance, one may instantiate as | |
192 | many readers as needed).") | |
193 | (home-page "http://www.nongnu.org/guile-reader/") | |
4a44e743 | 194 | (license gpl3+))) |
1722d680 LC |
195 | |
196 | (define-public guile-reader/guile-1.8 | |
197 | ;; Guile-Reader built against Guile 1.8. | |
198 | (guile-reader guile-1.8)) | |
199 | ||
200 | (define-public guile-reader/guile-2.0 | |
201 | ;; Guile-Reader built against Guile 2.0. | |
202 | (guile-reader guile-2.0)) | |
203 | ||
ef02e1e9 LC |
204 | (define-public guile-ncurses |
205 | (package | |
206 | (name "guile-ncurses") | |
207 | (version "1.3") | |
208 | (source (origin | |
209 | (method url-fetch) | |
210 | (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-" | |
211 | version ".tar.gz")) | |
212 | (sha256 | |
213 | (base32 | |
214 | "0chvfjrlmg99db98ra9vzwjmbypqx7d4ssm8q0kvzi0n0p9irszi")))) | |
215 | (build-system gnu-build-system) | |
216 | (inputs `(("ncurses" ,ncurses) | |
217 | ("guile" ,guile-2.0))) | |
218 | (arguments | |
219 | '(#:configure-flags (list (string-append "--with-guilesitedir=" | |
220 | (assoc-ref %outputs "out") | |
221 | "/share/guile/site")) | |
222 | #:phases (alist-cons-after | |
223 | 'install 'post-install | |
224 | (lambda* (#:key outputs #:allow-other-keys) | |
225 | (let* ((out (assoc-ref outputs "out")) | |
226 | (dir (string-append out "/share/guile/site/")) | |
227 | (files (find-files dir ".scm"))) | |
228 | (substitute* files | |
229 | (("\"libguile-ncurses\"") | |
230 | (format #f "\"~a/lib/libguile-ncurses\"" | |
231 | out))))) | |
232 | %standard-phases))) | |
233 | (home-page "http://www.gnu.org/software/guile-ncurses/") | |
234 | (synopsis | |
235 | "GNU Guile-Ncurses, Scheme interface to the NCurses libraries") | |
236 | (description | |
237 | "GNU Guile-Ncurses is a library for the Guile Scheme interpreter that | |
238 | provides functions for creating text user interfaces. The text user interface | |
239 | functionality is built on the ncurses libraries: curses, form, panel, and | |
240 | menu.") | |
241 | (license lgpl3+))) | |
242 | ||
87d836b2 LC |
243 | (define-public mcron |
244 | (package | |
245 | (name "mcron") | |
246 | (version "1.0.6") | |
247 | (source (origin | |
248 | (method url-fetch) | |
249 | (uri (string-append "mirror://gnu/mcron/mcron-" | |
250 | version ".tar.gz")) | |
251 | (sha256 | |
252 | (base32 | |
253 | "0yvrfzzdy2m7fbqkr61fw01wd9r2jpnbyabxhcsfivgxywknl0fy")))) | |
254 | (build-system gnu-build-system) | |
255 | (arguments | |
256 | '(#:patches (list (assoc-ref %build-inputs "patch/install")))) | |
257 | (inputs | |
258 | `(("ed" ,ed) ("which" ,which) ("guile" ,guile-1.8) | |
259 | ("patch/install" ,(search-patch "mcron-install.patch")))) | |
260 | (home-page "http://www.gnu.org/software/mcron/") | |
261 | (synopsis | |
262 | "GNU mcron, a flexible implementation of `cron' in Guile") | |
263 | (description | |
264 | "The GNU package mcron (Mellor's cron) is a 100% compatible replacement | |
265 | for Vixie cron. It is written in pure Guile, and allows configuration files | |
266 | to be written in scheme (as well as Vixie's original format) for infinite | |
267 | flexibility in specifying when jobs should be run. Mcron was written by Dale | |
268 | Mellor.") | |
269 | (license gpl3+))) | |
270 | ||
1722d680 | 271 | ;;; guile.scm ends here |