gnu: usbutils: Update to 008.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
d9f0788a 2;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
b515822d 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6bc24063 4;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
44a2bdf8 5;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
daeb61f7 6;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
76e6e663 7;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
4176eb19 8;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
bd9af610 9;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
8a666bc5 10;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
3b5783fc 11;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
1722d680 12;;;
233e7676 13;;; This file is part of GNU Guix.
1722d680 14;;;
233e7676 15;;; GNU Guix is free software; you can redistribute it and/or modify it
1722d680
LC
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
233e7676 20;;; GNU Guix is distributed in the hope that it will be useful, but
1722d680
LC
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
233e7676 26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
1722d680 27
1ffa7090 28(define-module (gnu packages guile)
4a44e743 29 #:use-module (guix licenses)
59a43334 30 #:use-module (gnu packages)
472fc855 31 #:use-module (gnu packages aspell)
9c782445 32 #:use-module (gnu packages bash)
1ffa7090
LC
33 #:use-module (gnu packages bdw-gc)
34 #:use-module (gnu packages gawk)
35 #:use-module (gnu packages gperf)
36 #:use-module (gnu packages libffi)
37 #:use-module (gnu packages autotools)
f906d30c 38 #:use-module (gnu packages flex)
1ffa7090 39 #:use-module (gnu packages libunistring)
7119cca8 40 #:use-module (gnu packages linux)
1ffa7090
LC
41 #:use-module (gnu packages m4)
42 #:use-module (gnu packages multiprecision)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages readline)
ef02e1e9 45 #:use-module (gnu packages ncurses)
87d836b2 46 #:use-module (gnu packages ed)
ce0614dd 47 #:use-module (gnu packages base)
f906d30c 48 #:use-module (gnu packages texinfo)
01497dfe 49 #:use-module (gnu packages man)
f906d30c 50 #:use-module (gnu packages gettext)
b416aadf 51 #:use-module (gnu packages databases)
9d373377 52 #:use-module (gnu packages python)
5649c8cd
DT
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages sdl)
55 #:use-module (gnu packages maths)
56 #:use-module (gnu packages image)
bd9af610
AK
57 #:use-module (gnu packages xdisorg)
58 #:use-module (gnu packages xorg)
1722d680 59 #:use-module (guix packages)
87f5d366 60 #:use-module (guix download)
6bc24063 61 #:use-module (guix git-download)
32795fcf 62 #:use-module (guix build-system gnu)
6bc24063 63 #:use-module (guix build-system trivial)
32795fcf
LC
64 #:use-module (guix utils)
65 #:use-module (ice-9 match))
1722d680
LC
66
67;;; Commentary:
68;;;
c44899a2 69;;; GNU Guile, and modules and extensions.
1722d680
LC
70;;;
71;;; Code:
72
c44899a2
LC
73(define-public guile-1.8
74 (package
75 (name "guile")
76 (version "1.8.8")
77 (source (origin
87f5d366 78 (method url-fetch)
0db342a5 79 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
80 ".tar.gz"))
81 (sha256
82 (base32
01eafd38 83 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
fc1adab1 84 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
c44899a2
LC
85 (build-system gnu-build-system)
86 (arguments '(#:configure-flags '("--disable-error-on-warning")
c44899a2
LC
87
88 ;; Insert a phase before `configure' to patch things up.
89 #:phases (alist-cons-before
90 'configure
2f4fbe1c 91 'patch-stuff
c44899a2
LC
92 (lambda* (#:key outputs #:allow-other-keys)
93 ;; Add a call to `lt_dladdsearchdir' so that
94 ;; `libguile-readline.so' & co. are in the
95 ;; loader's search path.
96 (substitute* "libguile/dynl.c"
2f4fbe1c
LC
97 (("lt_dlinit.*$" match)
98 (format #f
99 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
100 match
101 (assoc-ref outputs "out"))))
102
103 ;; The usual /bin/sh...
104 (substitute* "ice-9/popen.scm"
105 (("/bin/sh") (which "sh"))))
c44899a2 106 %standard-phases)))
01eafd38 107 (inputs `(("gawk" ,gawk)
c44899a2
LC
108 ("readline" ,readline)))
109
110 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
111 ;; propagated.
112 (propagated-inputs `(("gmp" ,gmp)
be11b102 113 ("libltdl" ,libltdl)))
c44899a2
LC
114
115 ;; When cross-compiling, a native version of Guile itself is needed.
116 (self-native-input? #t)
117
9be8d7c8
LC
118 (native-search-paths
119 (list (search-path-specification
120 (variable "GUILE_LOAD_PATH")
af070955 121 (files '("share/guile/site")))))
9be8d7c8 122
f50d2669 123 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 124 (description
a22dc0c4
LC
125 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
126official extension language of the GNU system. It is an implementation of
127the Scheme language which can be easily embedded in other applications to
128provide a convenient means of extending the functionality of the application
129without requiring the source code to be rewritten.")
c44899a2 130 (home-page "http://www.gnu.org/software/guile/")
4a44e743 131 (license lgpl2.0+)))
c44899a2
LC
132
133(define-public guile-2.0
134 (package
135 (name "guile")
7f9c8970 136 (version "2.0.12")
c62a31ca 137 (replacement guile-2.0.13) ;CVE-2016-8606 and CVE-2016-8605
c44899a2 138 (source (origin
87f5d366 139 (method url-fetch)
0db342a5 140 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
141 ".tar.xz"))
142 (sha256
143 (base32
923d9caa 144 "1sdpjq0jf1h65w29q0zprj4x6kdp5jskkvbnlwphy9lvdxrqg0fy"))))
c44899a2
LC
145 (build-system gnu-build-system)
146 (native-inputs `(("pkgconfig" ,pkg-config)))
147 (inputs `(("libffi" ,libffi)
9c782445 148 ("readline" ,readline)
88da729f
JN
149 ,@(libiconv-if-needed)
150 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
c44899a2
LC
151 (propagated-inputs
152 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
153 ;; reads `-lltdl -lunistring', adding them here will add the needed
154 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
155 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
156 ("libunistring" ,libunistring)
be11b102
LC
157
158 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
159 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
160 ("libltdl" ,libltdl)
c44899a2
LC
161
162 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
163 ;; must be propagated.
bda1bc6c 164 ("bdw-gc" ,libgc)
c44899a2
LC
165 ("gmp" ,gmp)))
166
167 (self-native-input? #t)
168
9bf62d9b
LC
169 (outputs '("out" "debug"))
170
8ffaa93b 171 (arguments
b5e0c870
LC
172 `(#:configure-flags '("--disable-static") ;saves 3MiB
173 #:phases (alist-cons-before
8ffaa93b
LC
174 'configure 'pre-configure
175 (lambda* (#:key inputs #:allow-other-keys)
58b4e8e8 176 ;; Tell (ice-9 popen) the file name of Bash.
8ffaa93b
LC
177 (let ((bash (assoc-ref inputs "bash")))
178 (substitute* "module/ice-9/popen.scm"
88da729f
JN
179 ;; If bash is #f allow fallback for user to provide
180 ;; "bash" in PATH. This happens when cross-building to
181 ;; MinGW for which we do not have Bash yet.
8ffaa93b 182 (("/bin/sh")
88da729f
JN
183 ,@(if (target-mingw?)
184 '((if bash
185 (string-append bash "/bin/bash")
186 "bash"))
187 '((string-append bash "/bin/bash")))))))
db619089 188 %standard-phases)))
8ffaa93b 189
9be8d7c8
LC
190 (native-search-paths
191 (list (search-path-specification
192 (variable "GUILE_LOAD_PATH")
af070955 193 (files '("share/guile/site/2.0")))
9be8d7c8
LC
194 (search-path-specification
195 (variable "GUILE_LOAD_COMPILED_PATH")
ca408580 196 (files '("lib/guile/2.0/site-ccache"
05f1e956 197 "share/guile/site/2.0")))))
9be8d7c8 198
f50d2669 199 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 200 (description
a22dc0c4
LC
201 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
202official extension language of the GNU system. It is an implementation of
203the Scheme language which can be easily embedded in other applications to
204provide a convenient means of extending the functionality of the application
205without requiring the source code to be rewritten.")
c44899a2 206 (home-page "http://www.gnu.org/software/guile/")
4a44e743 207 (license lgpl3+)))
c44899a2 208
fa29b199
LC
209(define-public guile-2.0/fixed
210 ;; A package of Guile 2.0 that's rarely changed. It is the one used
211 ;; in the `base' module, and thus changing it entails a full rebuild.
c62a31ca
LC
212 (package
213 (inherit guile-2.0)
214 (properties '((hidden? . #t))) ;people should install 'guile-2.0'
215 (replacement #f)))
216
217(define guile-2.0.13
218 (package
219 (inherit guile-2.0)
220 (version "2.0.13")
221 (source (origin
222 (method url-fetch)
223 (uri (string-append "mirror://gnu/guile/guile-" version
224 ".tar.xz"))
225 (sha256
226 (base32
8134dc1f
LC
227 "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p"))
228 (patches (search-patches "guile-repl-server-test.patch"))))))
fa29b199 229
be3feafe 230(define-public guile-next
f906d30c 231 (package (inherit guile-2.0)
be3feafe 232 (name "guile-next")
ddda5338 233 (version "2.1.4")
c62a31ca 234 (replacement #f)
4eae7980
LC
235 (source (origin
236 (method url-fetch)
237 (uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-"
238 version ".tar.xz"))
239 (sha256
240 (base32
ddda5338 241 "1w8kyy8nz6489d092fix6lvgjrk0bww7i0c2k67ym4hq0kjl0r1j"))
d9f0788a
LC
242 (modules '((guix build utils)))
243
244 ;; Remove the pre-built object files. Instead, build everything
245 ;; from source, at the expense of significantly longer build
246 ;; times (almost 3 hours on a 4-core Intel i5).
247 (snippet '(for-each delete-file
248 (find-files "prebuilt" "\\.go$")))))
dd90ed89 249 (synopsis "Snapshot of what will become version 2.2 of GNU Guile")
7f43ff96 250 (properties '((timeout . 72000))) ; 20 hours
dd90ed89
DT
251 (native-search-paths
252 (list (search-path-specification
253 (variable "GUILE_LOAD_PATH")
254 (files '("share/guile/site/2.2")))
255 (search-path-specification
256 (variable "GUILE_LOAD_COMPILED_PATH")
31769b9f 257 (files '("lib/guile/2.2/site-ccache"
dd90ed89 258 "share/guile/site/2.2")))))))
4eae7980 259
947a5d47
LC
260(define (guile-2.2-package-name name)
261 "Return NAME with a \"guile2.2-\" prefix instead of \"guile-\", when
262applicable."
263 (if (string-prefix? "guile-" name)
264 (string-append "guile2.2-"
265 (string-drop name
266 (string-length "guile-")))
267 name))
268
269(define package-for-guile-2.2
270 ;; A procedure that rewrites the dependency tree of the given package to use
271 ;; GUILE-NEXT instead of GUILE-2.0.
272 (package-input-rewriting `((,guile-2.0 . ,guile-next))
273 guile-2.2-package-name))
274
4eae7980
LC
275(define-public guile-for-guile-emacs
276 (package (inherit guile-next)
277 (name "guile-for-guile-emacs")
278 (version "20150510.d8d9a8d")
f906d30c
CAW
279 (source (origin
280 (method git-fetch)
281 (uri (git-reference
4eae7980
LC
282 (url "git://git.hcoop.net/git/bpt/guile.git")
283 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
f906d30c
CAW
284 (sha256
285 (base32
4eae7980 286 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
f906d30c
CAW
287 (arguments
288 (substitute-keyword-arguments `(;; Tests aren't passing for now.
289 ;; Obviously we should re-enable this!
290 #:tests? #f
4eae7980 291 ,@(package-arguments guile-next))
f906d30c
CAW
292 ((#:phases phases)
293 `(modify-phases ,phases
294 (add-after 'unpack 'autogen
295 (lambda _
296 (zero? (system* "sh" "autogen.sh"))))
297 (add-before 'autogen 'patch-/bin/sh
298 (lambda _
299 (substitute* "build-aux/git-version-gen"
300 (("#!/bin/sh") (string-append "#!" (which "sh"))))
301 #t))))))
302 (native-inputs
303 `(("autoconf" ,autoconf)
304 ("automake" ,automake)
305 ("libtool" ,libtool)
306 ("flex" ,flex)
307 ("texinfo" ,texinfo)
b94a6ca0 308 ("gettext" ,gettext-minimal)
daeb61f7
RW
309 ,@(package-native-inputs guile-next)))
310 ;; Same as in guile-2.0
311 (native-search-paths
312 (list (search-path-specification
313 (variable "GUILE_LOAD_PATH")
314 (files '("share/guile/site/2.0")))
315 (search-path-specification
316 (variable "GUILE_LOAD_COMPILED_PATH")
31769b9f 317 (files '("lib/guile/2.0/site-ccache"
daeb61f7 318 "share/guile/site/2.0")))))))
be3feafe 319
c44899a2
LC
320\f
321;;;
322;;; Extensions.
323;;;
324
7119cca8
ML
325(define-public artanis
326 (package
327 (name "artanis")
c84ceace 328 (version "0.1.2")
7119cca8
ML
329 (source (origin
330 (method url-fetch)
331 (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
332 version ".tar.gz"))
333 (sha256
334 (base32
8a666bc5
AFN
335 "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
336 (patches (search-patches "artanis-fix-Makefile.in.patch"))))
7119cca8
ML
337 (build-system gnu-build-system)
338 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
339 (inputs `(("guile" ,guile-2.0)))
340 (native-inputs `(("bash" ,bash) ;for the `source' builtin
341 ("pkgconfig" ,pkg-config)
342 ("util-linux" ,util-linux))) ;for the `script' command
343 (arguments
344 '(#:make-flags
345 ;; TODO: The documentation must be built with the `docs' target.
346 (let* ((out (assoc-ref %outputs "out"))
347 (dir (string-append out "/share/guile/site/2.0")))
348 ;; Don't use (%site-dir) for site paths.
349 (list (string-append "MOD_PATH=" dir)
8a666bc5 350 (string-append "MOD_COMPILED_PATH=" dir)))
7119cca8
ML
351 #:test-target "test"
352 #:phases
353 (modify-phases %standard-phases
354 (add-before
355 'install 'substitute-root-dir
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out")))
358 (substitute* "Makefile" ;ignore the execution of bash.bashrc
359 ((" /etc/bash.bashrc") " /dev/null"))
360 (substitute* "Makefile" ;set the root of config files to OUT
361 ((" /etc") (string-append " " out "/etc")))
362 (mkdir-p (string-append out "/bin")) ;for the `art' executable
363 #t))))))
364 (synopsis "Web application framework written in Guile")
365 (description "GNU Artanis is a web application framework written in Guile
366Scheme. A web application framework (WAF) is a software framework that is
367designed to support the development of dynamic websites, web applications, web
368services and web resources. The framework aims to alleviate the overhead
369associated with common activities performed in web development. Artanis
370provides several tools for web development: database access, templating
371frameworks, session management, URL-remapping for RESTful, page caching, and
372more.")
373 (home-page "https://www.gnu.org/software/artanis/")
374 (license (list gpl3+ lgpl3+)))) ;dual license
375
d6d9f1f7 376(define-public guile-reader
1722d680 377 (package
d6d9f1f7 378 (name "guile-reader")
ad29c6f2 379 (version "0.6.1")
d6d9f1f7
LC
380 (source (origin
381 (method url-fetch)
382 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
383 version ".tar.gz"))
384 (sha256
385 (base32
ad29c6f2 386 "020wz5w8z6g79nbqifg2n496wxwkcjzh8xizpv6mz0hczpl155ma"))))
d6d9f1f7
LC
387 (build-system gnu-build-system)
388 (native-inputs `(("pkgconfig" ,pkg-config)
389 ("gperf" ,gperf)))
390 (inputs `(("guile" ,guile-2.0)))
ad29c6f2 391 (arguments `(#:configure-flags
d6d9f1f7
LC
392 (let ((out (assoc-ref %outputs "out")))
393 (list (string-append "--with-guilemoduledir="
394 out "/share/guile/site/2.0")))))
395 (synopsis "Framework for building readers for GNU Guile")
396 (description
397 "Guile-Reader is a simple framework for building readers for GNU Guile.
1722d680
LC
398
399The idea is to make it easy to build procedures that extend Guile’s read
35b9e423 400procedure. Readers supporting various syntax variants can easily be written,
1722d680 401possibly by re-using existing “token readers” of a standard Scheme
35b9e423 402readers. For example, it is used to implement Skribilo’s R5RS-derived
1722d680
LC
403document syntax.
404
405Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
406hopefully more powerful and flexible (for instance, one may instantiate as
407many readers as needed).")
d6d9f1f7
LC
408 (home-page "http://www.nongnu.org/guile-reader/")
409 (license gpl3+)))
1722d680 410
ef02e1e9
LC
411(define-public guile-ncurses
412 (package
413 (name "guile-ncurses")
d81850d4 414 (version "2.1")
ef02e1e9
LC
415 (source (origin
416 (method url-fetch)
417 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
418 version ".tar.gz"))
419 (sha256
420 (base32
d81850d4 421 "1h7rnq4g7xlxxybcb3vjq6nscm9zhlmfaxb7258c8ax7him4azg6"))))
ef02e1e9
LC
422 (build-system gnu-build-system)
423 (inputs `(("ncurses" ,ncurses)
424 ("guile" ,guile-2.0)))
0881b616 425 (native-inputs `(("pkg-config" ,pkg-config)))
ef02e1e9 426 (arguments
2c6b7c7d 427 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
0881b616 428 "--with-gnu-filesystem-hierarchy")
fa37f21b
EF
429 #:phases
430 (modify-phases %standard-phases
431 (add-after 'install 'post-install
432 (lambda* (#:key outputs #:allow-other-keys)
433 (let* ((out (assoc-ref outputs "out"))
434 (dir (string-append out "/share/guile/site/"))
435 (files (find-files dir ".scm")))
436 (substitute* files
437 (("\"libguile-ncurses\"")
0881b616 438 (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
d81850d4
EF
439 out)))
440 #t))))))
441 (home-page "https://www.gnu.org/software/guile-ncurses/")
f50d2669 442 (synopsis "Guile bindings to ncurses")
ef02e1e9 443 (description
12bcf94a 444 "guile-ncurses provides Guile language bindings for the ncurses
79c311b8 445library.")
ef02e1e9
LC
446 (license lgpl3+)))
447
87d836b2
LC
448(define-public mcron
449 (package
450 (name "mcron")
d12c626c 451 (version "1.0.8")
87d836b2
LC
452 (source (origin
453 (method url-fetch)
454 (uri (string-append "mirror://gnu/mcron/mcron-"
455 version ".tar.gz"))
456 (sha256
457 (base32
d12c626c 458 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
fc1adab1 459 (patches (search-patches "mcron-install.patch"))))
87d836b2 460 (build-system gnu-build-system)
b6c18d6a
LC
461 (native-inputs `(("pkg-config" ,pkg-config)))
462 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
87d836b2 463 (home-page "http://www.gnu.org/software/mcron/")
f50d2669 464 (synopsis "Run jobs at scheduled times")
87d836b2 465 (description
79c311b8 466 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
a22dc0c4 467tasks on a schedule, such as every hour or every Monday. Mcron is written in
79c311b8
LC
468Guile, so its configuration can be written in Scheme; the original cron
469format is also supported.")
87d836b2
LC
470 (license gpl3+)))
471
01497dfe
LC
472(define-public mcron2
473 ;; This is mthl's mcron development branch, not yet merged in mcron.
474 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
475 (package
476 (inherit mcron)
477 (name "mcron2")
478 (version (string-append (package-version mcron) "-0."
479 (string-take commit 7)))
480 (source (origin
481 (method git-fetch)
482 (uri (git-reference
483 (url "https://notabug.org/mthl/mcron/")
484 (commit commit)))
485 (sha256
486 (base32
487 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
488 (file-name (string-append name "-" version "-checkout"))))
489 (native-inputs
490 `(("autoconf" ,autoconf)
491 ("automake" ,automake)
492 ("pkg-config" ,pkg-config)
493 ("texinfo" ,texinfo)
494 ("help2man" ,help2man)))
495 (arguments
496 `(#:modules ((ice-9 match) (ice-9 ftw)
497 ,@%gnu-build-system-modules)
498
499 #:phases (modify-phases %standard-phases
500 (add-after 'unpack 'bootstrap
501 (lambda _
502 (zero? (system* "autoreconf" "-vfi"))))
503 (add-after 'install 'wrap-mcron
504 (lambda* (#:key outputs #:allow-other-keys)
505 ;; Wrap the 'mcron' command to refer to the right
506 ;; modules.
507 (let* ((out (assoc-ref outputs "out"))
508 (bin (string-append out "/bin"))
509 (site (string-append
510 out "/share/guile/site")))
511 (match (scandir site)
512 (("." ".." version)
513 (let ((modules (string-append site "/" version)))
514 (wrap-program (string-append bin "/mcron")
515 `("GUILE_LOAD_PATH" ":" prefix
516 (,modules))
517 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
518 (,modules)))
519 #t))))))))))))
520
3e9066fc
LC
521(define-public guile-lib
522 (package
523 (name "guile-lib")
bf62b8ff 524 (version "0.2.3")
3e9066fc
LC
525 (source (origin
526 (method url-fetch)
527 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
528 version ".tar.gz"))
529 (sha256
530 (base32
bf62b8ff 531 "0pwdd52vakni1fabaiav8v0ad7xp3bx8x3brijbr1mpgamm9dxqc"))))
3e9066fc
LC
532 (build-system gnu-build-system)
533 (arguments
9d356c9c
LC
534 '(#:phases (modify-phases %standard-phases
535 (add-before 'configure 'patch-module-dir
536 (lambda _
537 (substitute* "src/Makefile.in"
bf62b8ff
LC
538 (("^moddir = ([[:graph:]]+)")
539 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
540 (("^godir = ([[:graph:]]+)")
541 "godir = \
542$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
543 #t))
544 (replace 'check
545 (lambda _
546 ;; Work around a harmless test failure involving
547 ;; two-spaces-after-period rendering.
548 (zero? (system* "make" "check" ;"-C" "unit-tests"
549 "XFAIL_TESTS=texinfo.serialize.scm")))))))
550 (native-inputs `(("pkg-config" ,pkg-config)))
3e9066fc
LC
551 (inputs `(("guile" ,guile-2.0)))
552 (home-page "http://www.nongnu.org/guile-lib/")
553 (synopsis "Collection of useful Guile Scheme modules")
554 (description
35b9e423 555 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
3e9066fc
LC
556modules, allowing for people to cooperate integrating their generic Guile
557modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
558for Guile\".")
559
560 ;; The whole is under GPLv3+, but some modules are under laxer
561 ;; distribution terms such as LGPL and public domain. See `COPYING' for
562 ;; details.
563 (license gpl3+)))
564
6050a1fb
CR
565(define-public guile-json
566 (package
567 (name "guile-json")
1644f0cd 568 (version "0.5.0")
6050a1fb 569 (source (origin
ffc72ec6
LC
570 (method url-fetch)
571 (uri (string-append "mirror://savannah/guile-json/guile-json-"
572 version ".tar.gz"))
573 (sha256
574 (base32
575 "0l8a34l92nrdszy7ykycfvr8y0n0yi5qb3ccliycvpvf9mzk5n8d"))
576 (modules '((guix build utils)))
577 (snippet
578 ;; Make sure everything goes under .../site/X.Y, like Guile's
579 ;; search paths expects.
580 '(begin
581 (substitute* "configure"
582 (("ac_subst_vars='")
583 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
584 (substitute* '("Makefile.in" "json/Makefile.in")
585 (("moddir =.*/share/guile/site" all)
586 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
6050a1fb 587 (build-system gnu-build-system)
db5584dd 588 (native-inputs `(("guile" ,guile-2.0)))
6050a1fb
CR
589 (home-page "http://savannah.nongnu.org/projects/guile-json/")
590 (synopsis "JSON module for Guile")
591 (description
592 "Guile-json supports parsing and building JSON documents according to the
35b9e423 593http:://json.org specification. These are the main features:
6050a1fb
CR
594- Strictly complies to http://json.org specification.
595- Build JSON documents programmatically via macros.
596- Unicode support for strings.
597- Allows JSON pretty printing.")
598 (license lgpl3+)))
599
947a5d47
LC
600(define-public guile2.2-json
601 (package-for-guile-2.2 guile-json))
602
6bc24063
CAW
603(define-public guile-minikanren
604 (package
605 (name "guile-minikanren")
606 (version "20150424.e844d85")
607 (source (origin
608 (method git-fetch)
609 (uri (git-reference
610 (url "https://github.com/ijp/minikanren.git")
611 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
821f4dc2 612 (file-name (string-append name "-" version "-checkout"))
6bc24063
CAW
613 (sha256
614 (base32
615 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
616 (build-system trivial-build-system)
617 (arguments
4b74a29d 618 `(#:modules ((guix build utils))
6bc24063
CAW
619 #:builder
620 (begin
621 (use-modules (guix build utils)
4b74a29d
LC
622 (ice-9 match)
623 (ice-9 popen)
624 (ice-9 rdelim))
625
6bc24063 626 (let* ((out (assoc-ref %outputs "out"))
4b74a29d
LC
627 (guile (assoc-ref %build-inputs "guile"))
628 (effective (read-line
629 (open-pipe* OPEN_READ
630 (string-append guile "/bin/guile")
631 "-c" "(display (effective-version))")))
632 (module-dir (string-append out "/share/guile/site/"
633 effective))
6bc24063 634 (source (assoc-ref %build-inputs "source"))
f3d8cd79 635 (doc (string-append out "/share/doc/guile-minikanren"))
6bc24063
CAW
636 (scm-files '("minikanren.scm"
637 "minikanren/mkextraforms.scm"
638 "minikanren/mkprelude.scm"
639 "minikanren/mk.scm"))
640 (guild (string-append (assoc-ref %build-inputs "guile")
641 "/bin/guild")))
642 ;; Make installation directories.
643 (mkdir-p (string-append module-dir "/minikanren"))
644 (mkdir-p doc)
645
646 ;; Compile .scm files and install.
647 (chdir source)
648 (setenv "GUILE_AUTO_COMPILE" "0")
649 (for-each (lambda (file)
650 (let* ((dest-file (string-append module-dir "/"
76e6e663 651 file))
6bc24063
CAW
652 (go-file (match (string-split file #\.)
653 ((base _)
654 (string-append module-dir "/"
655 base ".go")))))
656 ;; Install source module.
657 (copy-file file dest-file)
658 ;; Install compiled module.
659 (unless (zero? (system* guild "compile"
660 "-L" source
661 "-o" go-file
662 file))
663 (error (format #f "Failed to compile ~s to ~s!"
664 file go-file)))))
665 scm-files)
666
667 ;; Also copy over the README.
96c46210 668 (install-file "README.org" doc)
6bc24063
CAW
669 #t))))
670 (inputs
671 `(("guile" ,guile-2.0)))
672 (home-page "https://github.com/ijp/minikanren")
e881752c 673 (synopsis "MiniKanren declarative logic system, packaged for Guile")
6bc24063
CAW
674 (description
675 "MiniKanren is a relational programming extension to the Scheme
676programming Language, written as a smaller version of Kanren suitable for
677pedagogical purposes. It is featured in the book, The Reasoned Schemer,
678written by Dan Friedman, William Byrd, and Oleg Kiselyov.
679
e881752c 680This is Ian Price's r6rs packaged version of miniKanren, which deviates
6bc24063
CAW
681slightly from miniKanren mainline.
682
683See http://minikanren.org/ for more on miniKanren generally.")
684 (license expat)))
685
947a5d47
LC
686(define-public guile2.2-minikanren
687 (package-for-guile-2.2 guile-minikanren))
688
32e14fc1
CAW
689(define-public guile-irregex
690 (package
691 (name "guile-irregex")
d03f9446 692 (version "0.9.4")
32e14fc1
CAW
693 (source (origin
694 (method url-fetch)
695 (uri (string-append
696 "http://synthcode.com/scheme/irregex/irregex-"
d03f9446 697 version ".tar.gz"))
32e14fc1
CAW
698 (sha256
699 (base32
d03f9446 700 "0cmaqvqvyarcnnsyrl2p6vwyv1r3k1q7qw8p9zrlnz1vpbj7vb90"))))
32e14fc1
CAW
701 (build-system gnu-build-system)
702 (arguments
703 `(#:modules ((guix build utils)
704 (ice-9 match)
fe447664
LC
705 (ice-9 rdelim)
706 (ice-9 popen)
32e14fc1
CAW
707 (guix build gnu-build-system))
708 #:phases
709 (modify-phases %standard-phases
32e14fc1
CAW
710 (delete 'configure)
711 (delete 'build)
712 (delete 'check)
713 (replace 'install
714 (lambda* (#:key inputs outputs #:allow-other-keys)
fe447664
LC
715 (let* ((out (assoc-ref outputs "out"))
716 (effective (read-line
717 (open-pipe* OPEN_READ
718 "guile" "-c"
719 "(display (effective-version))")))
720 (module-dir (string-append out "/share/guile/site/"
721 effective))
722 (source (assoc-ref inputs "source"))
723 (doc (string-append out "/share/doc/guile-irregex/"))
724 (guild (string-append (assoc-ref %build-inputs "guile")
725 "/bin/guild")))
726 ;; Make installation directories.
727 (mkdir-p (string-append module-dir "/rx/source"))
728 (mkdir-p doc)
729
730 ;; Compile .scm files and install.
731 (setenv "GUILE_AUTO_COMPILE" "0")
732
733 (for-each (lambda (copy-info)
734 (match copy-info
735 ((src-file dest-file-basis)
736 (let* ((dest-file (string-append
32e14fc1 737 module-dir dest-file-basis
fe447664
LC
738 ".scm"))
739 (go-file (string-append
740 module-dir dest-file-basis
741 ".go")))
742 ;; Install source module.
743 (copy-file src-file
744 dest-file)
745 ;; Install compiled module.
746 (unless (zero? (system* guild "compile"
747 "-L" (getcwd)
748 "-o" go-file
749 src-file))
750 (error (format #f "Failed to compile ~s to ~s!"
751 src-file dest-file)))))))
752 '(("irregex-guile.scm" "/rx/irregex")
753 ("irregex.scm" "/rx/source/irregex")
754 ;; Not really reachable via guile's packaging system,
755 ;; but nice to have around
756 ("irregex-utils.scm" "/rx/source/irregex-utils")))
757
758 ;; Also copy over the README.
759 (install-file "irregex.html" doc)
760 #t))))))
32e14fc1
CAW
761 (inputs
762 `(("guile" ,guile-2.0)))
763 (home-page "http://synthcode.com/scheme/irregex")
764 (synopsis "S-expression based regular expressions")
765 (description
766 "Irregex is an s-expression based alternative to your classic
767string-based regular expressions. It implements SRFI 115 and is deeply
768inspired by the SCSH regular expression system.")
769 (license bsd-3)))
93e7199b 770
947a5d47
LC
771(define-public guile2.2-irregex
772 (package-for-guile-2.2 guile-irregex))
773
93e7199b
CAW
774;; There are two guile-gdbm packages, one using the FFI and one with
775;; direct C bindings, hence the verbose name.
776
777(define-public guile-gdbm-ffi
778 (package
779 (name "guile-gdbm-ffi")
780 (version "20120209.fa1d5b6")
781 (source (origin
782 (method git-fetch)
783 (uri (git-reference
784 (url "https://github.com/ijp/guile-gdbm.git")
785 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
821f4dc2 786 (file-name (string-append name "-" version "-checkout"))
93e7199b
CAW
787 (sha256
788 (base32
789 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
790 (build-system trivial-build-system)
791 (arguments
792 `(#:modules
793 ((guix build utils))
794 #:builder
795 (begin
796 (use-modules (guix build utils)
797 (system base compile))
798
799 (let* ((out (assoc-ref %outputs "out"))
800 (module-dir (string-append out "/share/guile/site/2.0"))
801 (source (assoc-ref %build-inputs "source"))
802 (doc (string-append out "/share/doc"))
803 (guild (string-append (assoc-ref %build-inputs "guile")
804 "/bin/guild"))
805 (gdbm.scm-dest
806 (string-append module-dir "/gdbm.scm"))
807 (gdbm.go-dest
808 (string-append module-dir "/gdbm.go")))
809 ;; Make installation directories.
810 (mkdir-p module-dir)
811 (mkdir-p doc)
812
813 ;; Switch directory for compiling and installing
814 (chdir source)
815
816 ;; copy the source
817 (copy-file "gdbm.scm" gdbm.scm-dest)
818
819 ;; Patch the FFI
820 (substitute* gdbm.scm-dest
821 (("\\(dynamic-link \"libgdbm\"\\)")
822 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
823 (assoc-ref %build-inputs "gdbm"))))
824
825 ;; compile to the destination
826 (compile-file gdbm.scm-dest
827 #:output-file gdbm.go-dest)))))
828 (inputs
829 `(("guile" ,guile-2.0)))
830 (propagated-inputs
831 `(("gdbm" ,gdbm)))
832 (home-page "https://github.com/ijp/guile-gdbm")
833 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
834 (description
835 "Guile bindings to the GDBM key-value storage system, using
836Guile's foreign function interface.")
837 (license gpl3+)))
838
e8ac1f8f
LC
839(define-public guile-sqlite3
840 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
841 (package
842 (name "guile-sqlite3")
843 (version (string-append "0.0-0." (string-take commit 7)))
844
845 ;; XXX: Gitorious being dead, this is not a reliable home page.
846 (home-page "https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/")
847 (source (origin
848 (method git-fetch)
849 (uri (git-reference
850 (url home-page)
851 (commit commit)))
852 (sha256
853 (base32
854 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
855 (file-name (string-append name "-" version "-checkout"))
856 (modules '((guix build utils)))
857 (snippet
858 ;; Upgrade 'Makefile.am' to the current way of doing things.
859 '(substitute* "Makefile.am"
860 (("TESTS_ENVIRONMENT")
861 "TEST_LOG_COMPILER")))))
862
863 (build-system gnu-build-system)
864 (native-inputs
865 `(("autoconf" ,autoconf)
866 ("automake" ,automake)
867 ("pkg-config" ,pkg-config)))
868 (inputs
869 `(("guile" ,guile-2.0)
870 ("sqlite" ,sqlite)))
871 (arguments
872 '(#:phases (modify-phases %standard-phases
873 (add-before 'configure 'autoreconf
874 (lambda _
875 (zero? (system* "autoreconf" "-vfi"))))
876 (add-before 'build 'set-sqlite3-file-name
877 (lambda* (#:key inputs #:allow-other-keys)
878 (substitute* "sqlite3.scm"
879 (("\"libsqlite3\"")
880 (string-append "\"" (assoc-ref inputs "sqlite")
881 "/lib/libsqlite3\"")))
882 #t)))))
883 (synopsis "Access SQLite databases from Guile")
884 (description
885 "This package provides Guile bindings to the SQLite database system.")
886 (license gpl3+))))
887
27f5e13e
DT
888(define-public haunt
889 (package
890 (name "haunt")
4960beaa 891 (version "0.2")
27f5e13e
DT
892 (source (origin
893 (method url-fetch)
4960beaa 894 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
27f5e13e
DT
895 version ".tar.gz"))
896 (sha256
897 (base32
4960beaa 898 "1id83n8fs7jxys1d8jy70vylg8gzcvlw1y7hb41y3qxv5zi4671m"))))
27f5e13e 899 (build-system gnu-build-system)
4ecbf6d2
LC
900 (arguments
901 `(#:modules ((ice-9 match) (ice-9 ftw)
902 ,@%gnu-build-system-modules)
903
904 #:phases (modify-phases %standard-phases
905 (add-after 'install 'wrap-haunt
906 (lambda* (#:key outputs #:allow-other-keys)
907 ;; Wrap the 'haunt' command to refer to the right
908 ;; modules.
909 (let* ((out (assoc-ref outputs "out"))
910 (bin (string-append out "/bin"))
911 (site (string-append
912 out "/share/guile/site")))
913 (match (scandir site)
914 (("." ".." version)
915 (let ((modules (string-append site "/" version)))
916 (wrap-program (string-append bin "/haunt")
917 `("GUILE_LOAD_PATH" ":" prefix
918 (,modules))
919 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
920 (,modules)))
921 #t)))))))))
4960beaa
DT
922 (native-inputs
923 `(("pkg-config" ,pkg-config)
924 ("texinfo" ,texinfo)))
27f5e13e
DT
925 (inputs
926 `(("guile" ,guile-2.0)))
4960beaa
DT
927 (propagated-inputs
928 `(("guile-reader" ,guile-reader)))
27f5e13e
DT
929 (synopsis "Functional static site generator")
930 (description "Haunt is a static site generator written in Guile
931Scheme. Haunt features a functional build system and an extensible
932interface for reading articles in any format.")
933 (home-page "http://haunt.dthompson.us")
934 (license gpl3+)))
935
44a2bdf8
AS
936(define-public guile-config
937 (package
938 (name "guile-config")
3c98acb7 939 (version "0.1.1")
44a2bdf8
AS
940 (source (origin
941 (method url-fetch)
942 (uri (string-append
943 "http://alex.pompo.co/software/" name "-" version
944 ".tar.gz"))
945 (sha256
946 (base32
3c98acb7 947 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
44a2bdf8
AS
948 (build-system gnu-build-system)
949 (inputs
950 `(("guile" ,guile-2.0)))
951 (synopsis "Guile application configuration parsing library")
952 (description
953 "Guile Config is a library providing a declarative approach to
954application configuration specification. The library provides clean
955configuration declaration forms, and processors that take care of:
956configuration file creation; configuration file parsing; command-line
957parameter parsing using getopt-long; basic GNU command-line parameter
958generation (--help, --usage, --version); automatic output generation for the
959above command-line parameters.")
960 (home-page "https://github.com/a-sassmannshausen/guile-config")
961 (license agpl3+)))
962
36548111
DT
963(define-public guile-redis
964 (package
965 (name "guile-redis")
966 (version "0.1.0")
967 (source (origin
968 (method url-fetch)
969 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
970 version ".tar.gz"))
971 (sha256
972 (base32
973 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
974 (modules '((guix build utils)))
975 (snippet
ea833d30 976 ;; Make sure everything goes under .../site/X.Y, like Guile's
36548111 977 ;; search paths expects.
ea833d30
RW
978 '(begin
979 (substitute* "configure"
980 (("ac_subst_vars='")
981 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
982 (substitute* '("Makefile.in"
983 "redis/Makefile.in"
984 "redis/commands/Makefile.in")
985 (("moddir =.*/share/guile/site" all)
986 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
36548111
DT
987 (build-system gnu-build-system)
988 (native-inputs
989 `(("guile" ,guile-2.0)))
990 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
991 (synopsis "Redis client library for Guile")
992 (description "Guile-redis provides a Scheme interface to the Redis
993key-value cache and store.")
994 (license lgpl3+)))
995
85313be8
RW
996(define-public guile2.2-redis
997 (package-for-guile-2.2 guile-redis))
998
9d373377
CAW
999(define-public guile-wisp
1000 (package
1001 (name "guile-wisp")
1002 (version "0.9.0")
1003 (source (origin
1004 (method url-fetch)
1005 (uri (string-append "https://bitbucket.org/ArneBab/"
1006 "wisp/downloads/wisp-"
1007 version ".tar.gz"))
1008 (sha256
1009 (base32
1010 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1011 (build-system gnu-build-system)
1012 (arguments
1013 `(#:modules ((system base compile)
1014 ,@%gnu-build-system-modules)
1015 #:phases
1016 (modify-phases %standard-phases
1017 (add-before
1018 'configure 'substitute-before-config
1019
1020 (lambda* (#:key inputs #:allow-other-keys)
1021 (let ((bash (assoc-ref inputs "bash")))
1022 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1023 (substitute* "configure"
1024 (("guile-2.0") "guile"))
1025 ;; Puts together some test files with /bin/bash hardcoded
1026 (substitute* "Makefile.in"
1027 (("/bin/bash")
1028 (string-append bash "/bin/bash") ))
1029 #t)))
1030
1031 ;; auto compilation breaks, but if we set HOME to /tmp,
1032 ;; that works ok
1033 (add-before
1034 'check 'auto-compile-hacky-workaround
1035 (lambda _
1036 (setenv "HOME" "/tmp")
1037 #t))
1038 (replace
1039 'install
1040 (lambda* (#:key outputs inputs #:allow-other-keys)
1041 (let* ((out (assoc-ref outputs "out"))
1042 (module-dir (string-append out "/share/guile/site/2.0"))
1043 (language-dir
1044 (string-append module-dir "/language/wisp"))
1045 (guild (string-append (assoc-ref inputs "guile")
1046 "/bin/guild")))
1047 ;; Make installation directories.
1048 (mkdir-p module-dir)
1049 (mkdir-p language-dir)
1050
1051 ;; copy the source
1052 (copy-file "wisp-scheme.scm"
1053 (string-append module-dir "/wisp-scheme.scm"))
1054 (copy-file "language/wisp/spec.scm"
1055 (string-append language-dir "/spec.scm"))
1056
1057 ;; compile to the destination
1058 (compile-file "wisp-scheme.scm"
1059 #:output-file (string-append
1060 module-dir "/wisp-scheme.go"))
1061 (compile-file "language/wisp/spec.scm"
1062 #:output-file (string-append
1063 language-dir "/spec.go"))
1064 #t))))))
1065 (home-page "http://draketo.de/english/wisp")
1066 (inputs
1067 `(("guile" ,guile-2.0)
1068 ("python" ,python)))
a124bbd2
SB
1069 (synopsis "Whitespace to lisp syntax for Guile")
1070 (description "Wisp is a syntax for Guile which provides a Python-like
9d373377
CAW
1071whitespace-significant language. It may be easier on the eyes for some
1072users and in some situations.")
1073 (license gpl3+)))
1074
5649c8cd
DT
1075(define-public guile-sly
1076 (package
1077 (name "guile-sly")
1078 (version "0.1")
1079 (source (origin
1080 (method url-fetch)
8d5e7ad2 1081 (uri (string-append "https://files.dthompson.us/sly/sly-"
5649c8cd
DT
1082 version ".tar.gz"))
1083 (sha256
1084 (base32
1085 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1086 (build-system gnu-build-system)
1087 (arguments
1088 '(#:configure-flags
1089 (list (string-append "--with-libfreeimage-prefix="
1090 (assoc-ref %build-inputs "freeimage"))
1091 (string-append "--with-libgslcblas-prefix="
1092 (assoc-ref %build-inputs "gsl")))))
1093 (native-inputs
1094 `(("pkg-config" ,pkg-config)))
1095 (propagated-inputs
1096 `(("guile" ,guile-2.0)
1097 ("guile-sdl" ,guile-sdl)
1098 ("guile-opengl" ,guile-opengl)))
1099 (inputs
1100 `(("gsl" ,gsl)
1101 ("freeimage" ,freeimage)
1102 ("mesa" ,mesa)))
1103 (synopsis "2D/3D game engine for GNU Guile")
1104 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1105features a functional reactive programming interface and live coding
1106capabilities.")
1107 (home-page "http://dthompson.us/pages/software/sly.html")
1108 (license gpl3+)))
1109
dec1e2b3
AB
1110(define-public g-wrap
1111 (package
1112 (name "g-wrap")
1113 (version "1.9.15")
1114 (source (origin
1115 (method url-fetch)
1116 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1117 version ".tar.gz"))
1118 (sha256
1119 (base32
1120 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1121 (build-system gnu-build-system)
1122 (native-inputs
1123 `(("pkg-config" ,pkg-config)))
1124 (propagated-inputs
1125 `(("guile" ,guile-2.0)
1126 ("guile-lib" ,guile-lib)))
1127 (inputs
1128 `(("libffi" ,libffi)))
9e8599a3
PH
1129 (arguments
1130 `(#:phases
1131 (modify-phases %standard-phases
1132 (add-before 'configure 'pre-configure
1133 (lambda* (#:key outputs #:allow-other-keys)
1134 (let ((out (assoc-ref outputs "out")))
1135 (substitute* (find-files "." "^Makefile.in$")
1136 (("guilemoduledir =.*guile/site" all)
1137 (string-append all "/2.0")))
1138 #t))))))
dec1e2b3
AB
1139 (synopsis "Generate C bindings for Guile")
1140 (description "G-Wrap is a tool and Guile library for generating function
1141wrappers for inter-language calls. It currently only supports generating Guile
1142wrappers for C functions. Given a definition of the types and prototypes for
1143a given C interface, G-Wrap will automatically generate the C code that
1144provides access to that interface and its types from the Scheme level.")
1145 (home-page "http://www.nongnu.org/g-wrap/index.html")
1146 (license lgpl2.1+)))
1147
01497dfe
LC
1148(define-public guile-dbi
1149 (package
1150 (name "guile-dbi")
1151 (version "2.1.6")
1152 (source (origin
1153 (method url-fetch)
1154 (uri (string-append
1155 "http://download.gna.org/guile-dbi/guile-dbi-"
1156 version ".tar.gz"))
1157 (sha256
1158 (base32
1159 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1160 (build-system gnu-build-system)
1161 (arguments
1162 '(#:configure-flags
1163 (list (string-append
1164 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1165 #:phases
1166 (modify-phases %standard-phases
1167 (add-after 'install 'patch-extension-path
1168 (lambda* (#:key outputs #:allow-other-keys)
1169 (let* ((out (assoc-ref outputs "out"))
1170 (dbi.scm (string-append
1171 out "/share/guile/site/2.0/dbi/dbi.scm"))
1172 (ext (string-append out "/lib/libguile-dbi")))
1173 (substitute* dbi.scm (("libguile-dbi") ext))
1174 #t))))))
1175 (propagated-inputs
1176 `(("guile" ,guile-2.0)))
1177 (synopsis "Guile database abstraction layer")
1178 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1179 (description
1180 "guile-dbi is a library for Guile that provides a convenient interface to
1181SQL databases. Database programming with guile-dbi is generic in that the same
1182programming interface is presented regardless of which database system is used.
1183It currently supports MySQL, Postgres and SQLite3.")
1184 (license gpl2+)))
1185
1186(define-public guile-dbd-sqlite3
1187 (package
1188 (name "guile-dbd-sqlite3")
1189 (version "2.1.6")
1190 (source (origin
1191 (method url-fetch)
1192 (uri (string-append
1193 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1194 version ".tar.gz"))
1195 (sha256
1196 (base32
1197 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1198 (build-system gnu-build-system)
1199 (native-inputs
1200 `(("pkg-config" ,pkg-config)))
1201 (inputs
1202 `(("sqlite" ,sqlite)
1203 ("zlib" ,(@ (gnu packages compression) zlib))))
1204 (propagated-inputs
1205 `(("guile-dbi" ,guile-dbi)))
1206 (synopsis "Guile DBI driver for SQLite")
1207 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1208 (description
1209 "guile-dbi is a library for Guile that provides a convenient interface to
1210SQL databases. This package implements the interface for SQLite.")
1211 (license gpl2+)))
1212
bd9af610
AK
1213(define-public guile-xosd
1214 (package
1215 (name "guile-xosd")
4b2b7135 1216 (version "0.2.1")
bd9af610
AK
1217 (source (origin
1218 (method url-fetch)
1219 (uri (string-append "https://github.com/alezost/" name
1220 "/releases/download/v" version
1221 "/" name "-" version ".tar.gz"))
1222 (sha256
1223 (base32
4b2b7135 1224 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
bd9af610
AK
1225 (build-system gnu-build-system)
1226 (native-inputs
1227 `(("pkg-config" ,pkg-config)))
1228 (inputs
1229 `(("guile" ,guile-2.0)
1230 ("libx11" ,libx11)
1231 ("libxext" ,libxext)
1232 ("libxinerama" ,libxinerama)
1233 ("xosd" ,xosd)))
1234 (home-page "https://github.com/alezost/guile-xosd")
1235 (synopsis "XOSD bindings for Guile")
1236 (description
1237 "Guile-XOSD provides Guile bindings for @code{libxosd},
1238@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1239library}.")
1240 (license gpl3+)))
1241
07f7cc03
AK
1242(define-public guile-daemon
1243 (package
1244 (name "guile-daemon")
876d8f29 1245 (version "0.1.1")
07f7cc03
AK
1246 (source (origin
1247 (method url-fetch)
1248 (uri (string-append "https://github.com/alezost/" name
1249 "/releases/download/v" version
1250 "/" name "-" version ".tar.gz"))
1251 (sha256
1252 (base32
876d8f29 1253 "0wsq9l6a4sijq4i1r3kcddfaznsak2jc5k59gzkhs5il5d2kn5yi"))))
07f7cc03
AK
1254 (build-system gnu-build-system)
1255 (native-inputs
1256 `(("pkg-config" ,pkg-config)))
1257 (inputs
1258 `(("guile" ,guile-2.0)))
1259 (home-page "https://github.com/alezost/guile-daemon")
1260 (synopsis "Evaluate code in a running Guile process")
1261 (description
1262 "Guile-Daemon is a small Guile program that loads your initial
1263configuration file, and then reads and evaluates Guile expressions that
1264you send to a FIFO file.")
1265 (license gpl3+)))
1266
e28e74a5
EE
1267(define-public guile-commonmark
1268 (package
1269 (name "guile-commonmark")
1270 (version "0.1")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (string-append "https://github.com/OrangeShark/" name
1274 "/releases/download/v" version
1275 "/" name "-" version ".tar.gz"))
1276 (sha256
1277 (base32
757ce0f9
LC
1278 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1279 (modules '((guix build utils)))
1280 (snippet
1281 ;; Use the real effective version of Guile in directory names
1282 ;; instead of a hard-coded "/2.0".
1283 '(begin
1284 (substitute* "configure"
1285 (("ac_subst_vars='")
1286 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1287 (substitute* "Makefile.in"
1288 (("/site/2.0")
1289 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
e28e74a5
EE
1290 (build-system gnu-build-system)
1291 (inputs
1292 `(("guile" ,guile-2.0)))
1293 (synopsis "CommonMark parser for Guile")
1294 (description
1295 "guile-commonmark is a library for parsing CommonMark, a fully specified
1296variant of Markdown. The library is written in Guile Scheme and is designed
1297to transform a CommonMark document to SXML. guile-commonmark tries to closely
1298follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1299is no support for parsing block and inline level HTML.")
1300 (home-page "https://github.com/OrangeShark/guile-commonmark")
1301 (license lgpl3+)))
1302
947a5d47
LC
1303(define-public guile2.2-commonmark
1304 (package-for-guile-2.2 guile-commonmark))
1305
3b5783fc
AB
1306(define-public guile-bytestructures
1307 (package
1308 (name "guile-bytestructures")
1309 (version "20160726.53127f6")
1310 (source (origin
1311 (method git-fetch)
1312 (uri (git-reference
1313 (url "https://github.com/TaylanUB/scheme-bytestructures")
1314 (commit "53127f608caf64b34fa41c389b2743b546fbe9da")))
1315 (file-name (string-append name "-" version "-checkout"))
1316 (sha256
1317 (base32
1318 "0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq"))))
1319 (build-system trivial-build-system)
1320 (arguments
1321 `(#:modules ((guix build utils))
1322 #:builder
1323 (begin
1324 (use-modules (guix build utils)
1325 (ice-9 match)
1326 (ice-9 popen)
1327 (ice-9 rdelim))
1328 (let* ((out (assoc-ref %outputs "out"))
1329 (guile (assoc-ref %build-inputs "guile"))
1330 (effective (read-line
1331 (open-pipe* OPEN_READ
1332 (string-append guile "/bin/guile")
1333 "-c" "(display (effective-version))")))
1334 (module-dir (string-append out "/share/guile/site/"
1335 effective))
1336 (source (assoc-ref %build-inputs "source"))
1337 (doc (string-append out "/share/doc/scheme-bytestructures"))
1338 (scm-files (filter (lambda (path)
1339 (not (string-prefix? "bytestructures/r7" path)))
1340 (with-directory-excursion source
1341 (find-files "bytestructures" "\\.scm$"))))
1342 (guild (string-append (assoc-ref %build-inputs "guile")
1343 "/bin/guild")))
1344 ;; Make installation directories.
1345 (mkdir-p doc)
1346
1347 ;; Compile .scm files and install.
1348 (chdir source)
1349 (setenv "GUILE_AUTO_COMPILE" "0")
1350 (for-each (lambda (file)
1351 (let* ((dest-file (string-append module-dir "/"
1352 file))
1353 (go-file (string-append module-dir "/"
1354 (substring file 0
1355 (string-rindex file #\.))
1356 ".go")))
1357 ;; Install source module.
1358 (mkdir-p (dirname dest-file))
1359 (copy-file file dest-file)
1360
1361 ;; Install compiled module.
1362 (mkdir-p (dirname go-file))
1363 (unless (zero? (system* guild "compile"
1364 "-L" source
1365 "-o" go-file
1366 file))
1367 (error (format #f "Failed to compile ~s to ~s!"
1368 file go-file)))))
1369 scm-files)
1370
1371 ;; Also copy over the README.
1372 (install-file "README.md" doc)
1373 #t))))
1374 (inputs
1375 `(("guile" ,guile-2.0)))
1376 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1377 (synopsis "Structured access to bytevector contents for Guile")
1378 (description
1379 "Guile bytestructures offers a system imitating the type system
1380of the C programming language, to be used on bytevectors. C's type
1381system works on raw memory, and Guile works on bytevectors which are
1382an abstraction over raw memory. It's also more powerful than the C
1383type system, elevating types to first-class status.")
1384 (license gpl3+)))
1385
472fc855
LC
1386(define-public guile-aspell
1387 (package
1388 (name "guile-aspell")
1389 (version "0.3")
1390 (source (origin
1391 (method url-fetch)
1392 (uri (string-append
1393 "http://lonelycactus.com/tarball/guile_aspell-"
1394 version ".tar.gz"))
1395 (sha256
1396 (base32
1397 "1wknn57x2qcsbn7zw6sbn1ma6fjsg8cvpnf78ak47s8jw6k6j75n"))))
1398 (build-system gnu-build-system)
1399 (arguments
1400 '(#:configure-flags (list (string-append "--with-guilesitedir="
1401 (assoc-ref %outputs "out")
1402 "/share/guile/site/2.0"))
1403 #:phases (modify-phases %standard-phases
1404 (add-before 'build 'set-libaspell-file-name
1405 (lambda* (#:key inputs #:allow-other-keys)
1406 (let ((aspell (assoc-ref inputs "aspell")))
1407 (substitute* "aspell/aspell.scm"
1408 (("\"libaspell\\.so\"")
1409 (string-append "\"" aspell
1410 "/lib/libaspell\"")))
1411 #t))))))
1412 (native-inputs `(("pkg-config" ,pkg-config)))
1413 (inputs `(("guile" ,guile-2.0)
1414 ("aspell" ,aspell)))
1415 (home-page "https://github.com/spk121/guile-aspell")
1416 (synopsis "Spell-checking from Guile")
1417 (description
1418 "guile-aspell is a Guile Scheme library for comparing a string against a
1419dictionary and suggesting spelling corrections.")
1420 (license gpl3+)))
1421
1722d680 1422;;; guile.scm ends here