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