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