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