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