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