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>
18 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
77 ;;; GNU Guile, and modules and extensions.
81 (define-public guile-1.8
87 (uri (string-append "mirror://gnu/guile/guile-" version
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")
96 ;; Insert a phase before `configure' to patch things up.
97 #:phases (alist-cons-before
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)
107 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
109 (assoc-ref outputs "out"))))
111 ;; The usual /bin/sh...
112 (substitute* "ice-9/popen.scm"
113 (("/bin/sh") (which "sh"))))
115 (inputs `(("gawk" ,gawk)
116 ("readline" ,readline)))
118 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
120 (propagated-inputs `(("gmp" ,gmp)
121 ("libltdl" ,libltdl)))
123 ;; When cross-compiling, a native version of Guile itself is needed.
124 (self-native-input? #t)
127 (list (search-path-specification
128 (variable "GUILE_LOAD_PATH")
129 (files '("share/guile/site")))))
131 (synopsis "Scheme implementation intended especially for extensions")
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+)))
141 (define-public guile-2.0
147 (uri (string-append "mirror://gnu/guile/guile-" version
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)
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)))))
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)
169 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
170 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
173 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
174 ;; must be propagated.
178 (self-native-input? #t)
180 (outputs '("out" "debug"))
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.
194 ,@(if (target-mingw?)
196 (string-append bash "/bin/bash")
198 '((string-append bash "/bin/bash")))))))
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")))))
210 (synopsis "Scheme implementation intended especially for extensions")
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+)))
220 (define-public guile-2.2
221 (package (inherit guile-2.0)
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
233 "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w"))
234 (modules '((guix build utils)))
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)
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")))))))
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.
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)
264 (define-public guile-next
265 (deprecated-package "guile-next" guile-2.2))
267 (define (guile-variant-package-name prefix)
269 "Return NAME with PREFIX instead of \"guile-\", when applicable."
270 (if (string-prefix? "guile-" name)
271 (string-append prefix "-"
273 (string-length "guile-")))
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")))
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")))
287 (define-public guile-for-guile-emacs
288 (package (inherit guile-2.2)
289 (name "guile-for-guile-emacs")
290 (version "20150510.d8d9a8d")
294 (url "git://git.hcoop.net/git/bpt/guile.git")
295 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
296 (file-name (string-append name "-" version "-checkout"))
299 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
301 (substitute-keyword-arguments `(;; Tests aren't passing for now.
302 ;; Obviously we should re-enable this!
304 ,@(package-arguments guile-2.2))
306 `(modify-phases ,phases
307 (add-after 'unpack 'autogen
309 (zero? (system* "sh" "autogen.sh"))))
310 (add-before 'autogen 'patch-/bin/sh
312 (substitute* "build-aux/git-version-gen"
313 (("#!/bin/sh") (string-append "#!" (which "sh"))))
316 `(("autoconf" ,autoconf)
317 ("automake" ,automake)
321 ("gettext" ,gettext-minimal)
322 ,@(package-native-inputs guile-2.2)))
323 ;; Same as in guile-2.0
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")))))))
333 ;; There has not been any release yet.
334 (define-public guildhall
335 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
339 (version (string-append "0-" revision "." (string-take commit 9)))
343 (url "https://github.com/ijp/guildhall.git")
345 (file-name (string-append name "-" version "-checkout"))
348 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
349 (build-system gnu-build-system)
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
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") ""))
368 (add-after 'fix-bug-22 'autogen
370 (zero? (system* "sh" "autogen.sh")))))))
372 `(("guile" ,guile-2.0)))
374 `(("zip" ,zip) ; for tests
375 ("autoconf" ,autoconf)
376 ("automake" ,automake)
377 ("texinfo" ,texinfo)))
378 (synopsis "Package manager for Guile")
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
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+))))
398 (define-public artanis
399 (let ((release "0.2.1")
403 (version (if (zero? revision)
405 (string-append release "-"
406 (number->string revision))))
409 (uri (string-append "mirror://gnu/artanis/artanis-"
411 (file-name (string-append name "-" version ".tar.gz"))
414 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
415 (modules '((guix build utils)))
418 (delete-file-recursively "artanis/third-party/json.scm")
419 (delete-file-recursively "artanis/third-party/json")
420 (substitute* '("artanis/artanis.scm"
422 (("(#:use-module \\()artanis third-party (json\\))" _
424 (string-append use-module json)))
425 (substitute* "artanis/oht.scm"
426 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
427 _ pre json-string post)
431 (substitute* "artanis/artanis.scm"
432 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
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
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)))
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
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)))
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
481 (home-page "https://www.gnu.org/software/artanis/")
482 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
484 (define-public guile-reader
486 (name "guile-reader")
490 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
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")
501 "Guile-Reader is a simple framework for building readers for GNU Guile.
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
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+)))
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))
520 (define-public guile-ncurses
522 (name "guile-ncurses")
526 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
530 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
531 (build-system gnu-build-system)
532 (inputs `(("ncurses" ,ncurses)
533 ("guile" ,guile-2.2)))
534 (native-inputs `(("pkg-config" ,pkg-config)))
536 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
537 "--with-gnu-filesystem-hierarchy")
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"
545 (parallel-job-count))))
546 (let* ((out (assoc-ref outputs "out"))
548 (files (find-files dir ".scm")))
550 (("\"libguile-ncurses\"")
551 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
554 (home-page "https://www.gnu.org/software/guile-ncurses/")
555 (synopsis "Guile bindings to ncurses")
557 "guile-ncurses provides Guile language bindings for the ncurses
559 (license license:lgpl3+)))
561 (define-public guile-ncurses/gpm
563 (inherit guile-ncurses)
564 (name "guile-ncurses-with-gpm")
565 (inputs `(("ncurses" ,ncurses/gpm)
566 ("guile" ,guile-2.2)))))
574 (uri (string-append "mirror://gnu/mcron/mcron-"
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")
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+)))
592 (define-public mcron2
593 ;; This is mthl's mcron development branch, not yet merged in mcron.
594 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
598 (version (string-append (package-version mcron) "-0."
599 (string-take commit 7)))
603 (url "https://notabug.org/mthl/mcron/")
607 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
608 (file-name (string-append name "-" version "-checkout"))))
610 `(("autoconf" ,autoconf)
611 ("automake" ,automake)
612 ("pkg-config" ,pkg-config)
614 ("help2man" ,help2man)))
616 `(#:modules ((ice-9 match) (ice-9 ftw)
617 ,@%gnu-build-system-modules)
619 #:phases (modify-phases %standard-phases
620 (add-after 'unpack 'bootstrap
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
627 (let* ((out (assoc-ref outputs "out"))
628 (bin (string-append out "/bin"))
630 out "/share/guile/site")))
631 (match (scandir site)
633 (let ((modules (string-append site "/" version)))
634 (wrap-program (string-append bin "/mcron")
635 `("GUILE_LOAD_PATH" ":" prefix
637 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
641 (define-public guile-ics
648 (url "https://github.com/artyom-poptsov/guile-ics")
650 (file-name (string-append name "-" version "-checkout"))
653 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
654 (build-system gnu-build-system)
656 '(#:phases (modify-phases %standard-phases
657 (add-after 'unpack 'autoreconf
659 ;; Repository comes with a broken symlink
660 (delete-file "README")
661 (symlink "README.org" "README")
662 (zero? (system* "autoreconf" "-fi")))))))
664 `(("autoconf" ,(autoconf-wrapper))
665 ("automake" ,automake)
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")
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.
678 The library is shipped with documentation in Info format and usage examples.")
679 (license license:gpl3+)))
681 (define-public guile-lib
687 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
691 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
692 (build-system gnu-build-system)
695 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
697 (modify-phases %standard-phases
698 (add-before 'configure 'patch-module-dir
700 (substitute* "src/Makefile.in"
701 (("^moddir = ([[:graph:]]+)")
702 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
703 (("^godir = ([[:graph:]]+)")
705 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
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")
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
717 ;; The whole is under GPLv3+, but some modules are under laxer
718 ;; distribution terms such as LGPL and public domain. See `COPYING' for
720 (license license:gpl3+)))
722 (define-public guile2.0-lib
723 (package-for-guile-2.0 guile-lib))
725 (define-public guile2.2-lib
726 (deprecated-package "guile2.2-lib" guile-lib))
728 (define-public guile-json
734 (uri (string-append "mirror://savannah/guile-json/guile-json-"
738 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
739 (modules '((guix build utils)))
741 ;; Make sure everything goes under .../site/X.Y, like Guile's
742 ;; search paths expects.
744 (substitute* "configure"
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")
755 "Guile-JSON supports parsing and building JSON documents according to the
756 specification. These are the main features:
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.
764 (license license:lgpl3+)))
766 (define-public guile2.2-json
767 (deprecated-package "guile2.2-json" guile-json))
769 (define-public guile2.0-json
770 (package-for-guile-2.0 guile-json))
772 (define-public guile-minikanren
774 (name "guile-minikanren")
775 (version "20150424.e844d85")
779 (url "https://github.com/ijp/minikanren.git")
780 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
781 (file-name (string-append name "-" version "-checkout"))
784 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
785 (build-system trivial-build-system)
787 `(#:modules ((guix build utils))
790 (use-modules (guix build utils)
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/"
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")
811 ;; Make installation directories.
812 (mkdir-p (string-append module-dir "/minikanren"))
815 ;; Compile .scm files and install.
817 (setenv "GUILE_AUTO_COMPILE" "0")
818 (for-each (lambda (file)
819 (let* ((dest-file (string-append module-dir "/"
821 (go-file (match (string-split file #\.)
823 (string-append module-dir "/"
825 ;; Install source module.
826 (copy-file file dest-file)
827 ;; Install compiled module.
828 (unless (zero? (system* guild "compile"
832 (error (format #f "Failed to compile ~s to ~s!"
836 ;; Also copy over the README.
837 (install-file "README.org" doc)
840 `(("guile" ,guile-2.0)))
841 (home-page "https://github.com/ijp/minikanren")
842 (synopsis "MiniKanren declarative logic system, packaged for Guile")
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.
849 This is Ian Price's r6rs packaged version of miniKanren, which deviates
850 slightly from miniKanren mainline.
852 See http://minikanren.org/ for more on miniKanren generally.")
853 (license license:expat)))
855 (define-public guile2.2-minikanren
856 (package-for-guile-2.2 guile-minikanren))
858 (define-public guile-miniadapton
859 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
862 (name "guile-miniadapton")
863 (version (string-append "0-" revision "." (string-take commit 9)))
867 (url "https://github.com/fisherdj/miniAdapton.git")
869 (file-name (string-append name "-" version "-checkout"))
872 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
873 (build-system gnu-build-system)
875 `(#:modules ((guix build utils)
879 (guix build gnu-build-system))
880 #:tests? #f ; there is no test target
882 (modify-phases %standard-phases
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
892 "(display (effective-version))")))
893 (module-dir (string-append (assoc-ref outputs "out")
897 ;; Make installation directories.
900 (setenv "GUILE_AUTO_COMPILE" "0")
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))))
913 `(("guile" ,guile-2.2)))
914 (home-page "https://github.com/fisherdj/miniAdapton")
915 (synopsis "Minimal implementation of incremental computation in Guile
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))))
926 (define-public guile-irregex
928 (name "guile-irregex")
933 "http://synthcode.com/scheme/irregex/irregex-"
937 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
938 (build-system gnu-build-system)
940 `(#:modules ((guix build utils)
944 (guix build gnu-build-system))
946 (modify-phases %standard-phases
951 (lambda* (#:key inputs outputs #:allow-other-keys)
952 (let* ((out (assoc-ref outputs "out"))
953 (effective (read-line
954 (open-pipe* OPEN_READ
956 "(display (effective-version))")))
957 (module-dir (string-append out "/share/guile/site/"
959 (source (assoc-ref inputs "source"))
960 (doc (string-append out "/share/doc/guile-irregex/"))
961 (guild (string-append (assoc-ref %build-inputs "guile")
963 ;; Make installation directories.
964 (mkdir-p (string-append module-dir "/rx/source"))
967 ;; Compile .scm files and install.
968 (setenv "GUILE_AUTO_COMPILE" "0")
970 (for-each (lambda (copy-info)
972 ((src-file dest-file-basis)
973 (let* ((dest-file (string-append
974 module-dir dest-file-basis
976 (go-file (string-append
977 module-dir dest-file-basis
979 ;; Install source module.
982 ;; Install compiled module.
983 (unless (zero? (system* guild "compile"
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")))
995 ;; Also copy over the README.
996 (install-file "irregex.html" doc)
999 `(("guile" ,guile-2.0)))
1000 (home-page "http://synthcode.com/scheme/irregex")
1001 (synopsis "S-expression based regular expressions")
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)))
1008 (define-public guile2.2-irregex
1009 (package-for-guile-2.2 guile-irregex))
1011 ;; There are two guile-gdbm packages, one using the FFI and one with
1012 ;; direct C bindings, hence the verbose name.
1014 (define-public guile-gdbm-ffi
1016 (name "guile-gdbm-ffi")
1017 (version "20120209.fa1d5b6")
1021 (url "https://github.com/ijp/guile-gdbm.git")
1022 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1023 (file-name (string-append name "-" version "-checkout"))
1026 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1027 (build-system trivial-build-system)
1030 ((guix build utils))
1033 (use-modules (guix build utils)
1037 ;; Avoid warnings we can safely ignore
1038 (setenv "GUILE_AUTO_COMPILE" "0")
1040 (let* ((out (assoc-ref %outputs "out"))
1043 (open-pipe* OPEN_READ
1045 (assoc-ref %build-inputs "guile")
1047 "-c" "(display (effective-version))")))
1048 (module-dir (string-append out "/share/guile/site/"
1050 (source (assoc-ref %build-inputs "source"))
1051 (doc (string-append out "/share/doc"))
1052 (guild (string-append (assoc-ref %build-inputs "guile")
1055 (string-append module-dir "/gdbm.scm"))
1057 (string-append module-dir "/gdbm.go"))
1059 (lambda (in-file out-file)
1060 (system* guild "compile" "-o" out-file in-file))))
1061 ;; Make installation directories.
1062 (mkdir-p module-dir)
1065 ;; Switch directory for compiling and installing
1069 (copy-file "gdbm.scm" gdbm.scm-dest)
1072 (substitute* gdbm.scm-dest
1073 (("\\(dynamic-link \"libgdbm\"\\)")
1074 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1075 (assoc-ref %build-inputs "gdbm"))))
1077 ;; compile to the destination
1078 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1080 `(("guile" ,guile-2.0)))
1083 (home-page "https://github.com/ijp/guile-gdbm")
1084 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1086 "Guile bindings to the GDBM key-value storage system, using
1087 Guile's foreign function interface.")
1088 (license license:gpl3+)))
1090 (define-public guile2.2-gdbm-ffi
1091 (package-for-guile-2.2 guile-gdbm-ffi))
1093 (define-public guile-sqlite3
1094 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
1096 (name "guile-sqlite3")
1097 (version (string-append "0.0-1." (string-take commit 7)))
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")
1110 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
1111 (file-name (string-append name "-" version "-checkout"))
1112 (modules '((guix build utils)))
1114 ;; Upgrade 'Makefile.am' to the current way of doing things.
1115 '(substitute* "Makefile.am"
1116 (("TESTS_ENVIRONMENT")
1117 "TEST_LOG_COMPILER")))))
1119 (build-system gnu-build-system)
1121 `(("autoconf" ,autoconf)
1122 ("automake" ,automake)
1123 ("pkg-config" ,pkg-config)))
1125 `(("guile" ,guile-2.2)
1126 ("sqlite" ,sqlite)))
1128 '(#:phases (modify-phases %standard-phases
1129 (add-after 'unpack 'autoreconf
1131 (zero? (system* "autoreconf" "-vfi"))))
1132 (add-before 'build 'set-sqlite3-file-name
1133 (lambda* (#:key inputs #:allow-other-keys)
1134 (substitute* "sqlite3.scm"
1136 (string-append "\"" (assoc-ref inputs "sqlite")
1137 "/lib/libsqlite3\"")))
1139 (synopsis "Access SQLite databases from Guile")
1141 "This package provides Guile bindings to the SQLite database system.")
1142 (license license:gpl3+))))
1144 (define-public haunt
1150 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1154 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1155 (build-system gnu-build-system)
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
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)
1171 (let ((modules (string-append site "/" version)))
1172 (wrap-program (string-append bin "/haunt")
1173 `("GUILE_LOAD_PATH" ":" prefix
1175 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1179 `(("pkg-config" ,pkg-config)
1180 ("texinfo" ,texinfo)))
1182 `(("guile" ,guile-2.2)))
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+)))
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))
1199 (define-public guile-config
1201 (name "guile-config")
1206 "http://alex.pompo.co/software/" name "-" version
1210 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1211 (build-system gnu-build-system)
1213 `(("guile" ,guile-2.0)))
1214 (synopsis "Guile application configuration parsing library")
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+)))
1226 (define-public guile-redis
1228 (name "guile-redis")
1232 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1236 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1237 (modules '((guix build utils)))
1239 ;; Make sure everything goes under .../site/X.Y, like Guile's
1240 ;; search paths expects.
1242 (substitute* "configure"
1243 (("ac_subst_vars='")
1244 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1245 (substitute* '("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)
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+)))
1259 (define-public guile2.2-redis
1260 (package-for-guile-2.2 guile-redis))
1262 (define-public guile-wisp
1268 (uri (string-append "https://bitbucket.org/ArneBab/"
1269 "wisp/downloads/wisp-"
1273 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1274 (build-system gnu-build-system)
1276 `(#:modules ((system base compile)
1277 ,@%gnu-build-system-modules)
1279 (modify-phases %standard-phases
1281 'configure 'substitute-before-config
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"
1291 (string-append bash "/bin/bash") ))
1294 ;; auto compilation breaks, but if we set HOME to /tmp,
1297 'check 'auto-compile-hacky-workaround
1299 (setenv "HOME" "/tmp")
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"))
1307 (string-append module-dir "/language/wisp"))
1308 (guild (string-append (assoc-ref inputs "guile")
1310 ;; Make installation directories.
1311 (mkdir-p module-dir)
1312 (mkdir-p language-dir)
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"))
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"))
1328 (home-page "http://draketo.de/english/wisp")
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+)))
1338 (define-public guile-sly
1344 (uri (string-append "https://files.dthompson.us/sly/sly-"
1348 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1349 (build-system gnu-build-system)
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")))))
1357 `(("pkg-config" ,pkg-config)))
1359 `(("guile" ,guile-2.0)
1360 ("guile-sdl" ,guile-sdl)
1361 ("guile-opengl" ,guile-opengl)))
1364 ("freeimage" ,freeimage)
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
1370 (home-page "http://dthompson.us/pages/software/sly.html")
1371 (license license:gpl3+)))
1373 (define-public g-wrap
1379 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1383 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1384 (build-system gnu-build-system)
1386 `(("pkg-config" ,pkg-config)))
1388 `(("guile" ,guile-2.2)
1389 ("guile-lib" ,guile-lib)))
1391 `(("libffi" ,libffi)))
1393 `(#:configure-flags '("--disable-Werror")
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@")))
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+)))
1412 (define-public guile-dbi
1419 "http://download.gna.org/guile-dbi/guile-dbi-"
1423 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1424 (build-system gnu-build-system)
1427 (list (string-append
1428 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
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))
1440 `(("guile" ,guile-2.0)))
1441 (synopsis "Guile database abstraction layer")
1442 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
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+)))
1450 (define-public guile-dbd-sqlite3
1452 (name "guile-dbd-sqlite3")
1457 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1461 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1462 (build-system gnu-build-system)
1464 `(("pkg-config" ,pkg-config)))
1466 `(("sqlite" ,sqlite)
1467 ("zlib" ,(@ (gnu packages compression) zlib))))
1469 `(("guile-dbi" ,guile-dbi)))
1470 (synopsis "Guile DBI driver for SQLite")
1471 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
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+)))
1477 (define-public guile-xosd
1483 (uri (string-append "https://github.com/alezost/" name
1484 "/releases/download/v" version
1485 "/" name "-" version ".tar.gz"))
1488 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1489 (build-system gnu-build-system)
1491 `(("pkg-config" ,pkg-config)))
1493 `(("guile" ,guile-2.2)
1495 ("libxext" ,libxext)
1496 ("libxinerama" ,libxinerama)
1498 (home-page "https://github.com/alezost/guile-xosd")
1499 (synopsis "XOSD bindings for Guile")
1501 "Guile-XOSD provides Guile bindings for @code{libxosd},
1502 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1504 (license license:gpl3+)))
1506 (define-public guile-daemon
1508 (name "guile-daemon")
1512 (uri (string-append "https://github.com/alezost/" name
1513 "/releases/download/v" version
1514 "/" name "-" version ".tar.gz"))
1517 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1518 (build-system gnu-build-system)
1520 `(("pkg-config" ,pkg-config)))
1522 `(("guile" ,guile-2.2)))
1523 (home-page "https://github.com/alezost/guile-daemon")
1524 (synopsis "Evaluate code in a running Guile process")
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+)))
1531 (define-public guile-commonmark
1533 (name "guile-commonmark")
1537 (uri (string-append "https://github.com/OrangeShark/" name
1538 "/releases/download/v" version
1539 "/" name "-" version ".tar.gz"))
1542 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1543 (modules '((guix build utils)))
1545 ;; Use the real effective version of Guile in directory names
1546 ;; instead of a hard-coded "/2.0".
1548 (substitute* "configure"
1549 (("ac_subst_vars='")
1550 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1551 (substitute* "Makefile.in"
1553 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1554 (build-system gnu-build-system)
1556 `(("guile" ,guile-2.2)))
1557 (synopsis "CommonMark parser for Guile")
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+)))
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))
1572 (define-public guile-bytestructures
1574 (name "guile-bytestructures")
1575 (version "20170402.91d042e")
1579 (url "https://github.com/TaylanUB/scheme-bytestructures")
1580 (commit "91d042e3427e1d7740b604b6296c616cf2eec13d")))
1581 (file-name (string-append name "-" version "-checkout"))
1584 "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb"))
1585 (patches (search-patches "guile-bytestructures-name-clash.patch"))))
1586 (build-system trivial-build-system)
1588 `(#:modules ((guix build utils))
1591 (use-modules (guix build utils)
1598 (string-join (list (assoc-ref %build-inputs "tar")
1599 (assoc-ref %build-inputs "xz"))
1601 (system* "tar" "xf" (assoc-ref %build-inputs "source"))
1602 (match (scandir ".")
1603 (("." ".." directory)
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/"
1614 (object-dir (string-append out "/lib/guile/" effective
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")
1626 ;; Make installation directories.
1629 ;; Compile .scm files and install.
1631 (setenv "GUILE_AUTO_COMPILE" "0")
1632 (for-each (lambda (file)
1633 (let* ((dest-file (string-append module-dir "/"
1635 (go-file (string-append object-dir "/"
1637 (string-rindex file #\.))
1639 ;; Install source module.
1640 (mkdir-p (dirname dest-file))
1641 (copy-file file dest-file)
1643 ;; Install compiled module.
1644 (mkdir-p (dirname go-file))
1645 (unless (zero? (system* guild "compile"
1649 (error (format #f "Failed to compile ~s to ~s!"
1651 (append sld-files scm-files))
1653 ;; Also copy over the README.
1654 (install-file "README.md" doc)
1660 `(("guile" ,guile-2.2)))
1661 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1662 (synopsis "Structured access to bytevector contents for Guile")
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+)))
1671 (define-public guile2.0-bytestructures
1672 (package-for-guile-2.0 guile-bytestructures))
1674 (define-public guile-aspell
1676 (name "guile-aspell")
1681 "http://lonelycactus.com/tarball/guile_aspell-"
1685 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1686 (build-system gnu-build-system)
1688 '(#:phases (modify-phases %standard-phases
1689 (add-before 'configure 'set-guilesitedir
1691 (substitute* "Makefile.in"
1692 (("^guilesitedir =.*$")
1694 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
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\"")))
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")
1710 "guile-aspell is a Guile Scheme library for comparing a string against a
1711 dictionary and suggesting spelling corrections.")
1712 (license license:gpl3+)))
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")
1721 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1723 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1731 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1732 (file-name (string-append name "-" version "-checkout"))))
1733 (build-system gnu-build-system)
1735 '(#:phases (modify-phases %standard-phases
1736 (add-after 'unpack 'bootstrap
1738 (zero? (system* "sh" "bootstrap")))))
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")
1746 ;; The '.a' file is useless.
1749 ;; Install 'lib/bash' as Bash 4.4 expects.
1750 (string-append "--libdir=" (assoc-ref %outputs "out")
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)
1759 ;; Bash with loadable module support, for the test
1761 ("bash-full" ,bash)))
1762 (inputs `(("guile" ,guile-2.0)
1763 ("bash:include" ,bash "include")))
1764 (synopsis "Extend Bash using Guile")
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:
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.
1782 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1785 and then run @command{scm example.scm}.")
1786 (license license:gpl3+))))
1788 (define-public guile-8sync
1790 (name "guile-8sync")
1794 (uri (string-append "mirror://gnu/8sync/8sync-" version
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)))
1806 `(#:phases (modify-phases %standard-phases
1807 (add-before 'configure 'setenv
1810 (setenv "GUILE_AUTO_COMPILE" "0")
1812 (home-page "https://gnu.org/s/8sync/")
1813 (synopsis "Asynchronous actor model library for Guile")
1815 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1816 library for GNU Guile based on the actor model.
1818 Note that 8sync is only available for Guile 2.2.")
1819 (license license:lgpl3+)))
1821 (define-public guile-fibers
1823 (name "guile-fibers")
1827 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1831 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1832 (build-system gnu-build-system)
1834 `(("texinfo" ,texinfo)
1835 ("pkg-config" ,pkg-config)))
1837 `(("guile" ,guile-2.2)))
1838 (synopsis "Lightweight concurrency facility for Guile")
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.
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+)))
1853 (define-public guile-git
1854 (let ((revision "3")
1855 (commit "e156a1054cc1d9e58d9be82e36e8acf5c9f9ee8d"))
1858 (version (string-append "0.0-" revision "." (string-take commit 7)))
1859 (home-page "https://gitlab.com/guile-git/guile-git.git")
1862 (uri (git-reference (url home-page) (commit commit)))
1865 "1vhr2bqkljy1zzdy02dky2nk1w9bd46afj5wd4gp4kr333pz4ch6"))
1866 (file-name (git-file-name name version))))
1867 (build-system gnu-build-system)
1869 `(#:phases (modify-phases %standard-phases
1870 (add-after 'unpack 'bootstrap
1872 (zero? (system* "autoreconf" "-vfi"))))
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")
1879 '((add-before 'check 'skip-tests
1881 (substitute* "Makefile"
1882 (("tests/status\\.scm")
1886 `(("autoconf" ,autoconf)
1887 ("automake" ,automake)
1888 ("texinfo" ,texinfo)
1889 ("pkg-config" ,pkg-config)))
1891 `(("guile" ,guile-2.2)
1892 ("libgit2" ,libgit2)))
1894 `(("guile-bytestructures" ,guile-bytestructures)))
1895 (synopsis "Guile bindings for libgit2")
1897 "This package provides Guile bindings to libgit2, a library to
1898 manipulate repositories of the Git version control system.")
1899 (license license:gpl3+))))
1901 (define-public guile2.0-git
1902 (package-for-guile-2.0 guile-git))
1904 (define-public guile-syntax-highlight
1905 (let ((commit "a047675e66861b647426372aa2ba7820f749616d")
1908 (name "guile-syntax-highlight")
1909 (version (string-append "0.0." revision "."
1910 (string-take commit 7)))
1914 (url "git://dthompson.us/guile-syntax-highlight.git")
1916 (file-name (string-append name "-" version "-checkout"))
1919 "1zjr6sg3n7xbdsliy45i39dqanxvcms58ayx36wxrz72zpq58vq3"))))
1920 (build-system gnu-build-system)
1922 '(#:phases (modify-phases %standard-phases
1923 (add-after 'unpack 'bootstrap
1925 (zero? (system* "sh" "bootstrap")))))))
1927 `(("autoconf" ,autoconf)
1928 ("automake" ,automake)
1929 ("pkg-config" ,pkg-config)))
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+))))
1940 (define-public guile-sjson
1942 (name "guile-sjson")
1946 (uri (string-append "https://dustycloud.org/misc/sjson-" version
1950 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
1951 (build-system gnu-build-system)
1954 (modify-phases %standard-phases
1955 (add-after 'unpack 'bootstrap
1956 (lambda _ (zero? (system* "sh" "bootstrap.sh")))))))
1958 `(("autoconf" ,autoconf)
1959 ("automake" ,automake)
1960 ("pkg-config" ,pkg-config)))
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+)))
1969 ;;; guile.scm ends here