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