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