gnu: retroarch: Use shared zlib.
[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")
15214828 900 (version "1.2.0")
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
15214828 909 "02kqv0q98fmchn7i4y7ycmrjlh4b2c93ij0z7k036qwpp204w4gh"))))
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")
15214828
LC
927
928 ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+).
929 (license license:gpl3+)))
6050a1fb 930
947a5d47 931(define-public guile2.2-json
2252f087
LC
932 (deprecated-package "guile2.2-json" guile-json))
933
934(define-public guile2.0-json
935 (package-for-guile-2.0 guile-json))
947a5d47 936
6bc24063
CAW
937(define-public guile-minikanren
938 (package
939 (name "guile-minikanren")
940 (version "20150424.e844d85")
941 (source (origin
942 (method git-fetch)
943 (uri (git-reference
944 (url "https://github.com/ijp/minikanren.git")
945 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
821f4dc2 946 (file-name (string-append name "-" version "-checkout"))
6bc24063
CAW
947 (sha256
948 (base32
949 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
977d8666
LC
950 (build-system guile-build-system)
951 (native-inputs
d58ee08d 952 `(("guile" ,guile-2.2)))
6bc24063 953 (home-page "https://github.com/ijp/minikanren")
e881752c 954 (synopsis "MiniKanren declarative logic system, packaged for Guile")
6bc24063
CAW
955 (description
956 "MiniKanren is a relational programming extension to the Scheme
957programming Language, written as a smaller version of Kanren suitable for
958pedagogical purposes. It is featured in the book, The Reasoned Schemer,
959written by Dan Friedman, William Byrd, and Oleg Kiselyov.
960
e881752c 961This is Ian Price's r6rs packaged version of miniKanren, which deviates
6bc24063
CAW
962slightly from miniKanren mainline.
963
964See http://minikanren.org/ for more on miniKanren generally.")
71e0f217 965 (license license:expat)))
6bc24063 966
d58ee08d
LC
967(define-public guile2.0-minikanren
968 (package-for-guile-2.0 guile-minikanren))
969
947a5d47 970(define-public guile2.2-minikanren
d58ee08d 971 (deprecated-package "guile2.2-minikanren" guile-minikanren))
947a5d47 972
28a1041f
AP
973(define-public guile-miniadapton
974 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
975 (revision "1"))
976 (package
977 (name "guile-miniadapton")
978 (version (string-append "0-" revision "." (string-take commit 9)))
979 (source (origin
980 (method git-fetch)
981 (uri (git-reference
982 (url "https://github.com/fisherdj/miniAdapton.git")
983 (commit commit)))
984 (file-name (string-append name "-" version "-checkout"))
985 (sha256
986 (base32
987 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
977d8666
LC
988 (build-system guile-build-system)
989 (native-inputs
28a1041f
AP
990 `(("guile" ,guile-2.2)))
991 (home-page "https://github.com/fisherdj/miniAdapton")
992 (synopsis "Minimal implementation of incremental computation in Guile
993Scheme")
994 (description "This package provides a complete Scheme implementation of
995miniAdapton, which implements the core functionality of the Adapton system for
996incremental computation (also known as self-adjusting computation). Like
997Adapton, miniAdapton allows programmers to safely combine mutation and
998memoization. miniAdapton is built on top of an even simpler system,
999microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1000understand, extend, and port to host languages other than Scheme.")
1001 (license license:expat))))
1002
32e14fc1
CAW
1003(define-public guile-irregex
1004 (package
1005 (name "guile-irregex")
fb73f07a 1006 (version "0.9.6")
32e14fc1
CAW
1007 (source (origin
1008 (method url-fetch)
1009 (uri (string-append
1010 "http://synthcode.com/scheme/irregex/irregex-"
d03f9446 1011 version ".tar.gz"))
32e14fc1
CAW
1012 (sha256
1013 (base32
fb73f07a 1014 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
977d8666 1015 (build-system guile-build-system)
32e14fc1 1016 (arguments
977d8666
LC
1017 '(#:phases (modify-phases %standard-phases
1018 (add-after 'unpack 'move-files-around
1019 (lambda _
1020 ;; Move the relevant source files to src/ and create the
1021 ;; rx/ directory to match the expected module hierarchy.
1022 (mkdir-p "src/rx/source")
1023 (rename-file "irregex-guile.scm"
1024 "src/rx/irregex.scm")
1025 (rename-file "irregex.scm"
1026 "src/rx/source/irregex.scm")
1027 ;; Not really reachable via guile's packaging system,
1028 ;; but nice to have around.
1029 (rename-file "irregex-utils.scm"
1030 "src/rx/source/irregex-utils.scm")
1031 #t)))
1032 #:source-directory "src"))
1033 (native-inputs
2863860b 1034 `(("guile" ,guile-2.2)))
32e14fc1
CAW
1035 (home-page "http://synthcode.com/scheme/irregex")
1036 (synopsis "S-expression based regular expressions")
1037 (description
1038 "Irregex is an s-expression based alternative to your classic
1039string-based regular expressions. It implements SRFI 115 and is deeply
1040inspired by the SCSH regular expression system.")
71e0f217 1041 (license license:bsd-3)))
93e7199b 1042
2863860b
LC
1043(define-public guile2.0-irregex
1044 (package-for-guile-2.0 guile-irregex))
1045
947a5d47 1046(define-public guile2.2-irregex
2863860b 1047 (deprecated-package "guile2.2-irregex" guile-irregex))
947a5d47 1048
93e7199b
CAW
1049;; There are two guile-gdbm packages, one using the FFI and one with
1050;; direct C bindings, hence the verbose name.
1051
1052(define-public guile-gdbm-ffi
1053 (package
1054 (name "guile-gdbm-ffi")
1055 (version "20120209.fa1d5b6")
1056 (source (origin
1057 (method git-fetch)
1058 (uri (git-reference
1059 (url "https://github.com/ijp/guile-gdbm.git")
1060 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
821f4dc2 1061 (file-name (string-append name "-" version "-checkout"))
977d8666
LC
1062 (patches (search-patches
1063 "guile-gdbm-ffi-support-gdbm-1.14.patch"))
93e7199b
CAW
1064 (sha256
1065 (base32
1066 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
977d8666
LC
1067 (build-system guile-build-system)
1068 (arguments
1069 '(#:phases (modify-phases %standard-phases
1070 (add-after 'unpack 'move-examples
1071 (lambda* (#:key outputs #:allow-other-keys)
1072 ;; Move examples where they belong.
1073 (let* ((out (assoc-ref outputs "out"))
1074 (doc (string-append out "/share/doc/"
1075 (strip-store-file-name out)
1076 "/examples")))
1077 (copy-recursively "examples" doc)
1078 (delete-file-recursively "examples")
1079 #t)))
1080 (add-after 'unpack 'set-libgdbm-file-name
1081 (lambda* (#:key inputs #:allow-other-keys)
1082 (substitute* "gdbm.scm"
1083 (("\\(dynamic-link \"libgdbm\"\\)")
1084 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1085 (assoc-ref inputs "gdbm"))))
1086 #t)))))
1087 (native-inputs
1088 `(("guile" ,guile-2.2)))
56f31a9f 1089 (inputs
56f31a9f 1090 `(("gdbm" ,gdbm)))
93e7199b
CAW
1091 (home-page "https://github.com/ijp/guile-gdbm")
1092 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1093 (description
1094 "Guile bindings to the GDBM key-value storage system, using
1095Guile's foreign function interface.")
71e0f217 1096 (license license:gpl3+)))
93e7199b 1097
5bd3a841
LC
1098(define-public guile2.0-gdbm-ffi
1099 (package-for-guile-2.0 guile-gdbm-ffi))
1100
2737bcff 1101(define-public guile2.2-gdbm-ffi
5bd3a841 1102 (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
93e7199b 1103
e8ac1f8f 1104(define-public guile-sqlite3
319e26e4
LC
1105 (package
1106 (name "guile-sqlite3")
1107 (version "0.1.0")
1108 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1109 (source (origin
1110 (method git-fetch)
1111 (uri (git-reference
1112 (url home-page)
1113 (commit (string-append "v" version))))
1114 (sha256
1115 (base32
1116 "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
1117 (file-name (string-append name "-" version "-checkout"))))
1118 (build-system gnu-build-system)
1119 (native-inputs
1120 `(("autoconf" ,autoconf)
1121 ("automake" ,automake)
1122 ("pkg-config" ,pkg-config)))
1123 (inputs
1124 `(("guile" ,guile-2.2)
1125 ("sqlite" ,sqlite)))
1126 (synopsis "Access SQLite databases from Guile")
1127 (description
1128 "This package provides Guile bindings to the SQLite database system.")
1129 (license license:gpl3+)))
e8ac1f8f 1130
27f5e13e
DT
1131(define-public haunt
1132 (package
1133 (name "haunt")
907254e5 1134 (version "0.2.2")
27f5e13e
DT
1135 (source (origin
1136 (method url-fetch)
4960beaa 1137 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
27f5e13e
DT
1138 version ".tar.gz"))
1139 (sha256
1140 (base32
907254e5 1141 "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp"))))
27f5e13e 1142 (build-system gnu-build-system)
4ecbf6d2
LC
1143 (arguments
1144 `(#:modules ((ice-9 match) (ice-9 ftw)
1145 ,@%gnu-build-system-modules)
1e406301 1146 #:tests? #f ; test suite is non-deterministic :(
4ecbf6d2
LC
1147 #:phases (modify-phases %standard-phases
1148 (add-after 'install 'wrap-haunt
1149 (lambda* (#:key outputs #:allow-other-keys)
1150 ;; Wrap the 'haunt' command to refer to the right
1151 ;; modules.
1152 (let* ((out (assoc-ref outputs "out"))
1153 (bin (string-append out "/bin"))
1154 (site (string-append
1155 out "/share/guile/site")))
1156 (match (scandir site)
1157 (("." ".." version)
907254e5
DT
1158 (let ((modules (string-append site "/" version))
1159 (compiled-modules (string-append
1160 out "/lib/guile/" version
1161 "/site-ccache")))
4ecbf6d2
LC
1162 (wrap-program (string-append bin "/haunt")
1163 `("GUILE_LOAD_PATH" ":" prefix
1164 (,modules))
1165 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
907254e5 1166 (,compiled-modules)))
4ecbf6d2 1167 #t)))))))))
4960beaa
DT
1168 (native-inputs
1169 `(("pkg-config" ,pkg-config)
1170 ("texinfo" ,texinfo)))
27f5e13e 1171 (inputs
bd19f65a 1172 `(("guile" ,guile-2.2)))
4960beaa 1173 (propagated-inputs
9b1a497e
AP
1174 `(("guile-reader" ,guile-reader)
1175 ("guile-commonmark" ,guile-commonmark)))
27f5e13e
DT
1176 (synopsis "Functional static site generator")
1177 (description "Haunt is a static site generator written in Guile
1178Scheme. Haunt features a functional build system and an extensible
1179interface for reading articles in any format.")
1180 (home-page "http://haunt.dthompson.us")
71e0f217 1181 (license license:gpl3+)))
27f5e13e 1182
bd19f65a
LC
1183(define-public guile2.0-haunt
1184 (package-for-guile-2.0
1185 (package (inherit haunt) (name "guile2.0-haunt"))))
64f34aef 1186(define-public guile2.2-haunt
bd19f65a 1187 (deprecated-package "guile2.2-haunt" haunt))
64f34aef 1188
44a2bdf8
AS
1189(define-public guile-config
1190 (package
1191 (name "guile-config")
7c6468c9
AS
1192 (version "0.3")
1193 (source
1194 (origin
1195 (method git-fetch)
1196 (uri (git-reference
1197 (url "https://gitlab.com/a-sassmannshausen/guile-config")
1198 (commit "ce12de3f438c6b2b59c43ee21bcd58251835fdf3")))
1199 (file-name "guile-config-0.3-checkout")
1200 (sha256 (base32 "02zbpin0r9m2vxmr7mv68v3xdn247dcck56kbzjn0gj4c2rhih85"))))
44a2bdf8 1201 (build-system gnu-build-system)
43d5df98
AS
1202 (native-inputs
1203 `(("autoconf" ,autoconf)
1204 ("automake" ,automake)
1205 ("pkg-config" ,pkg-config)
1206 ("texinfo" ,texinfo)))
7c6468c9
AS
1207 (inputs `(("guile" ,guile-2.2)))
1208 (synopsis
1209 "Guile application configuration parsing library.")
44a2bdf8
AS
1210 (description
1211 "Guile Config is a library providing a declarative approach to
1212application configuration specification. The library provides clean
1213configuration declaration forms, and processors that take care of:
1214configuration file creation; configuration file parsing; command-line
1215parameter parsing using getopt-long; basic GNU command-line parameter
1216generation (--help, --usage, --version); automatic output generation for the
1217above command-line parameters.")
7c6468c9
AS
1218 (home-page
1219 "https://gitlab.com/a-sassmannshausen/guile-config")
43d5df98 1220 (license license:gpl3+)))
44a2bdf8 1221
36548111
DT
1222(define-public guile-redis
1223 (package
1224 (name "guile-redis")
a50eed20
LC
1225 (version "1.0.0")
1226 (home-page "https://github.com/aconchillo/guile-redis")
36548111
DT
1227 (source (origin
1228 (method url-fetch)
a50eed20 1229 (uri (string-append home-page "/archive/" version ".tar.gz"))
36548111
DT
1230 (sha256
1231 (base32
a50eed20 1232 "1dp5fmqvma59pvp1nfpq6hqgbmjici8sd1y8llahl87fynw1dvr9"))))
36548111
DT
1233 (build-system gnu-build-system)
1234 (native-inputs
a50eed20
LC
1235 `(("autoconf" ,autoconf)
1236 ("automake" ,automake)
1237 ("pkg-config" ,pkg-config)
1238 ("guile" ,guile-2.2)))
36548111
DT
1239 (synopsis "Redis client library for Guile")
1240 (description "Guile-redis provides a Scheme interface to the Redis
1241key-value cache and store.")
71e0f217 1242 (license license:lgpl3+)))
36548111 1243
d5eacecc
LC
1244(define-public guile2.0-redis
1245 (package-for-guile-2.0 guile-redis))
1246
85313be8 1247(define-public guile2.2-redis
d5eacecc 1248 (deprecated-package "guile2.2-redis" guile-redis))
85313be8 1249
9d373377
CAW
1250(define-public guile-wisp
1251 (package
1252 (name "guile-wisp")
e0840905 1253 (version "0.9.8")
9d373377
CAW
1254 (source (origin
1255 (method url-fetch)
1256 (uri (string-append "https://bitbucket.org/ArneBab/"
1257 "wisp/downloads/wisp-"
1258 version ".tar.gz"))
1259 (sha256
1260 (base32
e0840905 1261 "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
9d373377
CAW
1262 (build-system gnu-build-system)
1263 (arguments
e8374e69
LC
1264 `(#:modules ((guix build gnu-build-system)
1265 (guix build utils)
1266 (ice-9 rdelim)
1267 (ice-9 popen))
1268
9d373377
CAW
1269 #:phases
1270 (modify-phases %standard-phases
e0840905 1271 (add-before 'configure 'substitute-before-config
9d373377
CAW
1272
1273 (lambda* (#:key inputs #:allow-other-keys)
1274 (let ((bash (assoc-ref inputs "bash")))
9d373377
CAW
1275 ;; Puts together some test files with /bin/bash hardcoded
1276 (substitute* "Makefile.in"
e0840905
LC
1277 (("/usr/bin/env bash")
1278 (string-append bash "/bin/bash"))
1279 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1280 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
9d373377
CAW
1281 #t)))
1282
1283 ;; auto compilation breaks, but if we set HOME to /tmp,
1284 ;; that works ok
1285 (add-before
1286 'check 'auto-compile-hacky-workaround
1287 (lambda _
1288 (setenv "HOME" "/tmp")
1289 #t))
e0840905 1290 (add-after 'install 'install-go-files
9d373377
CAW
1291 (lambda* (#:key outputs inputs #:allow-other-keys)
1292 (let* ((out (assoc-ref outputs "out"))
e8374e69
LC
1293 (effective (read-line
1294 (open-pipe* OPEN_READ
1295 "guile" "-c"
1296 "(display (effective-version))")))
1297 (module-dir (string-append out "/share/guile/site/"
1298 effective))
1299 (object-dir (string-append out "/lib/guile/" effective
1300 "/site-ccache"))
1301 (prefix (string-length module-dir)))
9d373377 1302 ;; compile to the destination
e0840905 1303 (for-each (lambda (file)
e8374e69
LC
1304 (let* ((base (string-drop (string-drop-right file 4)
1305 prefix))
1306 (go (string-append object-dir base ".go")))
1307 (invoke "guild" "compile" "-L" module-dir
1308 file "-o" go)))
e0840905 1309 (find-files module-dir "\\.scm$"))
9d373377
CAW
1310 #t))))))
1311 (home-page "http://draketo.de/english/wisp")
1312 (inputs
89c4bfe7 1313 `(("guile" ,guile-2.2)))
e0840905
LC
1314 (native-inputs
1315 `(("python" ,python)
1316 ("pkg-config" ,pkg-config)))
a124bbd2
SB
1317 (synopsis "Whitespace to lisp syntax for Guile")
1318 (description "Wisp is a syntax for Guile which provides a Python-like
9d373377
CAW
1319whitespace-significant language. It may be easier on the eyes for some
1320users and in some situations.")
71e0f217 1321 (license license:gpl3+)))
9d373377 1322
5649c8cd
DT
1323(define-public guile-sly
1324 (package
1325 (name "guile-sly")
1326 (version "0.1")
1327 (source (origin
1328 (method url-fetch)
8d5e7ad2 1329 (uri (string-append "https://files.dthompson.us/sly/sly-"
5649c8cd
DT
1330 version ".tar.gz"))
1331 (sha256
1332 (base32
44394ef9
LC
1333 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1334 (modules '((guix build utils)))
1335 (snippet
1336 '(begin
1337 (substitute* "configure"
1338 (("_guile_required_version=\"2.0.11\"")
1339 "_guile_required_version=\"2\"")
1340 (("ac_subst_vars='")
1341 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1342 (substitute* (find-files "." "Makefile.in")
1343 (("moddir = .*$")
1344 (string-append
1345 "moddir = "
1346 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1347 (("godir = .*$")
1348 (string-append
1349 "godir = "
6cbee49d
MW
1350 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1351 #t))))
5649c8cd
DT
1352 (build-system gnu-build-system)
1353 (arguments
1354 '(#:configure-flags
1355 (list (string-append "--with-libfreeimage-prefix="
1356 (assoc-ref %build-inputs "freeimage"))
1357 (string-append "--with-libgslcblas-prefix="
1358 (assoc-ref %build-inputs "gsl")))))
1359 (native-inputs
1360 `(("pkg-config" ,pkg-config)))
1361 (propagated-inputs
2e7825bc 1362 `(("guile-sdl" ,guile-sdl)
5649c8cd
DT
1363 ("guile-opengl" ,guile-opengl)))
1364 (inputs
2e7825bc
LC
1365 `(("guile" ,guile-2.2)
1366 ("gsl" ,gsl)
5649c8cd
DT
1367 ("freeimage" ,freeimage)
1368 ("mesa" ,mesa)))
1369 (synopsis "2D/3D game engine for GNU Guile")
1370 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1371features a functional reactive programming interface and live coding
1372capabilities.")
0eb3b8c0 1373 (home-page "https://dthompson.us/projects/sly.html")
71e0f217 1374 (license license:gpl3+)))
5649c8cd 1375
dec1e2b3
AB
1376(define-public g-wrap
1377 (package
1378 (name "g-wrap")
1379 (version "1.9.15")
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1383 version ".tar.gz"))
1384 (sha256
1385 (base32
1386 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1387 (build-system gnu-build-system)
1388 (native-inputs
1389 `(("pkg-config" ,pkg-config)))
1390 (propagated-inputs
61583094 1391 `(("guile" ,guile-2.2)
dec1e2b3
AB
1392 ("guile-lib" ,guile-lib)))
1393 (inputs
1394 `(("libffi" ,libffi)))
9e8599a3 1395 (arguments
61583094
TF
1396 `(#:configure-flags '("--disable-Werror")
1397 #:phases
1398 (modify-phases %standard-phases
1399 (add-before 'configure 'pre-configure
1400 (lambda* (#:key outputs #:allow-other-keys)
1401 (let ((out (assoc-ref outputs "out")))
1402 (substitute* (find-files "." "^Makefile.in$")
1403 (("guilemoduledir =.*guile/site" all)
1404 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1405 #t))))))
dec1e2b3
AB
1406 (synopsis "Generate C bindings for Guile")
1407 (description "G-Wrap is a tool and Guile library for generating function
1408wrappers for inter-language calls. It currently only supports generating Guile
1409wrappers for C functions. Given a definition of the types and prototypes for
1410a given C interface, G-Wrap will automatically generate the C code that
1411provides access to that interface and its types from the Scheme level.")
340978d7 1412 (home-page "https://www.nongnu.org/g-wrap/index.html")
71e0f217 1413 (license license:lgpl2.1+)))
dec1e2b3 1414
01497dfe
LC
1415(define-public guile-dbi
1416 (package
1417 (name "guile-dbi")
1418 (version "2.1.6")
1419 (source (origin
1420 (method url-fetch)
1421 (uri (string-append
1422 "http://download.gna.org/guile-dbi/guile-dbi-"
1423 version ".tar.gz"))
1424 (sha256
1425 (base32
1426 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1427 (build-system gnu-build-system)
1428 (arguments
1429 '(#:configure-flags
1430 (list (string-append
b989c3e3 1431 "--with-guile-site-dir=" %output "/share/guile/site/2.2"))
34e00c7b
AI
1432 #:make-flags
1433 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib:"
1434 (assoc-ref %build-inputs "guile-dbd-sqlite3") "/lib"))
01497dfe
LC
1435 #:phases
1436 (modify-phases %standard-phases
1437 (add-after 'install 'patch-extension-path
1438 (lambda* (#:key outputs #:allow-other-keys)
1439 (let* ((out (assoc-ref outputs "out"))
1440 (dbi.scm (string-append
b989c3e3 1441 out "/share/guile/site/2.2/dbi/dbi.scm"))
01497dfe
LC
1442 (ext (string-append out "/lib/libguile-dbi")))
1443 (substitute* dbi.scm (("libguile-dbi") ext))
1444 #t))))))
34e00c7b
AI
1445 (inputs
1446 `(("guile-dbd-sqlite3" ,guile-dbd-sqlite3))) ; only shared library, no scheme files
01497dfe 1447 (propagated-inputs
b989c3e3 1448 `(("guile" ,guile-2.2)))
01497dfe
LC
1449 (synopsis "Guile database abstraction layer")
1450 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1451 (description
1452 "guile-dbi is a library for Guile that provides a convenient interface to
1453SQL databases. Database programming with guile-dbi is generic in that the same
1454programming interface is presented regardless of which database system is used.
1455It currently supports MySQL, Postgres and SQLite3.")
71e0f217 1456 (license license:gpl2+)))
01497dfe 1457
34e00c7b
AI
1458(define guile-dbi-bootstrap
1459 (package
1460 (inherit guile-dbi)
1461 (name "guile-dbi-bootstrap")
1462 (inputs '())
1463 (arguments
1464 (substitute-keyword-arguments (package-arguments guile-dbi)
1465 ((#:make-flags _) '(list))))))
1466
01497dfe
LC
1467(define-public guile-dbd-sqlite3
1468 (package
1469 (name "guile-dbd-sqlite3")
1470 (version "2.1.6")
1471 (source (origin
1472 (method url-fetch)
1473 (uri (string-append
1474 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1475 version ".tar.gz"))
1476 (sha256
1477 (base32
1478 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1479 (build-system gnu-build-system)
1480 (native-inputs
34e00c7b
AI
1481 `(("pkg-config" ,pkg-config)
1482 ("guile-dbi-bootstrap" ,guile-dbi-bootstrap))) ; only required for headers
01497dfe
LC
1483 (inputs
1484 `(("sqlite" ,sqlite)
1485 ("zlib" ,(@ (gnu packages compression) zlib))))
01497dfe
LC
1486 (synopsis "Guile DBI driver for SQLite")
1487 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1488 (description
1489 "guile-dbi is a library for Guile that provides a convenient interface to
1490SQL databases. This package implements the interface for SQLite.")
71e0f217 1491 (license license:gpl2+)))
01497dfe 1492
e9291eaa
AS
1493(define-public guile-dsv
1494 (package
1495 (name "guile-dsv")
8c80f8ef 1496 (version "0.2.1")
e9291eaa
AS
1497 (source (origin
1498 (method git-fetch)
1499 (uri (git-reference
1500 (url "https://github.com/artyom-poptsov/guile-dsv")
8c80f8ef 1501 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
e9291eaa
AS
1502 (file-name (string-append name "-" version "-checkout"))
1503 (sha256
1504 (base32
8c80f8ef 1505 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
e9291eaa
AS
1506 (build-system gnu-build-system)
1507 (native-inputs
1508 `(("autoconf" ,autoconf)
1509 ("automake" ,automake)
1510 ("pkg-config" ,pkg-config)
1511 ("texinfo" ,texinfo)))
1512 (inputs `(("guile" ,guile-2.2)))
1513 (propagated-inputs `(("guile-lib" ,guile-lib)))
1514 (arguments
1515 '(#:phases (modify-phases %standard-phases
1516 (add-before 'configure 'set-guilesitedir
1517 (lambda _
1518 (substitute* "Makefile.in"
1519 (("^guilesitedir =.*$")
1520 "guilesitedir = \
1521$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1522 (substitute* "modules/Makefile.in"
1523 (("^guilesitedir =.*$")
1524 "guilesitedir = \
1525$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1526 (substitute* "modules/dsv/Makefile.in"
1527 (("^guilesitedir =.*$")
1528 "guilesitedir = \
1529$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1530 #t))
1531 (add-after 'unpack 'autoreconf
1532 (lambda _
1533 (zero? (system* "autoreconf" "-vfi")))))))
1534 (home-page "https://github.com/artyom-poptsov/guile-dsv")
1535 (synopsis "DSV module for Guile")
1536 (description
1537 "Guile-DSV is a GNU Guile module for working with the
1538delimiter-separated values (DSV) data format. Guile-DSV supports the
1539Unix-style DSV format and RFC 4180 format.")
1540 (license license:gpl3+)))
1541
bd9af610
AK
1542(define-public guile-xosd
1543 (package
1544 (name "guile-xosd")
4b2b7135 1545 (version "0.2.1")
bd9af610
AK
1546 (source (origin
1547 (method url-fetch)
1548 (uri (string-append "https://github.com/alezost/" name
1549 "/releases/download/v" version
1550 "/" name "-" version ".tar.gz"))
1551 (sha256
1552 (base32
4b2b7135 1553 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
bd9af610
AK
1554 (build-system gnu-build-system)
1555 (native-inputs
1556 `(("pkg-config" ,pkg-config)))
1557 (inputs
c6726a5f 1558 `(("guile" ,guile-2.2)
bd9af610
AK
1559 ("libx11" ,libx11)
1560 ("libxext" ,libxext)
1561 ("libxinerama" ,libxinerama)
1562 ("xosd" ,xosd)))
1563 (home-page "https://github.com/alezost/guile-xosd")
1564 (synopsis "XOSD bindings for Guile")
1565 (description
1566 "Guile-XOSD provides Guile bindings for @code{libxosd},
1567@uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1568library}.")
71e0f217 1569 (license license:gpl3+)))
bd9af610 1570
07f7cc03
AK
1571(define-public guile-daemon
1572 (package
1573 (name "guile-daemon")
5245399f 1574 (version "0.1.2")
07f7cc03
AK
1575 (source (origin
1576 (method url-fetch)
1577 (uri (string-append "https://github.com/alezost/" name
1578 "/releases/download/v" version
1579 "/" name "-" version ".tar.gz"))
1580 (sha256
1581 (base32
5245399f 1582 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
07f7cc03
AK
1583 (build-system gnu-build-system)
1584 (native-inputs
1585 `(("pkg-config" ,pkg-config)))
1586 (inputs
c6726a5f 1587 `(("guile" ,guile-2.2)))
07f7cc03
AK
1588 (home-page "https://github.com/alezost/guile-daemon")
1589 (synopsis "Evaluate code in a running Guile process")
1590 (description
1591 "Guile-Daemon is a small Guile program that loads your initial
1592configuration file, and then reads and evaluates Guile expressions that
1593you send to a FIFO file.")
71e0f217 1594 (license license:gpl3+)))
07f7cc03 1595
e28e74a5
EE
1596(define-public guile-commonmark
1597 (package
1598 (name "guile-commonmark")
1599 (version "0.1")
1600 (source (origin
1601 (method url-fetch)
1602 (uri (string-append "https://github.com/OrangeShark/" name
1603 "/releases/download/v" version
1604 "/" name "-" version ".tar.gz"))
1605 (sha256
1606 (base32
757ce0f9
LC
1607 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1608 (modules '((guix build utils)))
1609 (snippet
1610 ;; Use the real effective version of Guile in directory names
1611 ;; instead of a hard-coded "/2.0".
1612 '(begin
1613 (substitute* "configure"
1614 (("ac_subst_vars='")
1615 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1616 (substitute* "Makefile.in"
96d6c41d
LC
1617 (("moddir =.*")
1618 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
1619 (("godir =.*")
1620 "godir = $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
6cbee49d 1621 #t))))
e28e74a5
EE
1622 (build-system gnu-build-system)
1623 (inputs
7c86c031 1624 `(("guile" ,guile-2.2)))
e28e74a5
EE
1625 (synopsis "CommonMark parser for Guile")
1626 (description
1627 "guile-commonmark is a library for parsing CommonMark, a fully specified
1628variant of Markdown. The library is written in Guile Scheme and is designed
1629to transform a CommonMark document to SXML. guile-commonmark tries to closely
1630follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1631is no support for parsing block and inline level HTML.")
1632 (home-page "https://github.com/OrangeShark/guile-commonmark")
71e0f217 1633 (license license:lgpl3+)))
e28e74a5 1634
7c86c031
LC
1635(define-public guile2.0-commonmark
1636 (package-for-guile-2.0 guile-commonmark))
947a5d47 1637(define-public guile2.2-commonmark
7c86c031 1638 (deprecated-package "guile2.2-commonmark" guile-commonmark))
947a5d47 1639
3b5783fc
AB
1640(define-public guile-bytestructures
1641 (package
1642 (name "guile-bytestructures")
90977eb5 1643 (version "1.0.3")
3b5783fc 1644 (source (origin
4f85f7f7 1645 (method url-fetch)
1646 (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
1647 "/releases/download/v" version
1648 "/bytestructures-" version ".tar.gz"))
3b5783fc
AB
1649 (sha256
1650 (base32
90977eb5 1651 "0xf6s8gd3656j8k2ar6y7i62r68azawyzxhsagsk8nvldnrs1r18"))))
4f85f7f7 1652 (build-system gnu-build-system)
726ecfeb 1653 (native-inputs
4f85f7f7 1654 `(("pkg-config" ,pkg-config)))
3b5783fc 1655 (inputs
aabece2e 1656 `(("guile" ,guile-2.2)))
3b5783fc
AB
1657 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1658 (synopsis "Structured access to bytevector contents for Guile")
1659 (description
1660 "Guile bytestructures offers a system imitating the type system
1661of the C programming language, to be used on bytevectors. C's type
1662system works on raw memory, and Guile works on bytevectors which are
1663an abstraction over raw memory. It's also more powerful than the C
1664type system, elevating types to first-class status.")
71e0f217 1665 (license license:gpl3+)))
3b5783fc 1666
726ecfeb
LC
1667(define-public guile2.0-bytestructures
1668 (package-for-guile-2.0 guile-bytestructures))
1669
472fc855
LC
1670(define-public guile-aspell
1671 (package
1672 (name "guile-aspell")
234ea3d6 1673 (version "0.4")
472fc855
LC
1674 (source (origin
1675 (method url-fetch)
1676 (uri (string-append
1677 "http://lonelycactus.com/tarball/guile_aspell-"
1678 version ".tar.gz"))
1679 (sha256
1680 (base32
234ea3d6 1681 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
472fc855
LC
1682 (build-system gnu-build-system)
1683 (arguments
7295087e
LC
1684 '(#:phases (modify-phases %standard-phases
1685 (add-before 'configure 'set-guilesitedir
1686 (lambda _
1687 (substitute* "Makefile.in"
1688 (("^guilesitedir =.*$")
1689 "guilesitedir = \
1690$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1691 #t))
472fc855
LC
1692 (add-before 'build 'set-libaspell-file-name
1693 (lambda* (#:key inputs #:allow-other-keys)
1694 (let ((aspell (assoc-ref inputs "aspell")))
234ea3d6 1695 (substitute* "aspell.scm"
472fc855
LC
1696 (("\"libaspell\\.so\"")
1697 (string-append "\"" aspell
1698 "/lib/libaspell\"")))
1699 #t))))))
1700 (native-inputs `(("pkg-config" ,pkg-config)))
cb5be6df 1701 (inputs `(("guile" ,guile-2.2)
472fc855
LC
1702 ("aspell" ,aspell)))
1703 (home-page "https://github.com/spk121/guile-aspell")
1704 (synopsis "Spell-checking from Guile")
1705 (description
1706 "guile-aspell is a Guile Scheme library for comparing a string against a
1707dictionary and suggesting spelling corrections.")
71e0f217 1708 (license license:gpl3+)))
472fc855 1709
a614ce38
LC
1710(define-public guile-bash
1711 ;; This project is currently retired. It was initially announced here:
1712 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1713 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1714 (revision "0"))
1715 (package
1716 (name "guile-bash")
1717 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1718 (home-page
1719 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1720 (source (origin
1721 (method git-fetch)
1722 (uri (git-reference
1723 (commit commit)
1724 (url home-page)))
1725 (sha256
1726 (base32
1727 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1728 (file-name (string-append name "-" version "-checkout"))))
1729 (build-system gnu-build-system)
1730 (arguments
189be331 1731 '(#:configure-flags
a614ce38
LC
1732 ;; Add -I to match 'bash.pc' of Bash 4.4.
1733 (list (string-append "CPPFLAGS=-I"
1734 (assoc-ref %build-inputs "bash:include")
1735 "/include/bash/include")
1736
1737 ;; The '.a' file is useless.
1738 "--disable-static"
1739
1740 ;; Install 'lib/bash' as Bash 4.4 expects.
1741 (string-append "--libdir=" (assoc-ref %outputs "out")
1742 "/lib/bash"))))
1743 (native-inputs `(("pkg-config" ,pkg-config)
464f5447 1744 ("autoconf" ,autoconf-wrapper)
a614ce38
LC
1745 ("automake" ,automake)
1746 ("libtool" ,libtool)
1747 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
b7158b76
LC
1748 ("gettext" ,gettext-minimal)
1749
1750 ;; Bash with loadable module support, for the test
1751 ;; suite.
1752 ("bash-full" ,bash)))
a614ce38
LC
1753 (inputs `(("guile" ,guile-2.0)
1754 ("bash:include" ,bash "include")))
1755 (synopsis "Extend Bash using Guile")
1756 (description
1757 "Guile-Bash provides a shared library and set of Guile modules,
1758allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1759the following aspects of Bash:
1760
1761@itemize
1762@item aliases;
1763@item setting and getting Bash variables;
1764@item creating dynamic variables;
1765@item creating Bash functions with a Scheme implementation;
1766@item reader macro for output capturing;
1767@item reader macro for evaluating raw Bash commands.
1768@end itemize
1769
1770To enable it, run:
1771
1772@example
1773enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1774@end example
1775
1776and then run @command{scm example.scm}.")
71e0f217 1777 (license license:gpl3+))))
a614ce38 1778
c5793e7e
CAW
1779(define-public guile-8sync
1780 (package
1781 (name "guile-8sync")
525acb6e 1782 (version "0.4.2")
c5793e7e
CAW
1783 (source (origin
1784 (method url-fetch)
1785 (uri (string-append "mirror://gnu/8sync/8sync-" version
1786 ".tar.gz"))
1787 (sha256
1788 (base32
525acb6e 1789 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
c5793e7e
CAW
1790 (build-system gnu-build-system)
1791 (native-inputs `(("autoconf" ,autoconf)
1792 ("automake" ,automake)
f6396d86 1793 ("guile" ,guile-2.2)
c5793e7e
CAW
1794 ("pkg-config" ,pkg-config)
1795 ("texinfo" ,texinfo)))
1796 (arguments
1797 `(#:phases (modify-phases %standard-phases
1798 (add-before 'configure 'setenv
1799 (lambda _
1800 ;; quiet warnings
ab4a1731
CAW
1801 (setenv "GUILE_AUTO_COMPILE" "0")
1802 #t)))))
c5793e7e
CAW
1803 (home-page "https://gnu.org/s/8sync/")
1804 (synopsis "Asynchronous actor model library for Guile")
1805 (description
1806 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1807library for GNU Guile based on the actor model.
1808
f6396d86 1809Note that 8sync is only available for Guile 2.2.")
71e0f217 1810 (license license:lgpl3+)))
c5793e7e 1811
aaf1bdc3
CAW
1812(define-public guile-fibers
1813 (package
1814 (name "guile-fibers")
1815 (version "1.0.0")
1816 (source (origin
1817 (method url-fetch)
1818 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1819 version ".tar.gz"))
1820 (sha256
1821 (base32
1822 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1823 (build-system gnu-build-system)
5e3082df
LC
1824 (arguments
1825 '(#:phases (modify-phases %standard-phases
1826 (add-after 'install 'mode-guile-objects
1827 (lambda* (#:key outputs #:allow-other-keys)
1828 ;; .go files are installed to "lib/guile/X.Y/cache".
1829 ;; This phase moves them to "…/site-ccache".
1830 (let* ((out (assoc-ref outputs "out"))
1831 (lib (string-append out "/lib/guile"))
1832 (old (car (find-files lib "^ccache$"
1833 #:directories? #t)))
1834 (new (string-append (dirname old)
1835 "/site-ccache")))
1836 (rename-file old new)
1837 #t))))))
aaf1bdc3
CAW
1838 (native-inputs
1839 `(("texinfo" ,texinfo)
1840 ("pkg-config" ,pkg-config)))
1841 (inputs
f6396d86 1842 `(("guile" ,guile-2.2)))
aaf1bdc3
CAW
1843 (synopsis "Lightweight concurrency facility for Guile")
1844 (description
1845 "Fibers is a Guile library that implements a a lightweight concurrency
1846facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1847like a \"goroutine\" from the Go language: a lightweight thread-like
1848abstraction. Systems built with Fibers can scale up to millions of concurrent
1849fibers, tens of thousands of concurrent socket connections, and many parallel
1850cores. The Fibers library also provides Concurrent ML-like channels for
1851communication between fibers.
1852
1853Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1854is not available for Guile 2.0.")
1855 (home-page "https://github.com/wingo/fibers")
1856 (license license:lgpl3+)))
1857
bd233722 1858(define-public guile-git
e85035c9
LC
1859 (package
1860 (name "guile-git")
1861 (version "0.1.0")
1862 (home-page "https://gitlab.com/guile-git/guile-git.git")
1863 (source (origin
1864 (method git-fetch)
1865 (uri (git-reference (url home-page)
1866 (commit (string-append "v" version))))
1867 (sha256
1868 (base32
1869 "1z3awa3i5il08dl2swbnli2j7cawdpray11zx4844j27bxqddcs2"))
1870 (file-name (git-file-name name version))))
1871 (build-system gnu-build-system)
1872 (native-inputs
1873 `(("autoconf" ,autoconf)
1874 ("automake" ,automake)
1875 ("texinfo" ,texinfo)
1876 ("pkg-config" ,pkg-config)))
1877 (inputs
1878 `(("guile" ,guile-2.2)
1879 ("libgit2" ,libgit2)))
1880 (propagated-inputs
1881 `(("guile-bytestructures" ,guile-bytestructures)))
1882 (synopsis "Guile bindings for libgit2")
1883 (description
1884 "This package provides Guile bindings to libgit2, a library to
bd233722 1885manipulate repositories of the Git version control system.")
e85035c9 1886 (license license:gpl3+)))
c5793e7e 1887
70bc6085
LC
1888(define-public guile2.0-git
1889 (package-for-guile-2.0 guile-git))
1890
f252d6df 1891(define-public guile-syntax-highlight
3c90c7ae
DT
1892 (package
1893 (name "guile-syntax-highlight")
1894 (version "0.1")
1895 (source (origin
1896 (method url-fetch)
1897 (uri (string-append "https://files.dthompson.us/"
1898 "guile-syntax-highlight/"
1899 "guile-syntax-highlight-"
1900 version ".tar.gz"))
1901 (sha256
1902 (base32
1903 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))))
1904 (build-system gnu-build-system)
1905 (native-inputs
1906 `(("pkg-config" ,pkg-config)))
1907 (inputs
1908 `(("guile" ,guile-2.2)))
8c72ed92
RW
1909 (synopsis "General-purpose syntax highlighter for GNU Guile")
1910 (description "Guile-syntax-highlight is a general-purpose syntax
f252d6df
DT
1911highlighting library for GNU Guile. It can parse code written in various
1912programming languages into a simple s-expression that can be converted to
1913HTML (via SXML) or any other format for rendering.")
3c90c7ae
DT
1914 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
1915 (license license:lgpl3+)))
f252d6df 1916
d26ae96c
CAW
1917(define-public guile-sjson
1918 (package
1919 (name "guile-sjson")
a62a16a4 1920 (version "0.2.1")
d26ae96c
CAW
1921 (source (origin
1922 (method url-fetch)
1923 (uri (string-append "https://dustycloud.org/misc/sjson-" version
1924 ".tar.gz"))
1925 (sha256
1926 (base32
a62a16a4 1927 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
d26ae96c 1928 (build-system gnu-build-system)
d26ae96c
CAW
1929 (native-inputs
1930 `(("autoconf" ,autoconf)
1931 ("automake" ,automake)
1932 ("pkg-config" ,pkg-config)))
1933 (inputs
1934 `(("guile" ,guile-2.2)))
1935 (home-page "https://gitlab.com/dustyweb/guile-sjson")
1936 (synopsis "S-expression based json reader/writer for Guile")
1937 (description "guile-sjson is a json reader/writer for Guile.
1938It has a nice, simple s-expression based syntax.")
1939 (license license:lgpl3+)))
1940
e076d56a 1941(define-public guile-colorized
1942 (package
1943 (name "guile-colorized")
1944 (version "0.1")
1945 (source (origin
1946 (method url-fetch)
1947 (uri (string-append "https://github.com/NalaGinrut/guile-colorized/"
1948 "archive/v" version ".tar.gz"))
1949 (file-name (string-append name "-" version ".tar.gz"))
1950 (sha256
1951 (base32
1952 "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
977d8666
LC
1953 (build-system guile-build-system)
1954 (native-inputs
e076d56a 1955 `(("guile" ,guile-2.2)))
1956 (home-page "https://github.com/NalaGinrut/guile-colorized")
1957 (synopsis "Colorized REPL for Guile")
1958 (description
1959 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
1960 (license license:gpl3+)))
1961
fef7baba
LC
1962(define-public guile-pfds
1963 (package
1964 (name "guile-pfds")
1965 (version "0.3")
1966 (home-page "https://github.com/ijp/pfds")
1967 (source (origin
1968 (method git-fetch)
1969 (uri (git-reference
1970 (url home-page)
1971 (commit (string-append "v" version))))
1972 (sha256
1973 (base32
1974 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh"))
1975 (file-name (string-append name "-" version "-checkout"))))
1976 (build-system guile-build-system)
1977 (arguments
1978 '(#:source-directory "src"
1979 #:phases (modify-phases %standard-phases
1980 (add-after 'unpack 'move-files-around
1981 (lambda _
1982 ;; Move files under a pfds/ directory to reflect the
1983 ;; module hierarchy.
1984 (mkdir-p "src/pfds")
1985 (for-each (lambda (file)
1986 (rename-file file
1987 (string-append "src/pfds/"
1988 file)))
1989 '("bbtrees.sls"
1990 "deques"
1991 "deques.sls"
1992 "dlists.sls"
1993 "fingertrees.sls"
1994 "hamts.sls"
1995 "heaps.sls"
1996 "private"
1997 "psqs.sls"
1998 "queues"
1999 "queues.sls"
2000 "sequences.sls"
2001 "sets.sls"))
2002
2003 ;; In Guile <= 2.2.4, there's no way to tell 'guild
2004 ;; compile' to accept the ".sls" extension. So...
2005 (for-each (lambda (file)
2006 (rename-file file
2007 (string-append
2008 (string-drop-right file 4)
2009 ".scm")))
2010 (find-files "." "\\.sls$"))
2011 #t)))))
2012 (native-inputs
2013 `(("guile" ,guile-2.2)))
2014 (synopsis "Purely functional data structures for Guile")
2015 (description
2016 "This package provides purely functional data structures written in R6RS
2017Scheme and compiled for Guile. It has been tested with Racket, Guile 2,
2018Vicare Scheme and IronScheme. Right now it contains:
2019
2020@itemize
2021@item queues
2022@item deques
2023@item bbtrees
2024@item sets
2025@item dlists
2026@item priority search queues (PSQs)
2027@item finger trees
2028@item sequences
2029@item heaps
2030@item hash array mapped tries (HAMTs).
2031@end itemize\n")
2032 (license license:bsd-3)))
2033
69502b5e
LC
2034(define-public guile-aa-tree
2035 (package
2036 (name "guile-aa-tree")
2037 (version "3.1.1")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append "mirror://savannah/guile-aa-tree/guile-aa-tree-"
2041 version ".tar.gz"))
2042 (sha256
2043 (base32
2044 "0044c105r3q9vpl17pv3phl1b79kjm1llhkakqgiasixyav01blh"))))
2045 (build-system guile-build-system)
2046 (native-inputs `(("guile" ,guile-2.2)))
2047 ;; https://savannah.nongnu.org/projects/guile-aa-tree
2048 (home-page "https://qlfiles.net/guile-aa-tree/")
2049 (synopsis "AA tree data structure for Guile")
2050 (description
2051 "This package provides an implementation of @dfn{AA trees}, a
2052self-balancing binary tree data structure, for Guile. It ensure @math{O(log
2053n)} worst case performance for core operations. The module provides
2054non-mutating insert, delete, and search operations, with support for
2055convenient nested tree operations.")
2056 (license license:gpl3+)))
2057
f858e58f 2058(define-public guile-simple-zmq
828fa94d
LC
2059 (let ((commit "5bb66a0499f94006cfd18b58e80ad6623f911c31")
2060 (revision "2"))
f858e58f
PAR
2061 (package
2062 (name "guile-simple-zmq")
2063 (version (git-version "0.0.0" revision commit))
2064 (source
2065 (origin
2066 (method git-fetch)
2067 (uri (git-reference
2068 (url "https://github.com/jerry40/guile-simple-zmq")
2069 (commit commit)))
2070 (sha256
2071 (base32
828fa94d 2072 "0dj1brjqa7m4k71sf94aq26ca0la3nr894kfmjnqkpawqfp4dyaz"))
f858e58f 2073 (file-name (git-file-name name version))))
977d8666 2074 (build-system guile-build-system)
f858e58f 2075 (arguments
977d8666
LC
2076 `(#:source-directory "src"
2077 #:phases (modify-phases %standard-phases
2078 (add-after 'unpack 'set-libzmq-file-name
2079 (lambda* (#:key inputs #:allow-other-keys)
2080 (substitute* "src/simple-zmq.scm"
2081 (("\\(dynamic-link \"libzmq\"\\)")
2082 (format #f "(dynamic-link \"~a/lib/libzmq.so\")"
2083 (assoc-ref inputs "zeromq"))))
2084 #t)))))
2085 (native-inputs
e46b84e3 2086 `(("guile" ,guile-2.2)))
977d8666 2087 (inputs
e46b84e3 2088 `(("zeromq" ,zeromq)))
f858e58f
PAR
2089 (home-page "https://github.com/jerry40/guile-simple-zmq")
2090 (synopsis "Guile wrapper over ZeroMQ library")
2091 (description
2092 "This package provides a Guile programming interface to the ZeroMQ
2093messaging library.")
2094 (license license:gpl3+))))
2095
fa6a3bb7 2096(define-public jupyter-guile-kernel
828fa94d
LC
2097 (let ((commit "a7db9245a886e104138474df46c3e88b95cff629")
2098 (revision "1"))
fa6a3bb7
PAR
2099 (package
2100 (name "jupyter-guile-kernel")
2101 (version (git-version "0.0.0" revision commit))
2102 (source
2103 (origin
2104 (method git-fetch)
2105 (uri (git-reference
2106 (url "https://github.com/jerry40/guile-kernel")
2107 (commit commit)))
2108 (sha256
2109 (base32
828fa94d 2110 "0aj04853bqm47ivfcmrgpb7w3wkis847kc7qrwsa5zcn9h38qh2f"))))
977d8666 2111 (build-system guile-build-system)
fa6a3bb7 2112 (arguments
977d8666
LC
2113 '(#:phases (modify-phases %standard-phases
2114 (add-after 'unpack 'set-openssl-file-name
2115 (lambda* (#:key inputs #:allow-other-keys)
2116 ;; Record the absolute file name of the 'openssl'
2117 ;; command.
2118 (substitute* "src/hmac.scm"
2119 (("openssl")
2120 (string-append (assoc-ref inputs "openssl")
2121 "/bin/openssl")))
2122 #t))
2123
2124 ;; XXX: The code uses 'include' to include its own source
2125 ;; files, and "-L src" isn't enough in this case.
2126 (add-before 'build 'chdir
2127 (lambda _ (chdir "src") #t))
2128 (add-after 'build 'chdir-back
2129 (lambda _ (chdir "..") #t))
2130
2131 (add-after 'install 'install-kernel
2132 (lambda* (#:key inputs outputs #:allow-other-keys)
8539eb5c
LC
2133 (let* ((out (assoc-ref outputs "out"))
2134 (json (assoc-ref inputs "guile-json"))
2135 (zmq (assoc-ref inputs "guile-simple-zmq"))
2136 (deps (list json zmq))
2137 (dir (string-append
2138 out "/share/jupyter/kernels/guile"))
2139 (effective (target-guile-effective-version)))
977d8666
LC
2140 ;; Install kernel.
2141 (install-file "src/kernel.json" dir)
2142
2143 ;; Fix hard-coded file name in the kernel.
2144 (substitute* (string-append dir "/kernel.json")
2145 (("/home/.*/guile-jupyter-kernel.scm")
2146 (string-append out "/share/guile/site/"
2147 (target-guile-effective-version)
2148 "/guile-jupyter-kernel.scm"))
2149 (("\"guile\"")
2150 (string-append "\"" (assoc-ref inputs "guile")
2151 "/bin/guile\""))
2152 (("-s")
8539eb5c
LC
2153 ;; Add '-L' and '-C' flags so that the kernel
2154 ;; finds its dependencies.
2155 (let ((-L (map (lambda (item)
2156 (string-append "\"" item
2157 "/share/guile/site/"
2158 effective "\""))
2159 deps))
2160 (-C (map (lambda (item)
2161 (string-append "\"" item
2162 "/lib/guile/"
2163 effective
2164 "/site-ccache\""))
2165 deps)))
2166 (string-append "--no-auto-compile\""
2167 (string-join -L ", \"-L\", "
2168 'prefix)
2169 (string-join -C ", \"-C\", "
2170 'prefix)
2171 ", \"-s"))))
977d8666 2172 #t))))))
fa6a3bb7
PAR
2173 (inputs
2174 `(("openssl" ,openssl)
8539eb5c
LC
2175 ("guile" ,guile-2.2)
2176 ("guile-json" ,guile-json)
fa6a3bb7
PAR
2177 ("guile-simple-zmq" ,guile-simple-zmq)))
2178 (synopsis "Guile kernel for the Jupyter Notebook")
2179 (description
2180 "This package provides a Guile 2.x kernel for the Jupyter Notebook. It
2181allows users to interact with the Guile REPL through Jupyter.")
2182 (home-page "https://github.com/jerry40/guile-kernel")
2183 (license license:gpl3+))))
2184
89f8c2ac
RJ
2185(define-public guile-sparql
2186 (package
2187 (name "guile-sparql")
2188 (version "0.0.7")
2189 (source (origin
2190 (method url-fetch)
2191 (uri (string-append
2192 "https://github.com/roelj/guile-sparql/releases/download/"
2193 version "/guile-sparql-" version ".tar.gz"))
2194 (sha256
2195 (base32 "1drnvhsgl0gc5crmb16yyw1j98nkhwwcgssv9vgm36ng43nnzffd"))))
2196 (build-system gnu-build-system)
2197 (arguments `(#:tests? #f)) ; There are no tests.
2198 (native-inputs
2199 `(("pkg-config" ,pkg-config)))
2200 (inputs
2201 `(("guile" ,guile-2.2)))
2202 (home-page "https://github.com/roelj/guile-sparql")
2203 (synopsis "SPARQL module for Guile")
2204 (description "This package provides the functionality to query a SPARQL
2205endpoint. Additionally, it provides an interface to write SPARQL queries
2206using S-expressions.")
2207 (license license:gpl3+)))
2208
1722d680 2209;;; guile.scm ends here