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