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