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