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