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