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