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")))
298 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
300 (substitute-keyword-arguments `(;; Tests aren't passing for now.
301 ;; Obviously we should re-enable this!
303 ,@(package-arguments guile-2.2))
305 `(modify-phases ,phases
306 (add-after 'unpack 'autogen
308 (zero? (system* "sh" "autogen.sh"))))
309 (add-before 'autogen 'patch-/bin/sh
311 (substitute* "build-aux/git-version-gen"
312 (("#!/bin/sh") (string-append "#!" (which "sh"))))
315 `(("autoconf" ,autoconf)
316 ("automake" ,automake)
320 ("gettext" ,gettext-minimal)
321 ,@(package-native-inputs guile-2.2)))
322 ;; Same as in guile-2.0
324 (list (search-path-specification
325 (variable "GUILE_LOAD_PATH")
326 (files '("share/guile/site/2.0")))
327 (search-path-specification
328 (variable "GUILE_LOAD_COMPILED_PATH")
329 (files '("lib/guile/2.0/site-ccache"
330 "share/guile/site/2.0")))))))
332 ;; There has not been any release yet.
333 (define-public guildhall
334 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
338 (version (string-append "0-" revision "." (string-take commit 9)))
342 (url "https://github.com/ijp/guildhall.git")
344 (file-name (string-append name "-" version "-checkout"))
347 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
348 (build-system gnu-build-system)
351 (modify-phases %standard-phases
352 ;; Tests fail without this fix because they try to load the bash
353 ;; executable as a Scheme file. See bug report at
354 ;; https://github.com/ijp/guildhall/issues/22
355 (add-after 'unpack 'fix-bug-22
357 (substitute* "Makefile.am"
358 (("TESTS_ENVIRONMENT=.*")
359 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
360 TEST_EXTENSIONS = .scm
361 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
362 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
363 ;; FIXME: one of the database tests fails for unknown
364 ;; reasons. It does not fail when run outside of Guix.
365 (("tests/database.scm") ""))
367 (add-before 'configure 'autogen
369 (zero? (system* "sh" "autogen.sh")))))))
371 `(("guile" ,guile-2.0)))
373 `(("zip" ,zip) ; for tests
374 ("autoconf" ,autoconf)
375 ("automake" ,automake)
376 ("texinfo" ,texinfo)))
377 (synopsis "Package manager for Guile")
379 "Guildhall is a package manager written for Guile Scheme. A guild is
380 an association of independent craftspeople. A guildhall is where they meet.
381 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
384 On a practical level, Guildhall lets you share Scheme modules and programs
385 over the internet, and install code that has been shared by others. Guildhall
386 can handle dependencies, so when a program requires several libraries, and
387 each of those has further dependencies, all of the prerequisites for the
388 program can be installed in one go.")
389 (home-page "https://github.com/ijp/guildhall")
390 (license license:gpl3+))))
397 (define-public artanis
398 (let ((release "0.2.1")
402 (version (if (zero? revision)
404 (string-append release "-"
405 (number->string revision))))
408 (uri (string-append "mirror://gnu/artanis/artanis-"
410 (file-name (string-append name "-" version ".tar.gz"))
413 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
414 (modules '((guix build utils)))
417 (delete-file-recursively "artanis/third-party/json.scm")
418 (delete-file-recursively "artanis/third-party/json")
419 (substitute* '("artanis/artanis.scm"
421 (("(#:use-module \\()artanis third-party (json\\))" _
423 (string-append use-module json)))
424 (substitute* "artanis/oht.scm"
425 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
426 _ pre json-string post)
430 (substitute* "artanis/artanis.scm"
431 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
433 (build-system gnu-build-system)
434 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
435 (inputs `(("guile" ,guile-2.2)
436 ("guile-json" ,guile-json)))
437 (native-inputs `(("bash" ,bash) ;for the `source' builtin
438 ("pkgconfig" ,pkg-config)
439 ("util-linux" ,util-linux))) ;for the `script' command
442 ;; TODO: The documentation must be built with the `docs' target.
443 (let* ((out (assoc-ref %outputs "out"))
444 (scm (string-append out "/share/guile/site/2.2"))
445 (go (string-append out "/lib/guile/2.2/site-ccache")))
446 ;; Don't use (%site-dir) for site paths.
447 (list (string-append "MOD_PATH=" scm)
448 (string-append "MOD_COMPILED_PATH=" go)))
451 (modify-phases %standard-phases
452 (add-before 'install 'substitute-root-dir
453 (lambda* (#:key outputs #:allow-other-keys)
454 (let ((out (assoc-ref outputs "out")))
455 (substitute* "Makefile" ;ignore the execution of bash.bashrc
456 ((" /etc/bash.bashrc") " /dev/null"))
457 (substitute* "Makefile" ;set the root of config files to OUT
458 ((" /etc") (string-append " " out "/etc")))
459 (mkdir-p (string-append out "/bin")) ;for the `art' executable
461 (add-after 'install 'wrap-art
462 (lambda* (#:key outputs #:allow-other-keys)
463 (let* ((out (assoc-ref outputs "out"))
464 (bin (string-append out "/bin"))
465 (scm (string-append out "/share/guile/site/2.2"))
466 (go (string-append out "/lib/guile/2.2/site-ccache")))
467 (wrap-program (string-append bin "/art")
468 `("GUILE_LOAD_PATH" ":" prefix (,scm))
469 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
471 (synopsis "Web application framework written in Guile")
472 (description "GNU Artanis is a web application framework written in Guile
473 Scheme. A web application framework (WAF) is a software framework that is
474 designed to support the development of dynamic websites, web applications, web
475 services and web resources. The framework aims to alleviate the overhead
476 associated with common activities performed in web development. Artanis
477 provides several tools for web development: database access, templating
478 frameworks, session management, URL-remapping for RESTful, page caching, and
480 (home-page "https://www.gnu.org/software/artanis/")
481 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
483 (define-public guile-reader
485 (name "guile-reader")
489 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
493 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
494 (build-system gnu-build-system)
495 (native-inputs `(("pkgconfig" ,pkg-config)
496 ("gperf" ,gperf-3.0)))
497 (inputs `(("guile" ,guile-2.2)))
498 (synopsis "Framework for building readers for GNU Guile")
500 "Guile-Reader is a simple framework for building readers for GNU Guile.
502 The idea is to make it easy to build procedures that extend Guile’s read
503 procedure. Readers supporting various syntax variants can easily be written,
504 possibly by re-using existing “token readers” of a standard Scheme
505 readers. For example, it is used to implement Skribilo’s R5RS-derived
508 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
509 hopefully more powerful and flexible (for instance, one may instantiate as
510 many readers as needed).")
511 (home-page "http://www.nongnu.org/guile-reader/")
512 (license license:gpl3+)))
514 (define-public guile2.0-reader
515 (package-for-guile-2.0 guile-reader))
516 (define-public guile2.2-reader
517 (deprecated-package "guile2.2-reader" guile-reader))
519 (define-public guile-ncurses
521 (name "guile-ncurses")
525 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
529 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
530 (build-system gnu-build-system)
531 (inputs `(("ncurses" ,ncurses)
532 ("guile" ,guile-2.2)))
533 (native-inputs `(("pkg-config" ,pkg-config)))
535 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
536 "--with-gnu-filesystem-hierarchy")
538 (modify-phases %standard-phases
539 (add-before 'build 'fix-libguile-ncurses-file-name
540 (lambda* (#:key outputs #:allow-other-keys)
541 (and (zero? (system* "make" "install"
544 (parallel-job-count))))
545 (let* ((out (assoc-ref outputs "out"))
547 (files (find-files dir ".scm")))
549 (("\"libguile-ncurses\"")
550 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
553 (home-page "https://www.gnu.org/software/guile-ncurses/")
554 (synopsis "Guile bindings to ncurses")
556 "guile-ncurses provides Guile language bindings for the ncurses
558 (license license:lgpl3+)))
560 (define-public guile-ncurses/gpm
562 (inherit guile-ncurses)
563 (name "guile-ncurses-with-gpm")
564 (inputs `(("ncurses" ,ncurses/gpm)
565 ("guile" ,guile-2.2)))))
573 (uri (string-append "mirror://gnu/mcron/mcron-"
577 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
578 (patches (search-patches "mcron-install.patch"))))
579 (build-system gnu-build-system)
580 (native-inputs `(("pkg-config" ,pkg-config)))
581 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
582 (home-page "https://www.gnu.org/software/mcron/")
583 (synopsis "Run jobs at scheduled times")
585 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
586 tasks on a schedule, such as every hour or every Monday. Mcron is written in
587 Guile, so its configuration can be written in Scheme; the original cron
588 format is also supported.")
589 (license license:gpl3+)))
591 (define-public mcron2
592 ;; This is mthl's mcron development branch, not yet merged in mcron.
593 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
597 (version (string-append (package-version mcron) "-0."
598 (string-take commit 7)))
602 (url "https://notabug.org/mthl/mcron/")
606 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
607 (file-name (string-append name "-" version "-checkout"))))
609 `(("autoconf" ,autoconf)
610 ("automake" ,automake)
611 ("pkg-config" ,pkg-config)
613 ("help2man" ,help2man)))
615 `(#:modules ((ice-9 match) (ice-9 ftw)
616 ,@%gnu-build-system-modules)
618 #:phases (modify-phases %standard-phases
619 (add-after 'unpack 'bootstrap
621 (zero? (system* "autoreconf" "-vfi"))))
622 (add-after 'install 'wrap-mcron
623 (lambda* (#:key outputs #:allow-other-keys)
624 ;; Wrap the 'mcron' command to refer to the right
626 (let* ((out (assoc-ref outputs "out"))
627 (bin (string-append out "/bin"))
629 out "/share/guile/site")))
630 (match (scandir site)
632 (let ((modules (string-append site "/" version)))
633 (wrap-program (string-append bin "/mcron")
634 `("GUILE_LOAD_PATH" ":" prefix
636 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
640 (define-public guile-ics
647 (url "https://github.com/artyom-poptsov/guile-ics")
649 (file-name (string-append name "-" version "-checkout"))
652 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
653 (build-system gnu-build-system)
655 '(#:phases (modify-phases %standard-phases
656 (add-before 'configure 'autoreconf
658 ;; Repository comes with a broken symlink
659 (delete-file "README")
660 (symlink "README.org" "README")
661 (zero? (system* "autoreconf" "-fi")))))))
663 `(("autoconf" ,(autoconf-wrapper))
664 ("automake" ,automake)
666 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
667 ("gettext" ,gettext-minimal)
668 ("pkg-config" ,pkg-config)))
669 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
670 (propagated-inputs `(("guile-lib" ,guile2.0-lib)))
671 (home-page "https://github.com/artyom-poptsov/guile-ics")
672 (synopsis "Guile parser library for the iCalendar format")
674 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
675 pure Scheme. The library can be used to read and write iCalendar data.
677 The library is shipped with documentation in Info format and usage examples.")
678 (license license:gpl3+)))
680 (define-public guile-lib
686 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
690 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
691 (build-system gnu-build-system)
694 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
696 (modify-phases %standard-phases
697 (add-before 'configure 'patch-module-dir
699 (substitute* "src/Makefile.in"
700 (("^moddir = ([[:graph:]]+)")
701 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
702 (("^godir = ([[:graph:]]+)")
704 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
706 (native-inputs `(("pkg-config" ,pkg-config)))
707 (inputs `(("guile" ,guile-2.2)))
708 (home-page "http://www.nongnu.org/guile-lib/")
709 (synopsis "Collection of useful Guile Scheme modules")
711 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
712 modules, allowing for people to cooperate integrating their generic Guile
713 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
716 ;; The whole is under GPLv3+, but some modules are under laxer
717 ;; distribution terms such as LGPL and public domain. See `COPYING' for
719 (license license:gpl3+)))
721 (define-public guile2.0-lib
722 (package-for-guile-2.0 guile-lib))
724 (define-public guile2.2-lib
725 (deprecated-package "guile2.2-lib" guile-lib))
727 (define-public guile-json
733 (uri (string-append "mirror://savannah/guile-json/guile-json-"
737 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
738 (modules '((guix build utils)))
740 ;; Make sure everything goes under .../site/X.Y, like Guile's
741 ;; search paths expects.
743 (substitute* "configure"
745 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
746 (substitute* '("Makefile.in" "json/Makefile.in")
747 (("moddir =.*/share/guile/site" all)
748 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
749 (build-system gnu-build-system)
750 (native-inputs `(("guile" ,guile-2.2)))
751 (home-page "http://savannah.nongnu.org/projects/guile-json/")
752 (synopsis "JSON module for Guile")
754 "Guile-JSON supports parsing and building JSON documents according to the
755 specification. These are the main features:
758 @item Strictly complies to @uref{http://json.org, specification}.
759 @item Build JSON documents programmatically via macros.
760 @item Unicode support for strings.
761 @item Allows JSON pretty printing.
763 (license license:lgpl3+)))
765 (define-public guile2.2-json
766 (deprecated-package "guile2.2-json" guile-json))
768 (define-public guile2.0-json
769 (package-for-guile-2.0 guile-json))
771 (define-public guile-minikanren
773 (name "guile-minikanren")
774 (version "20150424.e844d85")
778 (url "https://github.com/ijp/minikanren.git")
779 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
780 (file-name (string-append name "-" version "-checkout"))
783 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
784 (build-system trivial-build-system)
786 `(#:modules ((guix build utils))
789 (use-modules (guix build utils)
794 (let* ((out (assoc-ref %outputs "out"))
795 (guile (assoc-ref %build-inputs "guile"))
796 (effective (read-line
797 (open-pipe* OPEN_READ
798 (string-append guile "/bin/guile")
799 "-c" "(display (effective-version))")))
800 (module-dir (string-append out "/share/guile/site/"
802 (source (assoc-ref %build-inputs "source"))
803 (doc (string-append out "/share/doc/guile-minikanren"))
804 (scm-files '("minikanren.scm"
805 "minikanren/mkextraforms.scm"
806 "minikanren/mkprelude.scm"
807 "minikanren/mk.scm"))
808 (guild (string-append (assoc-ref %build-inputs "guile")
810 ;; Make installation directories.
811 (mkdir-p (string-append module-dir "/minikanren"))
814 ;; Compile .scm files and install.
816 (setenv "GUILE_AUTO_COMPILE" "0")
817 (for-each (lambda (file)
818 (let* ((dest-file (string-append module-dir "/"
820 (go-file (match (string-split file #\.)
822 (string-append module-dir "/"
824 ;; Install source module.
825 (copy-file file dest-file)
826 ;; Install compiled module.
827 (unless (zero? (system* guild "compile"
831 (error (format #f "Failed to compile ~s to ~s!"
835 ;; Also copy over the README.
836 (install-file "README.org" doc)
839 `(("guile" ,guile-2.0)))
840 (home-page "https://github.com/ijp/minikanren")
841 (synopsis "MiniKanren declarative logic system, packaged for Guile")
843 "MiniKanren is a relational programming extension to the Scheme
844 programming Language, written as a smaller version of Kanren suitable for
845 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
846 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
848 This is Ian Price's r6rs packaged version of miniKanren, which deviates
849 slightly from miniKanren mainline.
851 See http://minikanren.org/ for more on miniKanren generally.")
852 (license license:expat)))
854 (define-public guile2.2-minikanren
855 (package-for-guile-2.2 guile-minikanren))
857 (define-public guile-miniadapton
858 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
861 (name "guile-miniadapton")
862 (version (string-append "0-" revision "." (string-take commit 9)))
866 (url "https://github.com/fisherdj/miniAdapton.git")
868 (file-name (string-append name "-" version "-checkout"))
871 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
872 (build-system gnu-build-system)
874 `(#:modules ((guix build utils)
878 (guix build gnu-build-system))
879 #:tests? #f ; there is no test target
881 (modify-phases %standard-phases
885 (lambda* (#:key outputs #:allow-other-keys)
886 (let* ((cwd (getcwd))
887 (scm-files (find-files "." "\\.scm$"))
888 (effective (read-line
889 (open-pipe* OPEN_READ
891 "(display (effective-version))")))
892 (module-dir (string-append (assoc-ref outputs "out")
896 ;; Make installation directories.
899 (setenv "GUILE_AUTO_COMPILE" "0")
901 ;; Compile .scm files and install.
902 (every (lambda (file)
903 (let ((go-file (string-append module-dir "/"
904 (basename file ".scm") ".go")))
905 ;; Install source module.
906 (install-file file module-dir)
907 ;; Compile and install module.
908 (zero? (system* "guild" "compile" "-L" cwd
909 "-o" go-file file))))
912 `(("guile" ,guile-2.2)))
913 (home-page "https://github.com/fisherdj/miniAdapton")
914 (synopsis "Minimal implementation of incremental computation in Guile
916 (description "This package provides a complete Scheme implementation of
917 miniAdapton, which implements the core functionality of the Adapton system for
918 incremental computation (also known as self-adjusting computation). Like
919 Adapton, miniAdapton allows programmers to safely combine mutation and
920 memoization. miniAdapton is built on top of an even simpler system,
921 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
922 understand, extend, and port to host languages other than Scheme.")
923 (license license:expat))))
925 (define-public guile-irregex
927 (name "guile-irregex")
932 "http://synthcode.com/scheme/irregex/irregex-"
936 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
937 (build-system gnu-build-system)
939 `(#:modules ((guix build utils)
943 (guix build gnu-build-system))
945 (modify-phases %standard-phases
950 (lambda* (#:key inputs outputs #:allow-other-keys)
951 (let* ((out (assoc-ref outputs "out"))
952 (effective (read-line
953 (open-pipe* OPEN_READ
955 "(display (effective-version))")))
956 (module-dir (string-append out "/share/guile/site/"
958 (source (assoc-ref inputs "source"))
959 (doc (string-append out "/share/doc/guile-irregex/"))
960 (guild (string-append (assoc-ref %build-inputs "guile")
962 ;; Make installation directories.
963 (mkdir-p (string-append module-dir "/rx/source"))
966 ;; Compile .scm files and install.
967 (setenv "GUILE_AUTO_COMPILE" "0")
969 (for-each (lambda (copy-info)
971 ((src-file dest-file-basis)
972 (let* ((dest-file (string-append
973 module-dir dest-file-basis
975 (go-file (string-append
976 module-dir dest-file-basis
978 ;; Install source module.
981 ;; Install compiled module.
982 (unless (zero? (system* guild "compile"
986 (error (format #f "Failed to compile ~s to ~s!"
987 src-file dest-file)))))))
988 '(("irregex-guile.scm" "/rx/irregex")
989 ("irregex.scm" "/rx/source/irregex")
990 ;; Not really reachable via guile's packaging system,
991 ;; but nice to have around
992 ("irregex-utils.scm" "/rx/source/irregex-utils")))
994 ;; Also copy over the README.
995 (install-file "irregex.html" doc)
998 `(("guile" ,guile-2.0)))
999 (home-page "http://synthcode.com/scheme/irregex")
1000 (synopsis "S-expression based regular expressions")
1002 "Irregex is an s-expression based alternative to your classic
1003 string-based regular expressions. It implements SRFI 115 and is deeply
1004 inspired by the SCSH regular expression system.")
1005 (license license:bsd-3)))
1007 (define-public guile2.2-irregex
1008 (package-for-guile-2.2 guile-irregex))
1010 ;; There are two guile-gdbm packages, one using the FFI and one with
1011 ;; direct C bindings, hence the verbose name.
1013 (define-public guile-gdbm-ffi
1015 (name "guile-gdbm-ffi")
1016 (version "20120209.fa1d5b6")
1020 (url "https://github.com/ijp/guile-gdbm.git")
1021 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1022 (file-name (string-append name "-" version "-checkout"))
1025 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1026 (build-system trivial-build-system)
1029 ((guix build utils))
1032 (use-modules (guix build utils)
1036 ;; Avoid warnings we can safely ignore
1037 (setenv "GUILE_AUTO_COMPILE" "0")
1039 (let* ((out (assoc-ref %outputs "out"))
1042 (open-pipe* OPEN_READ
1044 (assoc-ref %build-inputs "guile")
1046 "-c" "(display (effective-version))")))
1047 (module-dir (string-append out "/share/guile/site/"
1049 (source (assoc-ref %build-inputs "source"))
1050 (doc (string-append out "/share/doc"))
1051 (guild (string-append (assoc-ref %build-inputs "guile")
1054 (string-append module-dir "/gdbm.scm"))
1056 (string-append module-dir "/gdbm.go"))
1058 (lambda (in-file out-file)
1059 (system* guild "compile" "-o" out-file in-file))))
1060 ;; Make installation directories.
1061 (mkdir-p module-dir)
1064 ;; Switch directory for compiling and installing
1068 (copy-file "gdbm.scm" gdbm.scm-dest)
1071 (substitute* gdbm.scm-dest
1072 (("\\(dynamic-link \"libgdbm\"\\)")
1073 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1074 (assoc-ref %build-inputs "gdbm"))))
1076 ;; compile to the destination
1077 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1079 `(("guile" ,guile-2.0)))
1082 (home-page "https://github.com/ijp/guile-gdbm")
1083 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1085 "Guile bindings to the GDBM key-value storage system, using
1086 Guile's foreign function interface.")
1087 (license license:gpl3+)))
1089 (define-public guile2.2-gdbm-ffi
1090 (package-for-guile-2.2 guile-gdbm-ffi))
1092 (define-public guile-sqlite3
1093 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
1095 (name "guile-sqlite3")
1096 (version (string-append "0.0-1." (string-take commit 7)))
1098 ;; XXX: This used to be available read-only at
1099 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1100 ;; eventually disappeared, so we have our own copy here.
1101 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1109 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
1110 (file-name (string-append name "-" version "-checkout"))
1111 (modules '((guix build utils)))
1113 ;; Upgrade 'Makefile.am' to the current way of doing things.
1114 '(substitute* "Makefile.am"
1115 (("TESTS_ENVIRONMENT")
1116 "TEST_LOG_COMPILER")))))
1118 (build-system gnu-build-system)
1120 `(("autoconf" ,autoconf)
1121 ("automake" ,automake)
1122 ("pkg-config" ,pkg-config)))
1124 `(("guile" ,guile-2.2)
1125 ("sqlite" ,sqlite)))
1127 '(#:phases (modify-phases %standard-phases
1128 (add-before 'configure 'autoreconf
1130 (zero? (system* "autoreconf" "-vfi"))))
1131 (add-before 'build 'set-sqlite3-file-name
1132 (lambda* (#:key inputs #:allow-other-keys)
1133 (substitute* "sqlite3.scm"
1135 (string-append "\"" (assoc-ref inputs "sqlite")
1136 "/lib/libsqlite3\"")))
1138 (synopsis "Access SQLite databases from Guile")
1140 "This package provides Guile bindings to the SQLite database system.")
1141 (license license:gpl3+))))
1143 (define-public haunt
1149 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1153 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1154 (build-system gnu-build-system)
1156 `(#:modules ((ice-9 match) (ice-9 ftw)
1157 ,@%gnu-build-system-modules)
1158 #:tests? #f ; test suite is non-deterministic :(
1159 #:phases (modify-phases %standard-phases
1160 (add-after 'install 'wrap-haunt
1161 (lambda* (#:key outputs #:allow-other-keys)
1162 ;; Wrap the 'haunt' command to refer to the right
1164 (let* ((out (assoc-ref outputs "out"))
1165 (bin (string-append out "/bin"))
1166 (site (string-append
1167 out "/share/guile/site")))
1168 (match (scandir site)
1170 (let ((modules (string-append site "/" version)))
1171 (wrap-program (string-append bin "/haunt")
1172 `("GUILE_LOAD_PATH" ":" prefix
1174 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1178 `(("pkg-config" ,pkg-config)
1179 ("texinfo" ,texinfo)))
1181 `(("guile" ,guile-2.2)))
1183 `(("guile-reader" ,guile-reader)
1184 ("guile-commonmark" ,guile-commonmark)))
1185 (synopsis "Functional static site generator")
1186 (description "Haunt is a static site generator written in Guile
1187 Scheme. Haunt features a functional build system and an extensible
1188 interface for reading articles in any format.")
1189 (home-page "http://haunt.dthompson.us")
1190 (license license:gpl3+)))
1192 (define-public guile2.0-haunt
1193 (package-for-guile-2.0
1194 (package (inherit haunt) (name "guile2.0-haunt"))))
1195 (define-public guile2.2-haunt
1196 (deprecated-package "guile2.2-haunt" haunt))
1198 (define-public guile-config
1200 (name "guile-config")
1205 "http://alex.pompo.co/software/" name "-" version
1209 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1210 (build-system gnu-build-system)
1212 `(("guile" ,guile-2.0)))
1213 (synopsis "Guile application configuration parsing library")
1215 "Guile Config is a library providing a declarative approach to
1216 application configuration specification. The library provides clean
1217 configuration declaration forms, and processors that take care of:
1218 configuration file creation; configuration file parsing; command-line
1219 parameter parsing using getopt-long; basic GNU command-line parameter
1220 generation (--help, --usage, --version); automatic output generation for the
1221 above command-line parameters.")
1222 (home-page "https://github.com/a-sassmannshausen/guile-config")
1223 (license license:agpl3+)))
1225 (define-public guile-redis
1227 (name "guile-redis")
1231 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1235 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1236 (modules '((guix build utils)))
1238 ;; Make sure everything goes under .../site/X.Y, like Guile's
1239 ;; search paths expects.
1241 (substitute* "configure"
1242 (("ac_subst_vars='")
1243 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1244 (substitute* '("Makefile.in"
1246 "redis/commands/Makefile.in")
1247 (("moddir =.*/share/guile/site" all)
1248 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1249 (build-system gnu-build-system)
1251 `(("guile" ,guile-2.0)))
1252 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1253 (synopsis "Redis client library for Guile")
1254 (description "Guile-redis provides a Scheme interface to the Redis
1255 key-value cache and store.")
1256 (license license:lgpl3+)))
1258 (define-public guile2.2-redis
1259 (package-for-guile-2.2 guile-redis))
1261 (define-public guile-wisp
1267 (uri (string-append "https://bitbucket.org/ArneBab/"
1268 "wisp/downloads/wisp-"
1272 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1273 (build-system gnu-build-system)
1275 `(#:modules ((system base compile)
1276 ,@%gnu-build-system-modules)
1278 (modify-phases %standard-phases
1280 'configure 'substitute-before-config
1282 (lambda* (#:key inputs #:allow-other-keys)
1283 (let ((bash (assoc-ref inputs "bash")))
1284 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1285 (substitute* "configure"
1286 (("guile-2.0") "guile"))
1287 ;; Puts together some test files with /bin/bash hardcoded
1288 (substitute* "Makefile.in"
1290 (string-append bash "/bin/bash") ))
1293 ;; auto compilation breaks, but if we set HOME to /tmp,
1296 'check 'auto-compile-hacky-workaround
1298 (setenv "HOME" "/tmp")
1302 (lambda* (#:key outputs inputs #:allow-other-keys)
1303 (let* ((out (assoc-ref outputs "out"))
1304 (module-dir (string-append out "/share/guile/site/2.0"))
1306 (string-append module-dir "/language/wisp"))
1307 (guild (string-append (assoc-ref inputs "guile")
1309 ;; Make installation directories.
1310 (mkdir-p module-dir)
1311 (mkdir-p language-dir)
1314 (copy-file "wisp-scheme.scm"
1315 (string-append module-dir "/wisp-scheme.scm"))
1316 (copy-file "language/wisp/spec.scm"
1317 (string-append language-dir "/spec.scm"))
1319 ;; compile to the destination
1320 (compile-file "wisp-scheme.scm"
1321 #:output-file (string-append
1322 module-dir "/wisp-scheme.go"))
1323 (compile-file "language/wisp/spec.scm"
1324 #:output-file (string-append
1325 language-dir "/spec.go"))
1327 (home-page "http://draketo.de/english/wisp")
1329 `(("guile" ,guile-2.0)
1330 ("python" ,python)))
1331 (synopsis "Whitespace to lisp syntax for Guile")
1332 (description "Wisp is a syntax for Guile which provides a Python-like
1333 whitespace-significant language. It may be easier on the eyes for some
1334 users and in some situations.")
1335 (license license:gpl3+)))
1337 (define-public guile-sly
1343 (uri (string-append "https://files.dthompson.us/sly/sly-"
1347 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1348 (build-system gnu-build-system)
1351 (list (string-append "--with-libfreeimage-prefix="
1352 (assoc-ref %build-inputs "freeimage"))
1353 (string-append "--with-libgslcblas-prefix="
1354 (assoc-ref %build-inputs "gsl")))))
1356 `(("pkg-config" ,pkg-config)))
1358 `(("guile" ,guile-2.0)
1359 ("guile-sdl" ,guile-sdl)
1360 ("guile-opengl" ,guile-opengl)))
1363 ("freeimage" ,freeimage)
1365 (synopsis "2D/3D game engine for GNU Guile")
1366 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1367 features a functional reactive programming interface and live coding
1369 (home-page "http://dthompson.us/pages/software/sly.html")
1370 (license license:gpl3+)))
1372 (define-public g-wrap
1378 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1382 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1383 (build-system gnu-build-system)
1385 `(("pkg-config" ,pkg-config)))
1387 `(("guile" ,guile-2.2)
1388 ("guile-lib" ,guile-lib)))
1390 `(("libffi" ,libffi)))
1392 `(#:configure-flags '("--disable-Werror")
1394 (modify-phases %standard-phases
1395 (add-before 'configure 'pre-configure
1396 (lambda* (#:key outputs #:allow-other-keys)
1397 (let ((out (assoc-ref outputs "out")))
1398 (substitute* (find-files "." "^Makefile.in$")
1399 (("guilemoduledir =.*guile/site" all)
1400 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1402 (synopsis "Generate C bindings for Guile")
1403 (description "G-Wrap is a tool and Guile library for generating function
1404 wrappers for inter-language calls. It currently only supports generating Guile
1405 wrappers for C functions. Given a definition of the types and prototypes for
1406 a given C interface, G-Wrap will automatically generate the C code that
1407 provides access to that interface and its types from the Scheme level.")
1408 (home-page "http://www.nongnu.org/g-wrap/index.html")
1409 (license license:lgpl2.1+)))
1411 (define-public guile-dbi
1418 "http://download.gna.org/guile-dbi/guile-dbi-"
1422 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1423 (build-system gnu-build-system)
1426 (list (string-append
1427 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1429 (modify-phases %standard-phases
1430 (add-after 'install 'patch-extension-path
1431 (lambda* (#:key outputs #:allow-other-keys)
1432 (let* ((out (assoc-ref outputs "out"))
1433 (dbi.scm (string-append
1434 out "/share/guile/site/2.0/dbi/dbi.scm"))
1435 (ext (string-append out "/lib/libguile-dbi")))
1436 (substitute* dbi.scm (("libguile-dbi") ext))
1439 `(("guile" ,guile-2.0)))
1440 (synopsis "Guile database abstraction layer")
1441 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1443 "guile-dbi is a library for Guile that provides a convenient interface to
1444 SQL databases. Database programming with guile-dbi is generic in that the same
1445 programming interface is presented regardless of which database system is used.
1446 It currently supports MySQL, Postgres and SQLite3.")
1447 (license license:gpl2+)))
1449 (define-public guile-dbd-sqlite3
1451 (name "guile-dbd-sqlite3")
1456 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1460 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1461 (build-system gnu-build-system)
1463 `(("pkg-config" ,pkg-config)))
1465 `(("sqlite" ,sqlite)
1466 ("zlib" ,(@ (gnu packages compression) zlib))))
1468 `(("guile-dbi" ,guile-dbi)))
1469 (synopsis "Guile DBI driver for SQLite")
1470 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1472 "guile-dbi is a library for Guile that provides a convenient interface to
1473 SQL databases. This package implements the interface for SQLite.")
1474 (license license:gpl2+)))
1476 (define-public guile-xosd
1482 (uri (string-append "https://github.com/alezost/" name
1483 "/releases/download/v" version
1484 "/" name "-" version ".tar.gz"))
1487 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1488 (build-system gnu-build-system)
1490 `(("pkg-config" ,pkg-config)))
1492 `(("guile" ,guile-2.2)
1494 ("libxext" ,libxext)
1495 ("libxinerama" ,libxinerama)
1497 (home-page "https://github.com/alezost/guile-xosd")
1498 (synopsis "XOSD bindings for Guile")
1500 "Guile-XOSD provides Guile bindings for @code{libxosd},
1501 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1503 (license license:gpl3+)))
1505 (define-public guile-daemon
1507 (name "guile-daemon")
1511 (uri (string-append "https://github.com/alezost/" name
1512 "/releases/download/v" version
1513 "/" name "-" version ".tar.gz"))
1516 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1517 (build-system gnu-build-system)
1519 `(("pkg-config" ,pkg-config)))
1521 `(("guile" ,guile-2.2)))
1522 (home-page "https://github.com/alezost/guile-daemon")
1523 (synopsis "Evaluate code in a running Guile process")
1525 "Guile-Daemon is a small Guile program that loads your initial
1526 configuration file, and then reads and evaluates Guile expressions that
1527 you send to a FIFO file.")
1528 (license license:gpl3+)))
1530 (define-public guile-commonmark
1532 (name "guile-commonmark")
1536 (uri (string-append "https://github.com/OrangeShark/" name
1537 "/releases/download/v" version
1538 "/" name "-" version ".tar.gz"))
1541 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1542 (modules '((guix build utils)))
1544 ;; Use the real effective version of Guile in directory names
1545 ;; instead of a hard-coded "/2.0".
1547 (substitute* "configure"
1548 (("ac_subst_vars='")
1549 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1550 (substitute* "Makefile.in"
1552 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1553 (build-system gnu-build-system)
1555 `(("guile" ,guile-2.2)))
1556 (synopsis "CommonMark parser for Guile")
1558 "guile-commonmark is a library for parsing CommonMark, a fully specified
1559 variant of Markdown. The library is written in Guile Scheme and is designed
1560 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1561 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1562 is no support for parsing block and inline level HTML.")
1563 (home-page "https://github.com/OrangeShark/guile-commonmark")
1564 (license license:lgpl3+)))
1566 (define-public guile2.0-commonmark
1567 (package-for-guile-2.0 guile-commonmark))
1568 (define-public guile2.2-commonmark
1569 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1571 (define-public guile-bytestructures
1573 (name "guile-bytestructures")
1574 (version "20170402.91d042e")
1578 (url "https://github.com/TaylanUB/scheme-bytestructures")
1579 (commit "91d042e3427e1d7740b604b6296c616cf2eec13d")))
1580 (file-name (string-append name "-" version "-checkout"))
1583 "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb"))
1584 (patches (search-patches "guile-bytestructures-name-clash.patch"))))
1585 (build-system trivial-build-system)
1587 `(#:modules ((guix build utils))
1590 (use-modules (guix build utils)
1597 (string-join (list (assoc-ref %build-inputs "tar")
1598 (assoc-ref %build-inputs "xz"))
1600 (system* "tar" "xf" (assoc-ref %build-inputs "source"))
1601 (match (scandir ".")
1602 (("." ".." directory)
1605 (let* ((out (assoc-ref %outputs "out"))
1606 (guile (assoc-ref %build-inputs "guile"))
1607 (effective (read-line
1608 (open-pipe* OPEN_READ
1609 (string-append guile "/bin/guile")
1610 "-c" "(display (effective-version))")))
1611 (module-dir (string-append out "/share/guile/site/"
1613 (object-dir (string-append out "/lib/guile/" effective
1616 (doc (string-append out "/share/doc/scheme-bytestructures"))
1617 (sld-files (with-directory-excursion source
1618 (find-files "bytestructures/r7" "\\.exports.sld$")))
1619 (scm-files (filter (lambda (path)
1620 (not (string-prefix? "bytestructures/r7" path)))
1621 (with-directory-excursion source
1622 (find-files "bytestructures" "\\.scm$"))))
1623 (guild (string-append (assoc-ref %build-inputs "guile")
1625 ;; Make installation directories.
1628 ;; Compile .scm files and install.
1630 (setenv "GUILE_AUTO_COMPILE" "0")
1631 (for-each (lambda (file)
1632 (let* ((dest-file (string-append module-dir "/"
1634 (go-file (string-append object-dir "/"
1636 (string-rindex file #\.))
1638 ;; Install source module.
1639 (mkdir-p (dirname dest-file))
1640 (copy-file file dest-file)
1642 ;; Install compiled module.
1643 (mkdir-p (dirname go-file))
1644 (unless (zero? (system* guild "compile"
1648 (error (format #f "Failed to compile ~s to ~s!"
1650 (append sld-files scm-files))
1652 ;; Also copy over the README.
1653 (install-file "README.md" doc)
1659 `(("guile" ,guile-2.2)))
1660 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1661 (synopsis "Structured access to bytevector contents for Guile")
1663 "Guile bytestructures offers a system imitating the type system
1664 of the C programming language, to be used on bytevectors. C's type
1665 system works on raw memory, and Guile works on bytevectors which are
1666 an abstraction over raw memory. It's also more powerful than the C
1667 type system, elevating types to first-class status.")
1668 (license license:gpl3+)))
1670 (define-public guile2.0-bytestructures
1671 (package-for-guile-2.0 guile-bytestructures))
1673 (define-public guile-aspell
1675 (name "guile-aspell")
1680 "http://lonelycactus.com/tarball/guile_aspell-"
1684 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1685 (build-system gnu-build-system)
1687 '(#:phases (modify-phases %standard-phases
1688 (add-before 'configure 'set-guilesitedir
1690 (substitute* "Makefile.in"
1691 (("^guilesitedir =.*$")
1693 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1695 (add-before 'build 'set-libaspell-file-name
1696 (lambda* (#:key inputs #:allow-other-keys)
1697 (let ((aspell (assoc-ref inputs "aspell")))
1698 (substitute* "aspell.scm"
1699 (("\"libaspell\\.so\"")
1700 (string-append "\"" aspell
1701 "/lib/libaspell\"")))
1703 (native-inputs `(("pkg-config" ,pkg-config)))
1704 (inputs `(("guile" ,guile-2.2)
1705 ("aspell" ,aspell)))
1706 (home-page "https://github.com/spk121/guile-aspell")
1707 (synopsis "Spell-checking from Guile")
1709 "guile-aspell is a Guile Scheme library for comparing a string against a
1710 dictionary and suggesting spelling corrections.")
1711 (license license:gpl3+)))
1713 (define-public guile-bash
1714 ;; This project is currently retired. It was initially announced here:
1715 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1716 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1720 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1722 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1730 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1731 (file-name (string-append name "-" version "-checkout"))))
1732 (build-system gnu-build-system)
1734 '(#:phases (modify-phases %standard-phases
1735 (add-after 'unpack 'bootstrap
1737 (zero? (system* "sh" "bootstrap")))))
1740 ;; Add -I to match 'bash.pc' of Bash 4.4.
1741 (list (string-append "CPPFLAGS=-I"
1742 (assoc-ref %build-inputs "bash:include")
1743 "/include/bash/include")
1745 ;; The '.a' file is useless.
1748 ;; Install 'lib/bash' as Bash 4.4 expects.
1749 (string-append "--libdir=" (assoc-ref %outputs "out")
1751 (native-inputs `(("pkg-config" ,pkg-config)
1752 ("autoconf" ,(autoconf-wrapper))
1753 ("automake" ,automake)
1754 ("libtool" ,libtool)
1755 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1756 ("gettext" ,gettext-minimal)
1758 ;; Bash with loadable module support, for the test
1760 ("bash-full" ,bash)))
1761 (inputs `(("guile" ,guile-2.0)
1762 ("bash:include" ,bash "include")))
1763 (synopsis "Extend Bash using Guile")
1765 "Guile-Bash provides a shared library and set of Guile modules,
1766 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1767 the following aspects of Bash:
1771 @item setting and getting Bash variables;
1772 @item creating dynamic variables;
1773 @item creating Bash functions with a Scheme implementation;
1774 @item reader macro for output capturing;
1775 @item reader macro for evaluating raw Bash commands.
1781 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1784 and then run @command{scm example.scm}.")
1785 (license license:gpl3+))))
1787 (define-public guile-8sync
1789 (name "guile-8sync")
1793 (uri (string-append "mirror://gnu/8sync/8sync-" version
1797 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1798 (build-system gnu-build-system)
1799 (native-inputs `(("autoconf" ,autoconf)
1800 ("automake" ,automake)
1801 ("guile" ,guile-2.2)
1802 ("pkg-config" ,pkg-config)
1803 ("texinfo" ,texinfo)))
1805 `(#:phases (modify-phases %standard-phases
1806 (add-before 'configure 'setenv
1809 (setenv "GUILE_AUTO_COMPILE" "0")
1811 (home-page "https://gnu.org/s/8sync/")
1812 (synopsis "Asynchronous actor model library for Guile")
1814 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1815 library for GNU Guile based on the actor model.
1817 Note that 8sync is only available for Guile 2.2.")
1818 (license license:lgpl3+)))
1820 (define-public guile-fibers
1822 (name "guile-fibers")
1826 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1830 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1831 (build-system gnu-build-system)
1833 `(("texinfo" ,texinfo)
1834 ("pkg-config" ,pkg-config)))
1836 `(("guile" ,guile-2.2)))
1837 (synopsis "Lightweight concurrency facility for Guile")
1839 "Fibers is a Guile library that implements a a lightweight concurrency
1840 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1841 like a \"goroutine\" from the Go language: a lightweight thread-like
1842 abstraction. Systems built with Fibers can scale up to millions of concurrent
1843 fibers, tens of thousands of concurrent socket connections, and many parallel
1844 cores. The Fibers library also provides Concurrent ML-like channels for
1845 communication between fibers.
1847 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1848 is not available for Guile 2.0.")
1849 (home-page "https://github.com/wingo/fibers")
1850 (license license:lgpl3+)))
1852 (define-public guile-git
1853 (let ((revision "3")
1854 (commit "e156a1054cc1d9e58d9be82e36e8acf5c9f9ee8d"))
1857 (version (string-append "0.0-" revision "." (string-take commit 7)))
1858 (home-page "https://gitlab.com/guile-git/guile-git.git")
1861 (uri (git-reference (url home-page) (commit commit)))
1864 "1vhr2bqkljy1zzdy02dky2nk1w9bd46afj5wd4gp4kr333pz4ch6"))
1865 (file-name (git-file-name name version))))
1866 (build-system gnu-build-system)
1868 `(#:phases (modify-phases %standard-phases
1869 (add-after 'unpack 'bootstrap
1871 (zero? (system* "autoreconf" "-vfi"))))
1873 ;; FIXME: On i686, bytestructures miscalculates the offset
1874 ;; of the 'old-file' and 'new-file' fields within the
1875 ;; '%diff-delta' structure.
1876 ,@(if (string=? (%current-system) "x86_64-linux")
1878 '((add-before 'check 'skip-tests
1880 (substitute* "Makefile"
1881 (("tests/status\\.scm")
1885 `(("autoconf" ,autoconf)
1886 ("automake" ,automake)
1887 ("texinfo" ,texinfo)
1888 ("pkg-config" ,pkg-config)))
1890 `(("guile" ,guile-2.2)
1891 ("libgit2" ,libgit2)))
1893 `(("guile-bytestructures" ,guile-bytestructures)))
1894 (synopsis "Guile bindings for libgit2")
1896 "This package provides Guile bindings to libgit2, a library to
1897 manipulate repositories of the Git version control system.")
1898 (license license:gpl3+))))
1900 (define-public guile2.0-git
1901 (package-for-guile-2.0 guile-git))
1903 (define-public guile-syntax-highlight
1904 (let ((commit "a047675e66861b647426372aa2ba7820f749616d")
1907 (name "guile-syntax-highlight")
1908 (version (string-append "0.0." revision "."
1909 (string-take commit 7)))
1913 (url "git://dthompson.us/guile-syntax-highlight.git")
1917 "1zjr6sg3n7xbdsliy45i39dqanxvcms58ayx36wxrz72zpq58vq3"))))
1918 (build-system gnu-build-system)
1920 '(#:phases (modify-phases %standard-phases
1921 (add-after 'unpack 'bootstrap
1923 (zero? (system* "sh" "bootstrap")))))))
1925 `(("autoconf" ,autoconf)
1926 ("automake" ,automake)
1927 ("pkg-config" ,pkg-config)))
1929 `(("guile" ,guile-2.2)))
1930 (synopsis "General-purpose syntax highlighter for GNU Guile")
1931 (description "Guile-syntax-highlight is a general-purpose syntax
1932 highlighting library for GNU Guile. It can parse code written in various
1933 programming languages into a simple s-expression that can be converted to
1934 HTML (via SXML) or any other format for rendering.")
1935 (home-page "http://dthompson.us/software/guile-syntax-highlight")
1936 (license license:lgpl3+))))
1938 (define-public guile-sjson
1940 (name "guile-sjson")
1944 (uri (string-append "https://dustycloud.org/misc/sjson-" version
1948 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
1949 (build-system gnu-build-system)
1952 (modify-phases %standard-phases
1953 (add-after 'unpack 'bootstrap
1954 (lambda _ (zero? (system* "sh" "bootstrap.sh")))))))
1956 `(("autoconf" ,autoconf)
1957 ("automake" ,automake)
1958 ("pkg-config" ,pkg-config)))
1960 `(("guile" ,guile-2.2)))
1961 (home-page "https://gitlab.com/dustyweb/guile-sjson")
1962 (synopsis "S-expression based json reader/writer for Guile")
1963 (description "guile-sjson is a json reader/writer for Guile.
1964 It has a nice, simple s-expression based syntax.")
1965 (license license:lgpl3+)))
1967 ;;; guile.scm ends here