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