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