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