gnu: guile-sqlite3: Switch to Guile 2.2.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
8 ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10 ;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11 ;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
12 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
13 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14 ;;; Copyright © 2017 David Thompson <davet@gnu.org>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages guile)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages admin) ;;for tree
36 #:use-module (gnu packages aspell)
37 #:use-module (gnu packages bash)
38 #:use-module (gnu packages bdw-gc)
39 #:use-module (gnu packages gawk)
40 #:use-module (gnu packages gperf)
41 #:use-module (gnu packages libffi)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages flex)
44 #:use-module (gnu packages libunistring)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages m4)
47 #:use-module (gnu packages multiprecision)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages readline)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages ed)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages texinfo)
54 #:use-module (gnu packages man)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages sdl)
60 #:use-module (gnu packages maths)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages version-control)
63 #:use-module (gnu packages xdisorg)
64 #:use-module (gnu packages xorg)
65 #:use-module (gnu packages zip)
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix git-download)
69 #:use-module (guix build-system gnu)
70 #:use-module (guix build-system trivial)
71 #:use-module (guix utils)
72 #:use-module (ice-9 match))
73
74 ;;; Commentary:
75 ;;;
76 ;;; GNU Guile, and modules and extensions.
77 ;;;
78 ;;; Code:
79
80 (define-public guile-1.8
81 (package
82 (name "guile")
83 (version "1.8.8")
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "mirror://gnu/guile/guile-" version
87 ".tar.gz"))
88 (sha256
89 (base32
90 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
91 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
92 (build-system gnu-build-system)
93 (arguments '(#:configure-flags '("--disable-error-on-warning")
94
95 ;; Insert a phase before `configure' to patch things up.
96 #:phases (alist-cons-before
97 'configure
98 'patch-stuff
99 (lambda* (#:key outputs #:allow-other-keys)
100 ;; Add a call to `lt_dladdsearchdir' so that
101 ;; `libguile-readline.so' & co. are in the
102 ;; loader's search path.
103 (substitute* "libguile/dynl.c"
104 (("lt_dlinit.*$" match)
105 (format #f
106 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
107 match
108 (assoc-ref outputs "out"))))
109
110 ;; The usual /bin/sh...
111 (substitute* "ice-9/popen.scm"
112 (("/bin/sh") (which "sh"))))
113 %standard-phases)))
114 (inputs `(("gawk" ,gawk)
115 ("readline" ,readline)))
116
117 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
118 ;; propagated.
119 (propagated-inputs `(("gmp" ,gmp)
120 ("libltdl" ,libltdl)))
121
122 ;; When cross-compiling, a native version of Guile itself is needed.
123 (self-native-input? #t)
124
125 (native-search-paths
126 (list (search-path-specification
127 (variable "GUILE_LOAD_PATH")
128 (files '("share/guile/site")))))
129
130 (synopsis "Scheme implementation intended especially for extensions")
131 (description
132 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
133 official extension language of the GNU system. It is an implementation of
134 the Scheme language which can be easily embedded in other applications to
135 provide a convenient means of extending the functionality of the application
136 without requiring the source code to be rewritten.")
137 (home-page "https://www.gnu.org/software/guile/")
138 (license license:lgpl2.0+)))
139
140 (define-public guile-2.0
141 (package
142 (name "guile")
143 (version "2.0.14")
144 (source (origin
145 (method url-fetch)
146 (uri (string-append "mirror://gnu/guile/guile-" version
147 ".tar.xz"))
148 (sha256
149 (base32
150 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
151 (build-system gnu-build-system)
152 (native-inputs `(("pkgconfig" ,pkg-config)))
153 (inputs `(("libffi" ,libffi)
154 ("readline" ,readline)
155 ,@(libiconv-if-needed)
156 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
157 (propagated-inputs
158 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
159 ;; reads `-lltdl -lunistring', adding them here will add the needed
160 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
161 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
162 ("libunistring" ,libunistring)
163
164 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
165 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
166 ("libltdl" ,libltdl)
167
168 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
169 ;; must be propagated.
170 ("bdw-gc" ,libgc)
171 ("gmp" ,gmp)))
172
173 (self-native-input? #t)
174
175 (outputs '("out" "debug"))
176
177 (arguments
178 `(#:configure-flags '("--disable-static") ;saves 3MiB
179 #:phases (alist-cons-before
180 'configure 'pre-configure
181 (lambda* (#:key inputs #:allow-other-keys)
182 ;; Tell (ice-9 popen) the file name of Bash.
183 (let ((bash (assoc-ref inputs "bash")))
184 (substitute* "module/ice-9/popen.scm"
185 ;; If bash is #f allow fallback for user to provide
186 ;; "bash" in PATH. This happens when cross-building to
187 ;; MinGW for which we do not have Bash yet.
188 (("/bin/sh")
189 ,@(if (target-mingw?)
190 '((if bash
191 (string-append bash "/bin/bash")
192 "bash"))
193 '((string-append bash "/bin/bash")))))))
194 %standard-phases)))
195
196 (native-search-paths
197 (list (search-path-specification
198 (variable "GUILE_LOAD_PATH")
199 (files '("share/guile/site/2.0")))
200 (search-path-specification
201 (variable "GUILE_LOAD_COMPILED_PATH")
202 (files '("lib/guile/2.0/site-ccache"
203 "share/guile/site/2.0")))))
204
205 (synopsis "Scheme implementation intended especially for extensions")
206 (description
207 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
208 official extension language of the GNU system. It is an implementation of
209 the Scheme language which can be easily embedded in other applications to
210 provide a convenient means of extending the functionality of the application
211 without requiring the source code to be rewritten.")
212 (home-page "https://www.gnu.org/software/guile/")
213 (license license:lgpl3+)))
214
215 (define-public guile-2.0/fixed
216 ;; A package of Guile 2.0 that's rarely changed. It is the one used
217 ;; in the `base' module, and thus changing it entails a full rebuild.
218 (package
219 (inherit guile-2.0)
220 (properties '((hidden? . #t))) ;people should install 'guile-2.0'
221 (replacement #f)))
222
223 (define-public guile-2.2
224 (package (inherit guile-2.0)
225 (name "guile")
226 (version "2.2.2")
227 (replacement #f)
228 (source (origin
229 (method url-fetch)
230 (uri (string-append "mirror://gnu/guile/guile-" version
231 ".tar.lz"))
232 (sha256
233 (base32
234 "1dnh75h4rkx1zflpsngznkwcd6afn6zrc5x3xq7n946pm5bnx5bq"))
235 (modules '((guix build utils)))
236
237 ;; Remove the pre-built object files. Instead, build everything
238 ;; from source, at the expense of significantly longer build
239 ;; times (almost 3 hours on a 4-core Intel i5).
240 (snippet '(for-each delete-file
241 (find-files "prebuilt" "\\.go$")))))
242 (properties '((timeout . 72000) ;20 hours
243 (max-silent-time . 10800))) ;3 hours (needed on ARM)
244 (native-search-paths
245 (list (search-path-specification
246 (variable "GUILE_LOAD_PATH")
247 (files '("share/guile/site/2.2")))
248 (search-path-specification
249 (variable "GUILE_LOAD_COMPILED_PATH")
250 (files '("lib/guile/2.2/site-ccache"
251 "share/guile/site/2.2")))))))
252
253 (define-public guile-next
254 (deprecated-package "guile-next" guile-2.2))
255
256 (define (guile-variant-package-name prefix)
257 (lambda (name)
258 "Return NAME with PREFIX instead of \"guile-\", when applicable."
259 (if (string-prefix? "guile-" name)
260 (string-append prefix "-"
261 (string-drop name
262 (string-length "guile-")))
263 name)))
264
265 (define package-for-guile-2.2
266 ;; A procedure that rewrites the dependency tree of the given package to use
267 ;; GUILE-2.2 instead of GUILE-2.0.
268 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
269 (guile-variant-package-name "guile2.2")))
270
271 (define package-for-guile-2.0
272 ;; Likewise, but the other way around. :-)
273 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
274 (guile-variant-package-name "guile2.0")))
275
276 (define-public guile-for-guile-emacs
277 (package (inherit guile-2.2)
278 (name "guile-for-guile-emacs")
279 (version "20150510.d8d9a8d")
280 (source (origin
281 (method git-fetch)
282 (uri (git-reference
283 (url "git://git.hcoop.net/git/bpt/guile.git")
284 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
285 (sha256
286 (base32
287 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
288 (arguments
289 (substitute-keyword-arguments `(;; Tests aren't passing for now.
290 ;; Obviously we should re-enable this!
291 #:tests? #f
292 ,@(package-arguments guile-2.2))
293 ((#:phases phases)
294 `(modify-phases ,phases
295 (add-after 'unpack 'autogen
296 (lambda _
297 (zero? (system* "sh" "autogen.sh"))))
298 (add-before 'autogen 'patch-/bin/sh
299 (lambda _
300 (substitute* "build-aux/git-version-gen"
301 (("#!/bin/sh") (string-append "#!" (which "sh"))))
302 #t))))))
303 (native-inputs
304 `(("autoconf" ,autoconf)
305 ("automake" ,automake)
306 ("libtool" ,libtool)
307 ("flex" ,flex)
308 ("texinfo" ,texinfo)
309 ("gettext" ,gettext-minimal)
310 ,@(package-native-inputs guile-2.2)))
311 ;; Same as in guile-2.0
312 (native-search-paths
313 (list (search-path-specification
314 (variable "GUILE_LOAD_PATH")
315 (files '("share/guile/site/2.0")))
316 (search-path-specification
317 (variable "GUILE_LOAD_COMPILED_PATH")
318 (files '("lib/guile/2.0/site-ccache"
319 "share/guile/site/2.0")))))))
320
321 ;; There has not been any release yet.
322 (define-public guildhall
323 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
324 (revision "1"))
325 (package
326 (name "guildhall")
327 (version (string-append "0-" revision "." (string-take commit 9)))
328 (source (origin
329 (method git-fetch)
330 (uri (git-reference
331 (url "https://github.com/ijp/guildhall.git")
332 (commit commit)))
333 (file-name (string-append name "-" version "-checkout"))
334 (sha256
335 (base32
336 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
337 (build-system gnu-build-system)
338 (arguments
339 `(#:phases
340 (modify-phases %standard-phases
341 ;; Tests fail without this fix because they try to load the bash
342 ;; executable as a Scheme file. See bug report at
343 ;; https://github.com/ijp/guildhall/issues/22
344 (add-after 'unpack 'fix-bug-22
345 (lambda _
346 (substitute* "Makefile.am"
347 (("TESTS_ENVIRONMENT=.*")
348 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
349 TEST_EXTENSIONS = .scm
350 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
351 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
352 ;; FIXME: one of the database tests fails for unknown
353 ;; reasons. It does not fail when run outside of Guix.
354 (("tests/database.scm") ""))
355 #t))
356 (add-before 'configure 'autogen
357 (lambda _
358 (zero? (system* "sh" "autogen.sh")))))))
359 (inputs
360 `(("guile" ,guile-2.0)))
361 (native-inputs
362 `(("zip" ,zip) ; for tests
363 ("autoconf" ,autoconf)
364 ("automake" ,automake)
365 ("texinfo" ,texinfo)))
366 (synopsis "Package manager for Guile")
367 (description
368 "Guildhall is a package manager written for Guile Scheme. A guild is
369 an association of independent craftspeople. A guildhall is where they meet.
370 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
371 to share code.
372
373 On a practical level, Guildhall lets you share Scheme modules and programs
374 over the internet, and install code that has been shared by others. Guildhall
375 can handle dependencies, so when a program requires several libraries, and
376 each of those has further dependencies, all of the prerequisites for the
377 program can be installed in one go.")
378 (home-page "https://github.com/ijp/guildhall")
379 (license license:gpl3+))))
380
381 \f
382 ;;;
383 ;;; Extensions.
384 ;;;
385
386 (define-public artanis
387 (package
388 (name "artanis")
389 (version "0.1.2")
390 (source (origin
391 (method url-fetch)
392 (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
393 version ".tar.gz"))
394 (sha256
395 (base32
396 "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
397 (patches (search-patches "artanis-fix-Makefile.in.patch"))))
398 (build-system gnu-build-system)
399 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
400 (inputs `(("guile" ,guile-2.0)))
401 (native-inputs `(("bash" ,bash) ;for the `source' builtin
402 ("pkgconfig" ,pkg-config)
403 ("util-linux" ,util-linux))) ;for the `script' command
404 (arguments
405 '(#:make-flags
406 ;; TODO: The documentation must be built with the `docs' target.
407 (let* ((out (assoc-ref %outputs "out"))
408 (dir (string-append out "/share/guile/site/2.0")))
409 ;; Don't use (%site-dir) for site paths.
410 (list (string-append "MOD_PATH=" dir)
411 (string-append "MOD_COMPILED_PATH=" dir)))
412 #:test-target "test"
413 #:phases
414 (modify-phases %standard-phases
415 (add-before
416 'install 'substitute-root-dir
417 (lambda* (#:key outputs #:allow-other-keys)
418 (let ((out (assoc-ref outputs "out")))
419 (substitute* "Makefile" ;ignore the execution of bash.bashrc
420 ((" /etc/bash.bashrc") " /dev/null"))
421 (substitute* "Makefile" ;set the root of config files to OUT
422 ((" /etc") (string-append " " out "/etc")))
423 (mkdir-p (string-append out "/bin")) ;for the `art' executable
424 #t))))))
425 (synopsis "Web application framework written in Guile")
426 (description "GNU Artanis is a web application framework written in Guile
427 Scheme. A web application framework (WAF) is a software framework that is
428 designed to support the development of dynamic websites, web applications, web
429 services and web resources. The framework aims to alleviate the overhead
430 associated with common activities performed in web development. Artanis
431 provides several tools for web development: database access, templating
432 frameworks, session management, URL-remapping for RESTful, page caching, and
433 more.")
434 (home-page "https://www.gnu.org/software/artanis/")
435 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
436
437 (define-public guile-reader
438 (package
439 (name "guile-reader")
440 (version "0.6.2")
441 (source (origin
442 (method url-fetch)
443 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
444 version ".tar.gz"))
445 (sha256
446 (base32
447 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
448 (build-system gnu-build-system)
449 (native-inputs `(("pkgconfig" ,pkg-config)
450 ("gperf" ,gperf-3.0)))
451 (inputs `(("guile" ,guile-2.2)))
452 (synopsis "Framework for building readers for GNU Guile")
453 (description
454 "Guile-Reader is a simple framework for building readers for GNU Guile.
455
456 The idea is to make it easy to build procedures that extend Guile’s read
457 procedure. Readers supporting various syntax variants can easily be written,
458 possibly by re-using existing “token readers” of a standard Scheme
459 readers. For example, it is used to implement Skribilo’s R5RS-derived
460 document syntax.
461
462 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
463 hopefully more powerful and flexible (for instance, one may instantiate as
464 many readers as needed).")
465 (home-page "http://www.nongnu.org/guile-reader/")
466 (license license:gpl3+)))
467
468 (define-public guile2.0-reader
469 (package-for-guile-2.0 guile-reader))
470 (define-public guile2.2-reader
471 (deprecated-package "guile2.2-reader" guile-reader))
472
473 (define-public guile-ncurses
474 (package
475 (name "guile-ncurses")
476 (version "2.2")
477 (source (origin
478 (method url-fetch)
479 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
480 version ".tar.gz"))
481 (sha256
482 (base32
483 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
484 (build-system gnu-build-system)
485 (inputs `(("ncurses" ,ncurses)
486 ("guile" ,guile-2.2)))
487 (native-inputs `(("pkg-config" ,pkg-config)))
488 (arguments
489 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
490 "--with-gnu-filesystem-hierarchy")
491 #:phases
492 (modify-phases %standard-phases
493 (add-before 'build 'fix-libguile-ncurses-file-name
494 (lambda* (#:key outputs #:allow-other-keys)
495 (and (zero? (system* "make" "install"
496 "-C" "src/ncurses"
497 "-j" (number->string
498 (parallel-job-count))))
499 (let* ((out (assoc-ref outputs "out"))
500 (dir "src/ncurses")
501 (files (find-files dir ".scm")))
502 (substitute* files
503 (("\"libguile-ncurses\"")
504 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
505 out)))
506 #t)))))))
507 (home-page "https://www.gnu.org/software/guile-ncurses/")
508 (synopsis "Guile bindings to ncurses")
509 (description
510 "guile-ncurses provides Guile language bindings for the ncurses
511 library.")
512 (license license:lgpl3+)))
513
514 (define-public mcron
515 (package
516 (name "mcron")
517 (version "1.0.8")
518 (source (origin
519 (method url-fetch)
520 (uri (string-append "mirror://gnu/mcron/mcron-"
521 version ".tar.gz"))
522 (sha256
523 (base32
524 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
525 (patches (search-patches "mcron-install.patch"))))
526 (build-system gnu-build-system)
527 (native-inputs `(("pkg-config" ,pkg-config)))
528 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
529 (home-page "https://www.gnu.org/software/mcron/")
530 (synopsis "Run jobs at scheduled times")
531 (description
532 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
533 tasks on a schedule, such as every hour or every Monday. Mcron is written in
534 Guile, so its configuration can be written in Scheme; the original cron
535 format is also supported.")
536 (license license:gpl3+)))
537
538 (define-public mcron2
539 ;; This is mthl's mcron development branch, not yet merged in mcron.
540 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
541 (package
542 (inherit mcron)
543 (name "mcron2")
544 (version (string-append (package-version mcron) "-0."
545 (string-take commit 7)))
546 (source (origin
547 (method git-fetch)
548 (uri (git-reference
549 (url "https://notabug.org/mthl/mcron/")
550 (commit commit)))
551 (sha256
552 (base32
553 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
554 (file-name (string-append name "-" version "-checkout"))))
555 (native-inputs
556 `(("autoconf" ,autoconf)
557 ("automake" ,automake)
558 ("pkg-config" ,pkg-config)
559 ("texinfo" ,texinfo)
560 ("help2man" ,help2man)))
561 (arguments
562 `(#:modules ((ice-9 match) (ice-9 ftw)
563 ,@%gnu-build-system-modules)
564
565 #:phases (modify-phases %standard-phases
566 (add-after 'unpack 'bootstrap
567 (lambda _
568 (zero? (system* "autoreconf" "-vfi"))))
569 (add-after 'install 'wrap-mcron
570 (lambda* (#:key outputs #:allow-other-keys)
571 ;; Wrap the 'mcron' command to refer to the right
572 ;; modules.
573 (let* ((out (assoc-ref outputs "out"))
574 (bin (string-append out "/bin"))
575 (site (string-append
576 out "/share/guile/site")))
577 (match (scandir site)
578 (("." ".." version)
579 (let ((modules (string-append site "/" version)))
580 (wrap-program (string-append bin "/mcron")
581 `("GUILE_LOAD_PATH" ":" prefix
582 (,modules))
583 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
584 (,modules)))
585 #t))))))))))))
586
587 (define-public guile-ics
588 (package
589 (name "guile-ics")
590 (version "0.1.1")
591 (source (origin
592 (method git-fetch)
593 (uri (git-reference
594 (url "https://github.com/artyom-poptsov/guile-ics")
595 (commit "v0.1.1")))
596 (file-name (string-append name "-" version "-checkout"))
597 (sha256
598 (base32
599 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
600 (build-system gnu-build-system)
601 (arguments
602 '(#:phases (modify-phases %standard-phases
603 (add-before 'configure 'autoreconf
604 (lambda _
605 ;; Repository comes with a broken symlink
606 (delete-file "README")
607 (symlink "README.org" "README")
608 (zero? (system* "autoreconf" "-fi")))))))
609 (native-inputs
610 `(("autoconf" ,(autoconf-wrapper))
611 ("automake" ,automake)
612 ("texinfo" ,texinfo)
613 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
614 ("gettext" ,gettext-minimal)
615 ("pkg-config" ,pkg-config)))
616 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
617 (propagated-inputs `(("guile-lib" ,guile-lib)))
618 (home-page "https://github.com/artyom-poptsov/guile-ics")
619 (synopsis "Guile parser library for the iCalendar format")
620 (description
621 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
622 pure Scheme. The library can be used to read and write iCalendar data.
623
624 The library is shipped with documentation in Info format and usage examples.")
625 (license license:gpl3+)))
626
627 (define-public guile-lib
628 (package
629 (name "guile-lib")
630 (version "0.2.5")
631 (source (origin
632 (method url-fetch)
633 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
634 version ".tar.gz"))
635 (sha256
636 (base32
637 "1qbk485djgxqrbfjvk4b7w7y4x9xygf2qb8dqnl7885kajasx8qg"))))
638 (build-system gnu-build-system)
639 (arguments
640 '(#:make-flags
641 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
642 #:phases
643 (modify-phases %standard-phases
644 (add-before 'configure 'patch-module-dir
645 (lambda _
646 (substitute* "src/Makefile.in"
647 (("^moddir = ([[:graph:]]+)")
648 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
649 (("^godir = ([[:graph:]]+)")
650 "godir = \
651 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
652 #t)))))
653 (native-inputs `(("pkg-config" ,pkg-config)))
654 (inputs `(("guile" ,guile-2.0)))
655 (home-page "http://www.nongnu.org/guile-lib/")
656 (synopsis "Collection of useful Guile Scheme modules")
657 (description
658 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
659 modules, allowing for people to cooperate integrating their generic Guile
660 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
661 for Guile\".")
662
663 ;; The whole is under GPLv3+, but some modules are under laxer
664 ;; distribution terms such as LGPL and public domain. See `COPYING' for
665 ;; details.
666 (license license:gpl3+)))
667
668 (define-public guile2.2-lib
669 (package-for-guile-2.2 guile-lib))
670
671 (define-public guile-json
672 (package
673 (name "guile-json")
674 (version "0.6.0")
675 (source (origin
676 (method url-fetch)
677 (uri (string-append "mirror://savannah/guile-json/guile-json-"
678 version ".tar.gz"))
679 (sha256
680 (base32
681 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
682 (modules '((guix build utils)))
683 (snippet
684 ;; Make sure everything goes under .../site/X.Y, like Guile's
685 ;; search paths expects.
686 '(begin
687 (substitute* "configure"
688 (("ac_subst_vars='")
689 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
690 (substitute* '("Makefile.in" "json/Makefile.in")
691 (("moddir =.*/share/guile/site" all)
692 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
693 (build-system gnu-build-system)
694 (native-inputs `(("guile" ,guile-2.0)))
695 (home-page "http://savannah.nongnu.org/projects/guile-json/")
696 (synopsis "JSON module for Guile")
697 (description
698 "Guile-JSON supports parsing and building JSON documents according to the
699 specification. These are the main features:
700
701 @itemize
702 @item Strictly complies to @uref{http://json.org, specification}.
703 @item Build JSON documents programmatically via macros.
704 @item Unicode support for strings.
705 @item Allows JSON pretty printing.
706 @end itemize\n")
707 (license license:lgpl3+)))
708
709 (define-public guile2.2-json
710 (package-for-guile-2.2 guile-json))
711
712 (define-public guile-minikanren
713 (package
714 (name "guile-minikanren")
715 (version "20150424.e844d85")
716 (source (origin
717 (method git-fetch)
718 (uri (git-reference
719 (url "https://github.com/ijp/minikanren.git")
720 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
721 (file-name (string-append name "-" version "-checkout"))
722 (sha256
723 (base32
724 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
725 (build-system trivial-build-system)
726 (arguments
727 `(#:modules ((guix build utils))
728 #:builder
729 (begin
730 (use-modules (guix build utils)
731 (ice-9 match)
732 (ice-9 popen)
733 (ice-9 rdelim))
734
735 (let* ((out (assoc-ref %outputs "out"))
736 (guile (assoc-ref %build-inputs "guile"))
737 (effective (read-line
738 (open-pipe* OPEN_READ
739 (string-append guile "/bin/guile")
740 "-c" "(display (effective-version))")))
741 (module-dir (string-append out "/share/guile/site/"
742 effective))
743 (source (assoc-ref %build-inputs "source"))
744 (doc (string-append out "/share/doc/guile-minikanren"))
745 (scm-files '("minikanren.scm"
746 "minikanren/mkextraforms.scm"
747 "minikanren/mkprelude.scm"
748 "minikanren/mk.scm"))
749 (guild (string-append (assoc-ref %build-inputs "guile")
750 "/bin/guild")))
751 ;; Make installation directories.
752 (mkdir-p (string-append module-dir "/minikanren"))
753 (mkdir-p doc)
754
755 ;; Compile .scm files and install.
756 (chdir source)
757 (setenv "GUILE_AUTO_COMPILE" "0")
758 (for-each (lambda (file)
759 (let* ((dest-file (string-append module-dir "/"
760 file))
761 (go-file (match (string-split file #\.)
762 ((base _)
763 (string-append module-dir "/"
764 base ".go")))))
765 ;; Install source module.
766 (copy-file file dest-file)
767 ;; Install compiled module.
768 (unless (zero? (system* guild "compile"
769 "-L" source
770 "-o" go-file
771 file))
772 (error (format #f "Failed to compile ~s to ~s!"
773 file go-file)))))
774 scm-files)
775
776 ;; Also copy over the README.
777 (install-file "README.org" doc)
778 #t))))
779 (inputs
780 `(("guile" ,guile-2.0)))
781 (home-page "https://github.com/ijp/minikanren")
782 (synopsis "MiniKanren declarative logic system, packaged for Guile")
783 (description
784 "MiniKanren is a relational programming extension to the Scheme
785 programming Language, written as a smaller version of Kanren suitable for
786 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
787 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
788
789 This is Ian Price's r6rs packaged version of miniKanren, which deviates
790 slightly from miniKanren mainline.
791
792 See http://minikanren.org/ for more on miniKanren generally.")
793 (license license:expat)))
794
795 (define-public guile2.2-minikanren
796 (package-for-guile-2.2 guile-minikanren))
797
798 (define-public guile-miniadapton
799 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
800 (revision "1"))
801 (package
802 (name "guile-miniadapton")
803 (version (string-append "0-" revision "." (string-take commit 9)))
804 (source (origin
805 (method git-fetch)
806 (uri (git-reference
807 (url "https://github.com/fisherdj/miniAdapton.git")
808 (commit commit)))
809 (file-name (string-append name "-" version "-checkout"))
810 (sha256
811 (base32
812 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
813 (build-system gnu-build-system)
814 (arguments
815 `(#:modules ((guix build utils)
816 (ice-9 popen)
817 (ice-9 rdelim)
818 (srfi srfi-1)
819 (guix build gnu-build-system))
820 #:tests? #f ; there is no test target
821 #:phases
822 (modify-phases %standard-phases
823 (delete 'configure)
824 (delete 'build)
825 (replace 'install
826 (lambda* (#:key outputs #:allow-other-keys)
827 (let* ((cwd (getcwd))
828 (scm-files (find-files "." "\\.scm$"))
829 (effective (read-line
830 (open-pipe* OPEN_READ
831 "guile" "-c"
832 "(display (effective-version))")))
833 (module-dir (string-append (assoc-ref outputs "out")
834 "/share/guile/site/"
835 effective)))
836
837 ;; Make installation directories.
838 (mkdir-p module-dir)
839
840 (setenv "GUILE_AUTO_COMPILE" "0")
841
842 ;; Compile .scm files and install.
843 (every (lambda (file)
844 (let ((go-file (string-append module-dir "/"
845 (basename file ".scm") ".go")))
846 ;; Install source module.
847 (install-file file module-dir)
848 ;; Compile and install module.
849 (zero? (system* "guild" "compile" "-L" cwd
850 "-o" go-file file))))
851 scm-files)))))))
852 (inputs
853 `(("guile" ,guile-2.2)))
854 (home-page "https://github.com/fisherdj/miniAdapton")
855 (synopsis "Minimal implementation of incremental computation in Guile
856 Scheme")
857 (description "This package provides a complete Scheme implementation of
858 miniAdapton, which implements the core functionality of the Adapton system for
859 incremental computation (also known as self-adjusting computation). Like
860 Adapton, miniAdapton allows programmers to safely combine mutation and
861 memoization. miniAdapton is built on top of an even simpler system,
862 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
863 understand, extend, and port to host languages other than Scheme.")
864 (license license:expat))))
865
866 (define-public guile-irregex
867 (package
868 (name "guile-irregex")
869 (version "0.9.6")
870 (source (origin
871 (method url-fetch)
872 (uri (string-append
873 "http://synthcode.com/scheme/irregex/irregex-"
874 version ".tar.gz"))
875 (sha256
876 (base32
877 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
878 (build-system gnu-build-system)
879 (arguments
880 `(#:modules ((guix build utils)
881 (ice-9 match)
882 (ice-9 rdelim)
883 (ice-9 popen)
884 (guix build gnu-build-system))
885 #:phases
886 (modify-phases %standard-phases
887 (delete 'configure)
888 (delete 'build)
889 (delete 'check)
890 (replace 'install
891 (lambda* (#:key inputs outputs #:allow-other-keys)
892 (let* ((out (assoc-ref outputs "out"))
893 (effective (read-line
894 (open-pipe* OPEN_READ
895 "guile" "-c"
896 "(display (effective-version))")))
897 (module-dir (string-append out "/share/guile/site/"
898 effective))
899 (source (assoc-ref inputs "source"))
900 (doc (string-append out "/share/doc/guile-irregex/"))
901 (guild (string-append (assoc-ref %build-inputs "guile")
902 "/bin/guild")))
903 ;; Make installation directories.
904 (mkdir-p (string-append module-dir "/rx/source"))
905 (mkdir-p doc)
906
907 ;; Compile .scm files and install.
908 (setenv "GUILE_AUTO_COMPILE" "0")
909
910 (for-each (lambda (copy-info)
911 (match copy-info
912 ((src-file dest-file-basis)
913 (let* ((dest-file (string-append
914 module-dir dest-file-basis
915 ".scm"))
916 (go-file (string-append
917 module-dir dest-file-basis
918 ".go")))
919 ;; Install source module.
920 (copy-file src-file
921 dest-file)
922 ;; Install compiled module.
923 (unless (zero? (system* guild "compile"
924 "-L" (getcwd)
925 "-o" go-file
926 src-file))
927 (error (format #f "Failed to compile ~s to ~s!"
928 src-file dest-file)))))))
929 '(("irregex-guile.scm" "/rx/irregex")
930 ("irregex.scm" "/rx/source/irregex")
931 ;; Not really reachable via guile's packaging system,
932 ;; but nice to have around
933 ("irregex-utils.scm" "/rx/source/irregex-utils")))
934
935 ;; Also copy over the README.
936 (install-file "irregex.html" doc)
937 #t))))))
938 (inputs
939 `(("guile" ,guile-2.0)))
940 (home-page "http://synthcode.com/scheme/irregex")
941 (synopsis "S-expression based regular expressions")
942 (description
943 "Irregex is an s-expression based alternative to your classic
944 string-based regular expressions. It implements SRFI 115 and is deeply
945 inspired by the SCSH regular expression system.")
946 (license license:bsd-3)))
947
948 (define-public guile2.2-irregex
949 (package-for-guile-2.2 guile-irregex))
950
951 ;; There are two guile-gdbm packages, one using the FFI and one with
952 ;; direct C bindings, hence the verbose name.
953
954 (define-public guile-gdbm-ffi
955 (package
956 (name "guile-gdbm-ffi")
957 (version "20120209.fa1d5b6")
958 (source (origin
959 (method git-fetch)
960 (uri (git-reference
961 (url "https://github.com/ijp/guile-gdbm.git")
962 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
963 (file-name (string-append name "-" version "-checkout"))
964 (sha256
965 (base32
966 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
967 (build-system trivial-build-system)
968 (arguments
969 `(#:modules
970 ((guix build utils))
971 #:builder
972 (begin
973 (use-modules (guix build utils)
974 (ice-9 rdelim)
975 (ice-9 popen))
976
977 ;; Avoid warnings we can safely ignore
978 (setenv "GUILE_AUTO_COMPILE" "0")
979
980 (let* ((out (assoc-ref %outputs "out"))
981 (effective-version
982 (read-line
983 (open-pipe* OPEN_READ
984 (string-append
985 (assoc-ref %build-inputs "guile")
986 "/bin/guile")
987 "-c" "(display (effective-version))")))
988 (module-dir (string-append out "/share/guile/site/"
989 effective-version))
990 (source (assoc-ref %build-inputs "source"))
991 (doc (string-append out "/share/doc"))
992 (guild (string-append (assoc-ref %build-inputs "guile")
993 "/bin/guild"))
994 (gdbm.scm-dest
995 (string-append module-dir "/gdbm.scm"))
996 (gdbm.go-dest
997 (string-append module-dir "/gdbm.go"))
998 (compile-file
999 (lambda (in-file out-file)
1000 (system* guild "compile" "-o" out-file in-file))))
1001 ;; Make installation directories.
1002 (mkdir-p module-dir)
1003 (mkdir-p doc)
1004
1005 ;; Switch directory for compiling and installing
1006 (chdir source)
1007
1008 ;; copy the source
1009 (copy-file "gdbm.scm" gdbm.scm-dest)
1010
1011 ;; Patch the FFI
1012 (substitute* gdbm.scm-dest
1013 (("\\(dynamic-link \"libgdbm\"\\)")
1014 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1015 (assoc-ref %build-inputs "gdbm"))))
1016
1017 ;; compile to the destination
1018 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1019 (inputs
1020 `(("guile" ,guile-2.0)))
1021 (propagated-inputs
1022 `(("gdbm" ,gdbm)))
1023 (home-page "https://github.com/ijp/guile-gdbm")
1024 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1025 (description
1026 "Guile bindings to the GDBM key-value storage system, using
1027 Guile's foreign function interface.")
1028 (license license:gpl3+)))
1029
1030 (define-public guile2.2-gdbm-ffi
1031 (package-for-guile-2.2 guile-gdbm-ffi))
1032
1033 (define-public guile-sqlite3
1034 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
1035 (package
1036 (name "guile-sqlite3")
1037 (version (string-append "0.0-1." (string-take commit 7)))
1038
1039 ;; XXX: This used to be available read-only at
1040 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1041 ;; eventually disappeared, so we have our own copy here.
1042 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1043 (source (origin
1044 (method git-fetch)
1045 (uri (git-reference
1046 (url home-page)
1047 (commit commit)))
1048 (sha256
1049 (base32
1050 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
1051 (file-name (string-append name "-" version "-checkout"))
1052 (modules '((guix build utils)))
1053 (snippet
1054 ;; Upgrade 'Makefile.am' to the current way of doing things.
1055 '(substitute* "Makefile.am"
1056 (("TESTS_ENVIRONMENT")
1057 "TEST_LOG_COMPILER")))))
1058
1059 (build-system gnu-build-system)
1060 (native-inputs
1061 `(("autoconf" ,autoconf)
1062 ("automake" ,automake)
1063 ("pkg-config" ,pkg-config)))
1064 (inputs
1065 `(("guile" ,guile-2.2)
1066 ("sqlite" ,sqlite)))
1067 (arguments
1068 '(#:phases (modify-phases %standard-phases
1069 (add-before 'configure 'autoreconf
1070 (lambda _
1071 (zero? (system* "autoreconf" "-vfi"))))
1072 (add-before 'build 'set-sqlite3-file-name
1073 (lambda* (#:key inputs #:allow-other-keys)
1074 (substitute* "sqlite3.scm"
1075 (("\"libsqlite3\"")
1076 (string-append "\"" (assoc-ref inputs "sqlite")
1077 "/lib/libsqlite3\"")))
1078 #t)))))
1079 (synopsis "Access SQLite databases from Guile")
1080 (description
1081 "This package provides Guile bindings to the SQLite database system.")
1082 (license license:gpl3+))))
1083
1084 (define-public haunt
1085 (package
1086 (name "haunt")
1087 (version "0.2.1")
1088 (source (origin
1089 (method url-fetch)
1090 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1091 version ".tar.gz"))
1092 (sha256
1093 (base32
1094 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1095 (build-system gnu-build-system)
1096 (arguments
1097 `(#:modules ((ice-9 match) (ice-9 ftw)
1098 ,@%gnu-build-system-modules)
1099 #:tests? #f ; test suite is non-deterministic :(
1100 #:phases (modify-phases %standard-phases
1101 (add-after 'install 'wrap-haunt
1102 (lambda* (#:key outputs #:allow-other-keys)
1103 ;; Wrap the 'haunt' command to refer to the right
1104 ;; modules.
1105 (let* ((out (assoc-ref outputs "out"))
1106 (bin (string-append out "/bin"))
1107 (site (string-append
1108 out "/share/guile/site")))
1109 (match (scandir site)
1110 (("." ".." version)
1111 (let ((modules (string-append site "/" version)))
1112 (wrap-program (string-append bin "/haunt")
1113 `("GUILE_LOAD_PATH" ":" prefix
1114 (,modules))
1115 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1116 (,modules)))
1117 #t)))))))))
1118 (native-inputs
1119 `(("pkg-config" ,pkg-config)
1120 ("texinfo" ,texinfo)))
1121 (inputs
1122 `(("guile" ,guile-2.2)))
1123 (propagated-inputs
1124 `(("guile-reader" ,guile-reader)
1125 ("guile-commonmark" ,guile-commonmark)))
1126 (synopsis "Functional static site generator")
1127 (description "Haunt is a static site generator written in Guile
1128 Scheme. Haunt features a functional build system and an extensible
1129 interface for reading articles in any format.")
1130 (home-page "http://haunt.dthompson.us")
1131 (license license:gpl3+)))
1132
1133 (define-public guile2.0-haunt
1134 (package-for-guile-2.0
1135 (package (inherit haunt) (name "guile2.0-haunt"))))
1136 (define-public guile2.2-haunt
1137 (deprecated-package "guile2.2-haunt" haunt))
1138
1139 (define-public guile-config
1140 (package
1141 (name "guile-config")
1142 (version "0.1.1")
1143 (source (origin
1144 (method url-fetch)
1145 (uri (string-append
1146 "http://alex.pompo.co/software/" name "-" version
1147 ".tar.gz"))
1148 (sha256
1149 (base32
1150 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1151 (build-system gnu-build-system)
1152 (inputs
1153 `(("guile" ,guile-2.0)))
1154 (synopsis "Guile application configuration parsing library")
1155 (description
1156 "Guile Config is a library providing a declarative approach to
1157 application configuration specification. The library provides clean
1158 configuration declaration forms, and processors that take care of:
1159 configuration file creation; configuration file parsing; command-line
1160 parameter parsing using getopt-long; basic GNU command-line parameter
1161 generation (--help, --usage, --version); automatic output generation for the
1162 above command-line parameters.")
1163 (home-page "https://github.com/a-sassmannshausen/guile-config")
1164 (license license:agpl3+)))
1165
1166 (define-public guile-redis
1167 (package
1168 (name "guile-redis")
1169 (version "0.1.0")
1170 (source (origin
1171 (method url-fetch)
1172 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1173 version ".tar.gz"))
1174 (sha256
1175 (base32
1176 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1177 (modules '((guix build utils)))
1178 (snippet
1179 ;; Make sure everything goes under .../site/X.Y, like Guile's
1180 ;; search paths expects.
1181 '(begin
1182 (substitute* "configure"
1183 (("ac_subst_vars='")
1184 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1185 (substitute* '("Makefile.in"
1186 "redis/Makefile.in"
1187 "redis/commands/Makefile.in")
1188 (("moddir =.*/share/guile/site" all)
1189 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1190 (build-system gnu-build-system)
1191 (native-inputs
1192 `(("guile" ,guile-2.0)))
1193 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1194 (synopsis "Redis client library for Guile")
1195 (description "Guile-redis provides a Scheme interface to the Redis
1196 key-value cache and store.")
1197 (license license:lgpl3+)))
1198
1199 (define-public guile2.2-redis
1200 (package-for-guile-2.2 guile-redis))
1201
1202 (define-public guile-wisp
1203 (package
1204 (name "guile-wisp")
1205 (version "0.9.0")
1206 (source (origin
1207 (method url-fetch)
1208 (uri (string-append "https://bitbucket.org/ArneBab/"
1209 "wisp/downloads/wisp-"
1210 version ".tar.gz"))
1211 (sha256
1212 (base32
1213 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1214 (build-system gnu-build-system)
1215 (arguments
1216 `(#:modules ((system base compile)
1217 ,@%gnu-build-system-modules)
1218 #:phases
1219 (modify-phases %standard-phases
1220 (add-before
1221 'configure 'substitute-before-config
1222
1223 (lambda* (#:key inputs #:allow-other-keys)
1224 (let ((bash (assoc-ref inputs "bash")))
1225 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1226 (substitute* "configure"
1227 (("guile-2.0") "guile"))
1228 ;; Puts together some test files with /bin/bash hardcoded
1229 (substitute* "Makefile.in"
1230 (("/bin/bash")
1231 (string-append bash "/bin/bash") ))
1232 #t)))
1233
1234 ;; auto compilation breaks, but if we set HOME to /tmp,
1235 ;; that works ok
1236 (add-before
1237 'check 'auto-compile-hacky-workaround
1238 (lambda _
1239 (setenv "HOME" "/tmp")
1240 #t))
1241 (replace
1242 'install
1243 (lambda* (#:key outputs inputs #:allow-other-keys)
1244 (let* ((out (assoc-ref outputs "out"))
1245 (module-dir (string-append out "/share/guile/site/2.0"))
1246 (language-dir
1247 (string-append module-dir "/language/wisp"))
1248 (guild (string-append (assoc-ref inputs "guile")
1249 "/bin/guild")))
1250 ;; Make installation directories.
1251 (mkdir-p module-dir)
1252 (mkdir-p language-dir)
1253
1254 ;; copy the source
1255 (copy-file "wisp-scheme.scm"
1256 (string-append module-dir "/wisp-scheme.scm"))
1257 (copy-file "language/wisp/spec.scm"
1258 (string-append language-dir "/spec.scm"))
1259
1260 ;; compile to the destination
1261 (compile-file "wisp-scheme.scm"
1262 #:output-file (string-append
1263 module-dir "/wisp-scheme.go"))
1264 (compile-file "language/wisp/spec.scm"
1265 #:output-file (string-append
1266 language-dir "/spec.go"))
1267 #t))))))
1268 (home-page "http://draketo.de/english/wisp")
1269 (inputs
1270 `(("guile" ,guile-2.0)
1271 ("python" ,python)))
1272 (synopsis "Whitespace to lisp syntax for Guile")
1273 (description "Wisp is a syntax for Guile which provides a Python-like
1274 whitespace-significant language. It may be easier on the eyes for some
1275 users and in some situations.")
1276 (license license:gpl3+)))
1277
1278 (define-public guile-sly
1279 (package
1280 (name "guile-sly")
1281 (version "0.1")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append "https://files.dthompson.us/sly/sly-"
1285 version ".tar.gz"))
1286 (sha256
1287 (base32
1288 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1289 (build-system gnu-build-system)
1290 (arguments
1291 '(#:configure-flags
1292 (list (string-append "--with-libfreeimage-prefix="
1293 (assoc-ref %build-inputs "freeimage"))
1294 (string-append "--with-libgslcblas-prefix="
1295 (assoc-ref %build-inputs "gsl")))))
1296 (native-inputs
1297 `(("pkg-config" ,pkg-config)))
1298 (propagated-inputs
1299 `(("guile" ,guile-2.0)
1300 ("guile-sdl" ,guile-sdl)
1301 ("guile-opengl" ,guile-opengl)))
1302 (inputs
1303 `(("gsl" ,gsl)
1304 ("freeimage" ,freeimage)
1305 ("mesa" ,mesa)))
1306 (synopsis "2D/3D game engine for GNU Guile")
1307 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1308 features a functional reactive programming interface and live coding
1309 capabilities.")
1310 (home-page "http://dthompson.us/pages/software/sly.html")
1311 (license license:gpl3+)))
1312
1313 (define-public g-wrap
1314 (package
1315 (name "g-wrap")
1316 (version "1.9.15")
1317 (source (origin
1318 (method url-fetch)
1319 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1320 version ".tar.gz"))
1321 (sha256
1322 (base32
1323 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1324 (build-system gnu-build-system)
1325 (native-inputs
1326 `(("pkg-config" ,pkg-config)))
1327 (propagated-inputs
1328 `(("guile" ,guile-2.0)
1329 ("guile-lib" ,guile-lib)))
1330 (inputs
1331 `(("libffi" ,libffi)))
1332 (arguments
1333 `(#:phases
1334 (modify-phases %standard-phases
1335 (add-before 'configure 'pre-configure
1336 (lambda* (#:key outputs #:allow-other-keys)
1337 (let ((out (assoc-ref outputs "out")))
1338 (substitute* (find-files "." "^Makefile.in$")
1339 (("guilemoduledir =.*guile/site" all)
1340 (string-append all "/2.0")))
1341 #t))))))
1342 (synopsis "Generate C bindings for Guile")
1343 (description "G-Wrap is a tool and Guile library for generating function
1344 wrappers for inter-language calls. It currently only supports generating Guile
1345 wrappers for C functions. Given a definition of the types and prototypes for
1346 a given C interface, G-Wrap will automatically generate the C code that
1347 provides access to that interface and its types from the Scheme level.")
1348 (home-page "http://www.nongnu.org/g-wrap/index.html")
1349 (license license:lgpl2.1+)))
1350
1351 (define-public guile-dbi
1352 (package
1353 (name "guile-dbi")
1354 (version "2.1.6")
1355 (source (origin
1356 (method url-fetch)
1357 (uri (string-append
1358 "http://download.gna.org/guile-dbi/guile-dbi-"
1359 version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1363 (build-system gnu-build-system)
1364 (arguments
1365 '(#:configure-flags
1366 (list (string-append
1367 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1368 #:phases
1369 (modify-phases %standard-phases
1370 (add-after 'install 'patch-extension-path
1371 (lambda* (#:key outputs #:allow-other-keys)
1372 (let* ((out (assoc-ref outputs "out"))
1373 (dbi.scm (string-append
1374 out "/share/guile/site/2.0/dbi/dbi.scm"))
1375 (ext (string-append out "/lib/libguile-dbi")))
1376 (substitute* dbi.scm (("libguile-dbi") ext))
1377 #t))))))
1378 (propagated-inputs
1379 `(("guile" ,guile-2.0)))
1380 (synopsis "Guile database abstraction layer")
1381 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1382 (description
1383 "guile-dbi is a library for Guile that provides a convenient interface to
1384 SQL databases. Database programming with guile-dbi is generic in that the same
1385 programming interface is presented regardless of which database system is used.
1386 It currently supports MySQL, Postgres and SQLite3.")
1387 (license license:gpl2+)))
1388
1389 (define-public guile-dbd-sqlite3
1390 (package
1391 (name "guile-dbd-sqlite3")
1392 (version "2.1.6")
1393 (source (origin
1394 (method url-fetch)
1395 (uri (string-append
1396 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1397 version ".tar.gz"))
1398 (sha256
1399 (base32
1400 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1401 (build-system gnu-build-system)
1402 (native-inputs
1403 `(("pkg-config" ,pkg-config)))
1404 (inputs
1405 `(("sqlite" ,sqlite)
1406 ("zlib" ,(@ (gnu packages compression) zlib))))
1407 (propagated-inputs
1408 `(("guile-dbi" ,guile-dbi)))
1409 (synopsis "Guile DBI driver for SQLite")
1410 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1411 (description
1412 "guile-dbi is a library for Guile that provides a convenient interface to
1413 SQL databases. This package implements the interface for SQLite.")
1414 (license license:gpl2+)))
1415
1416 (define-public guile-xosd
1417 (package
1418 (name "guile-xosd")
1419 (version "0.2.1")
1420 (source (origin
1421 (method url-fetch)
1422 (uri (string-append "https://github.com/alezost/" name
1423 "/releases/download/v" version
1424 "/" name "-" version ".tar.gz"))
1425 (sha256
1426 (base32
1427 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1428 (build-system gnu-build-system)
1429 (native-inputs
1430 `(("pkg-config" ,pkg-config)))
1431 (inputs
1432 `(("guile" ,guile-2.2)
1433 ("libx11" ,libx11)
1434 ("libxext" ,libxext)
1435 ("libxinerama" ,libxinerama)
1436 ("xosd" ,xosd)))
1437 (home-page "https://github.com/alezost/guile-xosd")
1438 (synopsis "XOSD bindings for Guile")
1439 (description
1440 "Guile-XOSD provides Guile bindings for @code{libxosd},
1441 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1442 library}.")
1443 (license license:gpl3+)))
1444
1445 (define-public guile-daemon
1446 (package
1447 (name "guile-daemon")
1448 (version "0.1.2")
1449 (source (origin
1450 (method url-fetch)
1451 (uri (string-append "https://github.com/alezost/" name
1452 "/releases/download/v" version
1453 "/" name "-" version ".tar.gz"))
1454 (sha256
1455 (base32
1456 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1457 (build-system gnu-build-system)
1458 (native-inputs
1459 `(("pkg-config" ,pkg-config)))
1460 (inputs
1461 `(("guile" ,guile-2.2)))
1462 (home-page "https://github.com/alezost/guile-daemon")
1463 (synopsis "Evaluate code in a running Guile process")
1464 (description
1465 "Guile-Daemon is a small Guile program that loads your initial
1466 configuration file, and then reads and evaluates Guile expressions that
1467 you send to a FIFO file.")
1468 (license license:gpl3+)))
1469
1470 (define-public guile-commonmark
1471 (package
1472 (name "guile-commonmark")
1473 (version "0.1")
1474 (source (origin
1475 (method url-fetch)
1476 (uri (string-append "https://github.com/OrangeShark/" name
1477 "/releases/download/v" version
1478 "/" name "-" version ".tar.gz"))
1479 (sha256
1480 (base32
1481 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1482 (modules '((guix build utils)))
1483 (snippet
1484 ;; Use the real effective version of Guile in directory names
1485 ;; instead of a hard-coded "/2.0".
1486 '(begin
1487 (substitute* "configure"
1488 (("ac_subst_vars='")
1489 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1490 (substitute* "Makefile.in"
1491 (("/site/2.0")
1492 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1493 (build-system gnu-build-system)
1494 (inputs
1495 `(("guile" ,guile-2.2)))
1496 (synopsis "CommonMark parser for Guile")
1497 (description
1498 "guile-commonmark is a library for parsing CommonMark, a fully specified
1499 variant of Markdown. The library is written in Guile Scheme and is designed
1500 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1501 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1502 is no support for parsing block and inline level HTML.")
1503 (home-page "https://github.com/OrangeShark/guile-commonmark")
1504 (license license:lgpl3+)))
1505
1506 (define-public guile2.0-commonmark
1507 (package-for-guile-2.0 guile-commonmark))
1508 (define-public guile2.2-commonmark
1509 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1510
1511 (define-public guile-bytestructures
1512 (package
1513 (name "guile-bytestructures")
1514 (version "20170402.91d042e")
1515 (source (origin
1516 (method git-fetch)
1517 (uri (git-reference
1518 (url "https://github.com/TaylanUB/scheme-bytestructures")
1519 (commit "91d042e3427e1d7740b604b6296c616cf2eec13d")))
1520 (file-name (string-append name "-" version "-checkout"))
1521 (sha256
1522 (base32
1523 "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb"))))
1524 (build-system trivial-build-system)
1525 (arguments
1526 `(#:modules ((guix build utils))
1527 #:builder
1528 (begin
1529 (use-modules (guix build utils)
1530 (ice-9 match)
1531 (ice-9 popen)
1532 (ice-9 rdelim))
1533 (let* ((out (assoc-ref %outputs "out"))
1534 (guile (assoc-ref %build-inputs "guile"))
1535 (effective (read-line
1536 (open-pipe* OPEN_READ
1537 (string-append guile "/bin/guile")
1538 "-c" "(display (effective-version))")))
1539 (module-dir (string-append out "/share/guile/site/"
1540 effective))
1541 (source (assoc-ref %build-inputs "source"))
1542 (doc (string-append out "/share/doc/scheme-bytestructures"))
1543 (sld-files (with-directory-excursion source
1544 (find-files "bytestructures/r7" "\\.exports.sld$")))
1545 (scm-files (filter (lambda (path)
1546 (not (string-prefix? "bytestructures/r7" path)))
1547 (with-directory-excursion source
1548 (find-files "bytestructures" "\\.scm$"))))
1549 (guild (string-append (assoc-ref %build-inputs "guile")
1550 "/bin/guild")))
1551 ;; Make installation directories.
1552 (mkdir-p doc)
1553
1554 ;; Compile .scm files and install.
1555 (chdir source)
1556 (setenv "GUILE_AUTO_COMPILE" "0")
1557 (for-each (lambda (file)
1558 (let* ((dest-file (string-append module-dir "/"
1559 file))
1560 (go-file (string-append module-dir "/"
1561 (substring file 0
1562 (string-rindex file #\.))
1563 ".go")))
1564 ;; Install source module.
1565 (mkdir-p (dirname dest-file))
1566 (copy-file file dest-file)
1567
1568 ;; Install compiled module.
1569 (mkdir-p (dirname go-file))
1570 (unless (zero? (system* guild "compile"
1571 "-L" source
1572 "-o" go-file
1573 file))
1574 (error (format #f "Failed to compile ~s to ~s!"
1575 file go-file)))))
1576 (append sld-files scm-files))
1577
1578 ;; Also copy over the README.
1579 (install-file "README.md" doc)
1580 #t))))
1581 (inputs
1582 `(("guile" ,guile-2.2)))
1583 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1584 (synopsis "Structured access to bytevector contents for Guile")
1585 (description
1586 "Guile bytestructures offers a system imitating the type system
1587 of the C programming language, to be used on bytevectors. C's type
1588 system works on raw memory, and Guile works on bytevectors which are
1589 an abstraction over raw memory. It's also more powerful than the C
1590 type system, elevating types to first-class status.")
1591 (license license:gpl3+)))
1592
1593 (define-public guile-aspell
1594 (package
1595 (name "guile-aspell")
1596 (version "0.4")
1597 (source (origin
1598 (method url-fetch)
1599 (uri (string-append
1600 "http://lonelycactus.com/tarball/guile_aspell-"
1601 version ".tar.gz"))
1602 (sha256
1603 (base32
1604 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1605 (build-system gnu-build-system)
1606 (arguments
1607 '(#:phases (modify-phases %standard-phases
1608 (add-before 'configure 'set-guilesitedir
1609 (lambda _
1610 (substitute* "Makefile.in"
1611 (("^guilesitedir =.*$")
1612 "guilesitedir = \
1613 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1614 #t))
1615 (add-before 'build 'set-libaspell-file-name
1616 (lambda* (#:key inputs #:allow-other-keys)
1617 (let ((aspell (assoc-ref inputs "aspell")))
1618 (substitute* "aspell.scm"
1619 (("\"libaspell\\.so\"")
1620 (string-append "\"" aspell
1621 "/lib/libaspell\"")))
1622 #t))))))
1623 (native-inputs `(("pkg-config" ,pkg-config)))
1624 (inputs `(("guile" ,guile-2.2)
1625 ("aspell" ,aspell)))
1626 (home-page "https://github.com/spk121/guile-aspell")
1627 (synopsis "Spell-checking from Guile")
1628 (description
1629 "guile-aspell is a Guile Scheme library for comparing a string against a
1630 dictionary and suggesting spelling corrections.")
1631 (license license:gpl3+)))
1632
1633 (define-public guile-bash
1634 ;; This project is currently retired. It was initially announced here:
1635 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1636 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1637 (revision "0"))
1638 (package
1639 (name "guile-bash")
1640 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1641 (home-page
1642 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1643 (source (origin
1644 (method git-fetch)
1645 (uri (git-reference
1646 (commit commit)
1647 (url home-page)))
1648 (sha256
1649 (base32
1650 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1651 (file-name (string-append name "-" version "-checkout"))))
1652 (build-system gnu-build-system)
1653 (arguments
1654 '(#:phases (modify-phases %standard-phases
1655 (add-after 'unpack 'bootstrap
1656 (lambda _
1657 (zero? (system* "sh" "bootstrap")))))
1658
1659 #:configure-flags
1660 ;; Add -I to match 'bash.pc' of Bash 4.4.
1661 (list (string-append "CPPFLAGS=-I"
1662 (assoc-ref %build-inputs "bash:include")
1663 "/include/bash/include")
1664
1665 ;; The '.a' file is useless.
1666 "--disable-static"
1667
1668 ;; Install 'lib/bash' as Bash 4.4 expects.
1669 (string-append "--libdir=" (assoc-ref %outputs "out")
1670 "/lib/bash"))))
1671 (native-inputs `(("pkg-config" ,pkg-config)
1672 ("autoconf" ,(autoconf-wrapper))
1673 ("automake" ,automake)
1674 ("libtool" ,libtool)
1675 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1676 ("gettext" ,gettext-minimal)))
1677 (inputs `(("guile" ,guile-2.0)
1678 ("bash:include" ,bash "include")))
1679 (synopsis "Extend Bash using Guile")
1680 (description
1681 "Guile-Bash provides a shared library and set of Guile modules,
1682 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1683 the following aspects of Bash:
1684
1685 @itemize
1686 @item aliases;
1687 @item setting and getting Bash variables;
1688 @item creating dynamic variables;
1689 @item creating Bash functions with a Scheme implementation;
1690 @item reader macro for output capturing;
1691 @item reader macro for evaluating raw Bash commands.
1692 @end itemize
1693
1694 To enable it, run:
1695
1696 @example
1697 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1698 @end example
1699
1700 and then run @command{scm example.scm}.")
1701 (license license:gpl3+))))
1702
1703 (define-public guile-8sync
1704 (package
1705 (name "guile-8sync")
1706 (version "0.4.2")
1707 (source (origin
1708 (method url-fetch)
1709 (uri (string-append "mirror://gnu/8sync/8sync-" version
1710 ".tar.gz"))
1711 (sha256
1712 (base32
1713 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1714 (build-system gnu-build-system)
1715 (native-inputs `(("autoconf" ,autoconf)
1716 ("automake" ,automake)
1717 ("guile" ,guile-2.2)
1718 ("pkg-config" ,pkg-config)
1719 ("texinfo" ,texinfo)))
1720 (arguments
1721 `(#:phases (modify-phases %standard-phases
1722 (add-before 'configure 'setenv
1723 (lambda _
1724 ;; quiet warnings
1725 (setenv "GUILE_AUTO_COMPILE" "0")
1726 #t)))))
1727 (home-page "https://gnu.org/s/8sync/")
1728 (synopsis "Asynchronous actor model library for Guile")
1729 (description
1730 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1731 library for GNU Guile based on the actor model.
1732
1733 Note that 8sync is only available for Guile 2.2.")
1734 (license license:lgpl3+)))
1735
1736 (define-public guile-fibers
1737 (package
1738 (name "guile-fibers")
1739 (version "1.0.0")
1740 (source (origin
1741 (method url-fetch)
1742 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1743 version ".tar.gz"))
1744 (sha256
1745 (base32
1746 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1747 (build-system gnu-build-system)
1748 (native-inputs
1749 `(("texinfo" ,texinfo)
1750 ("pkg-config" ,pkg-config)))
1751 (inputs
1752 `(("guile" ,guile-2.2)))
1753 (synopsis "Lightweight concurrency facility for Guile")
1754 (description
1755 "Fibers is a Guile library that implements a a lightweight concurrency
1756 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1757 like a \"goroutine\" from the Go language: a lightweight thread-like
1758 abstraction. Systems built with Fibers can scale up to millions of concurrent
1759 fibers, tens of thousands of concurrent socket connections, and many parallel
1760 cores. The Fibers library also provides Concurrent ML-like channels for
1761 communication between fibers.
1762
1763 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1764 is not available for Guile 2.0.")
1765 (home-page "https://github.com/wingo/fibers")
1766 (license license:lgpl3+)))
1767
1768 (define-public guile-git
1769 (let ((revision "2")
1770 (commit "06f9fc3d9ac95798d4a51e6310f7b594ce5597e0"))
1771 (package
1772 (name "guile-git")
1773 (version (string-append "0.0-" revision "." (string-take commit 7)))
1774 (home-page "https://gitlab.com/amirouche/guile-git")
1775 (source (origin
1776 (method git-fetch)
1777 (uri (git-reference (url home-page) (commit commit)))
1778 (sha256
1779 (base32
1780 "0rcq0f8dhl89ia7336bq8y279q5ada0b1kabcqw9zl3125k3cp4v"))
1781 (file-name (git-file-name name version))))
1782 (build-system gnu-build-system)
1783 (arguments
1784 '(#:phases (modify-phases %standard-phases
1785 (add-after 'unpack 'bootstrap
1786 (lambda _
1787 (zero? (system* "autoreconf" "-vfi")))))))
1788 (native-inputs
1789 `(("autoconf" ,autoconf)
1790 ("automake" ,automake)
1791 ("pkg-config" ,pkg-config)))
1792 (inputs
1793 `(("guile" ,guile-2.2)
1794 ("libgit2" ,libgit2)))
1795 (propagated-inputs
1796 `(("guile-bytestructures" ,guile-bytestructures)))
1797 (synopsis "Guile bindings for libgit2")
1798 (description
1799 "This package provides Guile bindings to libgit2, a library to
1800 manipulate repositories of the Git version control system.")
1801 (license license:gpl3+))))
1802
1803 (define-public guile-syntax-highlight
1804 (let ((commit "a047675e66861b647426372aa2ba7820f749616d")
1805 (revision "0"))
1806 (package
1807 (name "guile-syntax-highlight")
1808 (version (string-append "0.0." revision "."
1809 (string-take commit 7)))
1810 (source (origin
1811 (method git-fetch)
1812 (uri (git-reference
1813 (url "git://dthompson.us/guile-syntax-highlight.git")
1814 (commit commit)))
1815 (sha256
1816 (base32
1817 "1zjr6sg3n7xbdsliy45i39dqanxvcms58ayx36wxrz72zpq58vq3"))))
1818 (build-system gnu-build-system)
1819 (arguments
1820 '(#:phases (modify-phases %standard-phases
1821 (add-after 'unpack 'bootstrap
1822 (lambda _
1823 (zero? (system* "sh" "bootstrap")))))))
1824 (native-inputs
1825 `(("autoconf" ,autoconf)
1826 ("automake" ,automake)
1827 ("pkg-config" ,pkg-config)))
1828 (inputs
1829 `(("guile" ,guile-2.2)))
1830 (synopsis "General-purpose syntax highlighter for GNU Guile")
1831 (description "Guile-syntax-highlight is a general-purpose syntax
1832 highlighting library for GNU Guile. It can parse code written in various
1833 programming languages into a simple s-expression that can be converted to
1834 HTML (via SXML) or any other format for rendering.")
1835 (home-page "http://dthompson.us/software/guile-syntax-highlight")
1836 (license license:lgpl3+))))
1837
1838 (define-public guile-sjson
1839 (package
1840 (name "guile-sjson")
1841 (version "0.2.1")
1842 (source (origin
1843 (method url-fetch)
1844 (uri (string-append "https://dustycloud.org/misc/sjson-" version
1845 ".tar.gz"))
1846 (sha256
1847 (base32
1848 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
1849 (build-system gnu-build-system)
1850 (arguments
1851 '(#:phases
1852 (modify-phases %standard-phases
1853 (add-after 'unpack 'bootstrap
1854 (lambda _ (zero? (system* "sh" "bootstrap.sh")))))))
1855 (native-inputs
1856 `(("autoconf" ,autoconf)
1857 ("automake" ,automake)
1858 ("pkg-config" ,pkg-config)))
1859 (inputs
1860 `(("guile" ,guile-2.2)))
1861 (home-page "https://gitlab.com/dustyweb/guile-sjson")
1862 (synopsis "S-expression based json reader/writer for Guile")
1863 (description "guile-sjson is a json reader/writer for Guile.
1864 It has a nice, simple s-expression based syntax.")
1865 (license license:lgpl3+)))
1866
1867 ;;; guile.scm ends here