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