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 Alex Kost <alezost@gmail.com>
10 ;;; Copyright © 2016 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>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages guile)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages aspell)
34 #:use-module (gnu packages bash)
35 #:use-module (gnu packages bdw-gc)
36 #:use-module (gnu packages gawk)
37 #:use-module (gnu packages gperf)
38 #:use-module (gnu packages libffi)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages libunistring)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages m4)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages readline)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages ed)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages texinfo)
51 #:use-module (gnu packages man)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages databases)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages sdl)
57 #:use-module (gnu packages maths)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages version-control)
60 #:use-module (gnu packages xdisorg)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages zip)
63 #:use-module (guix packages)
64 #:use-module (guix download)
65 #:use-module (guix git-download)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system trivial)
68 #:use-module (guix utils)
69 #:use-module (ice-9 match))
73 ;;; GNU Guile, and modules and extensions.
77 (define-public guile-1.8
83 (uri (string-append "mirror://gnu/guile/guile-" version
87 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
88 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
89 (build-system gnu-build-system)
90 (arguments '(#:configure-flags '("--disable-error-on-warning")
92 ;; Insert a phase before `configure' to patch things up.
93 #:phases (alist-cons-before
96 (lambda* (#:key outputs #:allow-other-keys)
97 ;; Add a call to `lt_dladdsearchdir' so that
98 ;; `libguile-readline.so' & co. are in the
99 ;; loader's search path.
100 (substitute* "libguile/dynl.c"
101 (("lt_dlinit.*$" match)
103 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
105 (assoc-ref outputs "out"))))
107 ;; The usual /bin/sh...
108 (substitute* "ice-9/popen.scm"
109 (("/bin/sh") (which "sh"))))
111 (inputs `(("gawk" ,gawk)
112 ("readline" ,readline)))
114 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
116 (propagated-inputs `(("gmp" ,gmp)
117 ("libltdl" ,libltdl)))
119 ;; When cross-compiling, a native version of Guile itself is needed.
120 (self-native-input? #t)
123 (list (search-path-specification
124 (variable "GUILE_LOAD_PATH")
125 (files '("share/guile/site")))))
127 (synopsis "Scheme implementation intended especially for extensions")
129 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
130 official extension language of the GNU system. It is an implementation of
131 the Scheme language which can be easily embedded in other applications to
132 provide a convenient means of extending the functionality of the application
133 without requiring the source code to be rewritten.")
134 (home-page "https://www.gnu.org/software/guile/")
135 (license license:lgpl2.0+)))
137 (define-public guile-2.0
143 (uri (string-append "mirror://gnu/guile/guile-" version
147 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
148 (build-system gnu-build-system)
149 (native-inputs `(("pkgconfig" ,pkg-config)))
150 (inputs `(("libffi" ,libffi)
151 ("readline" ,readline)
152 ,@(libiconv-if-needed)
153 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
155 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
156 ;; reads `-lltdl -lunistring', adding them here will add the needed
157 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
158 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
159 ("libunistring" ,libunistring)
161 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
162 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
165 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
166 ;; must be propagated.
170 (self-native-input? #t)
172 (outputs '("out" "debug"))
175 `(#:configure-flags '("--disable-static") ;saves 3MiB
176 #:phases (alist-cons-before
177 'configure 'pre-configure
178 (lambda* (#:key inputs #:allow-other-keys)
179 ;; Tell (ice-9 popen) the file name of Bash.
180 (let ((bash (assoc-ref inputs "bash")))
181 (substitute* "module/ice-9/popen.scm"
182 ;; If bash is #f allow fallback for user to provide
183 ;; "bash" in PATH. This happens when cross-building to
184 ;; MinGW for which we do not have Bash yet.
186 ,@(if (target-mingw?)
188 (string-append bash "/bin/bash")
190 '((string-append bash "/bin/bash")))))))
194 (list (search-path-specification
195 (variable "GUILE_LOAD_PATH")
196 (files '("share/guile/site/2.0")))
197 (search-path-specification
198 (variable "GUILE_LOAD_COMPILED_PATH")
199 (files '("lib/guile/2.0/site-ccache"
200 "share/guile/site/2.0")))))
202 (synopsis "Scheme implementation intended especially for extensions")
204 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
205 official extension language of the GNU system. It is an implementation of
206 the Scheme language which can be easily embedded in other applications to
207 provide a convenient means of extending the functionality of the application
208 without requiring the source code to be rewritten.")
209 (home-page "https://www.gnu.org/software/guile/")
210 (license license:lgpl3+)))
212 (define-public guile-2.0/fixed
213 ;; A package of Guile 2.0 that's rarely changed. It is the one used
214 ;; in the `base' module, and thus changing it entails a full rebuild.
217 (properties '((hidden? . #t))) ;people should install 'guile-2.0'
220 (define-public guile-2.2
221 (package (inherit guile-2.0)
227 (uri (string-append "mirror://gnu/guile/guile-" version
231 "083vp6754dp4d5pvcy4bqvxq60cayf92v5slf5cgij8bnvixgyvr"))
232 (modules '((guix build utils)))
234 ;; Remove the pre-built object files. Instead, build everything
235 ;; from source, at the expense of significantly longer build
236 ;; times (almost 3 hours on a 4-core Intel i5).
237 (snippet '(for-each delete-file
238 (find-files "prebuilt" "\\.go$")))))
239 (properties '((timeout . 72000) ;20 hours
240 (max-silent-time . 10800))) ;3 hours (needed on ARM)
242 (list (search-path-specification
243 (variable "GUILE_LOAD_PATH")
244 (files '("share/guile/site/2.2")))
245 (search-path-specification
246 (variable "GUILE_LOAD_COMPILED_PATH")
247 (files '("lib/guile/2.2/site-ccache"
248 "share/guile/site/2.2")))))))
250 (define-public guile-next
251 (deprecated-package "guile-next" guile-2.2))
253 (define (guile-variant-package-name prefix)
255 "Return NAME with PREFIX instead of \"guile-\", when applicable."
256 (if (string-prefix? "guile-" name)
257 (string-append prefix "-"
259 (string-length "guile-")))
262 (define package-for-guile-2.2
263 ;; A procedure that rewrites the dependency tree of the given package to use
264 ;; GUILE-2.2 instead of GUILE-2.0.
265 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
266 (guile-variant-package-name "guile2.2")))
268 (define package-for-guile-2.0
269 ;; Likewise, but the other way around. :-)
270 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
271 (guile-variant-package-name "guile2.0")))
273 (define-public guile-for-guile-emacs
274 (package (inherit guile-2.2)
275 (name "guile-for-guile-emacs")
276 (version "20150510.d8d9a8d")
280 (url "git://git.hcoop.net/git/bpt/guile.git")
281 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
284 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
286 (substitute-keyword-arguments `(;; Tests aren't passing for now.
287 ;; Obviously we should re-enable this!
289 ,@(package-arguments guile-2.2))
291 `(modify-phases ,phases
292 (add-after 'unpack 'autogen
294 (zero? (system* "sh" "autogen.sh"))))
295 (add-before 'autogen 'patch-/bin/sh
297 (substitute* "build-aux/git-version-gen"
298 (("#!/bin/sh") (string-append "#!" (which "sh"))))
301 `(("autoconf" ,autoconf)
302 ("automake" ,automake)
306 ("gettext" ,gettext-minimal)
307 ,@(package-native-inputs guile-2.2)))
308 ;; Same as in guile-2.0
310 (list (search-path-specification
311 (variable "GUILE_LOAD_PATH")
312 (files '("share/guile/site/2.0")))
313 (search-path-specification
314 (variable "GUILE_LOAD_COMPILED_PATH")
315 (files '("lib/guile/2.0/site-ccache"
316 "share/guile/site/2.0")))))))
318 ;; There has not been any release yet.
319 (define-public guildhall
320 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
324 (version (string-append "0-" revision "." (string-take commit 9)))
328 (url "https://github.com/ijp/guildhall.git")
330 (file-name (string-append name "-" version "-checkout"))
333 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
334 (build-system gnu-build-system)
337 (modify-phases %standard-phases
338 ;; Tests fail without this fix because they try to load the bash
339 ;; executable as a Scheme file. See bug report at
340 ;; https://github.com/ijp/guildhall/issues/22
341 (add-after 'unpack 'fix-bug-22
343 (substitute* "Makefile.am"
344 (("TESTS_ENVIRONMENT=.*")
345 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
346 TEST_EXTENSIONS = .scm
347 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
348 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
349 ;; FIXME: one of the database tests fails for unknown
350 ;; reasons. It does not fail when run outside of Guix.
351 (("tests/database.scm") ""))
353 (add-before 'configure 'autogen
355 (zero? (system* "sh" "autogen.sh")))))))
357 `(("guile" ,guile-2.0)))
359 `(("zip" ,zip) ; for tests
360 ("autoconf" ,autoconf)
361 ("automake" ,automake)
362 ("texinfo" ,texinfo)))
363 (synopsis "Package manager for Guile")
365 "Guildhall is a package manager written for Guile Scheme. A guild is
366 an association of independent craftspeople. A guildhall is where they meet.
367 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
370 On a practical level, Guildhall lets you share Scheme modules and programs
371 over the internet, and install code that has been shared by others. Guildhall
372 can handle dependencies, so when a program requires several libraries, and
373 each of those has further dependencies, all of the prerequisites for the
374 program can be installed in one go.")
375 (home-page "https://github.com/ijp/guildhall")
376 (license license:gpl3+))))
383 (define-public artanis
389 (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
393 "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
394 (patches (search-patches "artanis-fix-Makefile.in.patch"))))
395 (build-system gnu-build-system)
396 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
397 (inputs `(("guile" ,guile-2.0)))
398 (native-inputs `(("bash" ,bash) ;for the `source' builtin
399 ("pkgconfig" ,pkg-config)
400 ("util-linux" ,util-linux))) ;for the `script' command
403 ;; TODO: The documentation must be built with the `docs' target.
404 (let* ((out (assoc-ref %outputs "out"))
405 (dir (string-append out "/share/guile/site/2.0")))
406 ;; Don't use (%site-dir) for site paths.
407 (list (string-append "MOD_PATH=" dir)
408 (string-append "MOD_COMPILED_PATH=" dir)))
411 (modify-phases %standard-phases
413 'install 'substitute-root-dir
414 (lambda* (#:key outputs #:allow-other-keys)
415 (let ((out (assoc-ref outputs "out")))
416 (substitute* "Makefile" ;ignore the execution of bash.bashrc
417 ((" /etc/bash.bashrc") " /dev/null"))
418 (substitute* "Makefile" ;set the root of config files to OUT
419 ((" /etc") (string-append " " out "/etc")))
420 (mkdir-p (string-append out "/bin")) ;for the `art' executable
422 (synopsis "Web application framework written in Guile")
423 (description "GNU Artanis is a web application framework written in Guile
424 Scheme. A web application framework (WAF) is a software framework that is
425 designed to support the development of dynamic websites, web applications, web
426 services and web resources. The framework aims to alleviate the overhead
427 associated with common activities performed in web development. Artanis
428 provides several tools for web development: database access, templating
429 frameworks, session management, URL-remapping for RESTful, page caching, and
431 (home-page "https://www.gnu.org/software/artanis/")
432 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
434 (define-public guile-reader
436 (name "guile-reader")
440 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
444 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
445 (build-system gnu-build-system)
446 (native-inputs `(("pkgconfig" ,pkg-config)
447 ("gperf" ,gperf-3.0)))
448 (inputs `(("guile" ,guile-2.2)))
449 (synopsis "Framework for building readers for GNU Guile")
451 "Guile-Reader is a simple framework for building readers for GNU Guile.
453 The idea is to make it easy to build procedures that extend Guile’s read
454 procedure. Readers supporting various syntax variants can easily be written,
455 possibly by re-using existing “token readers” of a standard Scheme
456 readers. For example, it is used to implement Skribilo’s R5RS-derived
459 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
460 hopefully more powerful and flexible (for instance, one may instantiate as
461 many readers as needed).")
462 (home-page "http://www.nongnu.org/guile-reader/")
463 (license license:gpl3+)))
465 (define-public guile2.0-reader
466 (package-for-guile-2.0 guile-reader))
467 (define-public guile2.2-reader
468 (deprecated-package "guile2.2-reader" guile-reader))
470 (define-public guile-ncurses
472 (name "guile-ncurses")
476 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
480 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
481 (build-system gnu-build-system)
482 (inputs `(("ncurses" ,ncurses)
483 ("guile" ,guile-2.0)))
484 (native-inputs `(("pkg-config" ,pkg-config)))
486 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
487 "--with-gnu-filesystem-hierarchy")
489 (modify-phases %standard-phases
490 (add-before 'build 'fix-libguile-ncurses-file-name
491 (lambda* (#:key outputs #:allow-other-keys)
492 (and (zero? (system* "make" "install"
495 (parallel-job-count))))
496 (let* ((out (assoc-ref outputs "out"))
498 (files (find-files dir ".scm")))
500 (("\"libguile-ncurses\"")
501 (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
504 (home-page "https://www.gnu.org/software/guile-ncurses/")
505 (synopsis "Guile bindings to ncurses")
507 "guile-ncurses provides Guile language bindings for the ncurses
509 (license license:lgpl3+)))
517 (uri (string-append "mirror://gnu/mcron/mcron-"
521 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
522 (patches (search-patches "mcron-install.patch"))))
523 (build-system gnu-build-system)
524 (native-inputs `(("pkg-config" ,pkg-config)))
525 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
526 (home-page "https://www.gnu.org/software/mcron/")
527 (synopsis "Run jobs at scheduled times")
529 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
530 tasks on a schedule, such as every hour or every Monday. Mcron is written in
531 Guile, so its configuration can be written in Scheme; the original cron
532 format is also supported.")
533 (license license:gpl3+)))
535 (define-public mcron2
536 ;; This is mthl's mcron development branch, not yet merged in mcron.
537 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
541 (version (string-append (package-version mcron) "-0."
542 (string-take commit 7)))
546 (url "https://notabug.org/mthl/mcron/")
550 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
551 (file-name (string-append name "-" version "-checkout"))))
553 `(("autoconf" ,autoconf)
554 ("automake" ,automake)
555 ("pkg-config" ,pkg-config)
557 ("help2man" ,help2man)))
559 `(#:modules ((ice-9 match) (ice-9 ftw)
560 ,@%gnu-build-system-modules)
562 #:phases (modify-phases %standard-phases
563 (add-after 'unpack 'bootstrap
565 (zero? (system* "autoreconf" "-vfi"))))
566 (add-after 'install 'wrap-mcron
567 (lambda* (#:key outputs #:allow-other-keys)
568 ;; Wrap the 'mcron' command to refer to the right
570 (let* ((out (assoc-ref outputs "out"))
571 (bin (string-append out "/bin"))
573 out "/share/guile/site")))
574 (match (scandir site)
576 (let ((modules (string-append site "/" version)))
577 (wrap-program (string-append bin "/mcron")
578 `("GUILE_LOAD_PATH" ":" prefix
580 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
584 (define-public guile-ics
591 (url "https://github.com/artyom-poptsov/guile-ics")
593 (file-name (string-append name "-" version "-checkout"))
596 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
597 (build-system gnu-build-system)
599 '(#:phases (modify-phases %standard-phases
600 (add-before 'configure 'autoreconf
602 ;; Repository comes with a broken symlink
603 (delete-file "README")
604 (symlink "README.org" "README")
605 (zero? (system* "autoreconf" "-fi")))))))
607 `(("autoconf" ,(autoconf-wrapper))
608 ("automake" ,automake)
610 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
611 ("gettext" ,gettext-minimal)
612 ("pkg-config" ,pkg-config)))
613 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
614 (propagated-inputs `(("guile-lib" ,guile-lib)))
615 (home-page "https://github.com/artyom-poptsov/guile-ics")
616 (synopsis "Guile parser library for the iCalendar format")
618 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
619 pure Scheme. The library can be used to read and write iCalendar data.
621 The library is shipped with documentation in Info format and usage examples.")
622 (license license:gpl3+)))
624 (define-public guile-lib
630 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
634 "1qbk485djgxqrbfjvk4b7w7y4x9xygf2qb8dqnl7885kajasx8qg"))))
635 (build-system gnu-build-system)
638 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
640 (modify-phases %standard-phases
641 (add-before 'configure 'patch-module-dir
643 (substitute* "src/Makefile.in"
644 (("^moddir = ([[:graph:]]+)")
645 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
646 (("^godir = ([[:graph:]]+)")
648 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
650 (native-inputs `(("pkg-config" ,pkg-config)))
651 (inputs `(("guile" ,guile-2.0)))
652 (home-page "http://www.nongnu.org/guile-lib/")
653 (synopsis "Collection of useful Guile Scheme modules")
655 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
656 modules, allowing for people to cooperate integrating their generic Guile
657 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
660 ;; The whole is under GPLv3+, but some modules are under laxer
661 ;; distribution terms such as LGPL and public domain. See `COPYING' for
663 (license license:gpl3+)))
665 (define-public guile2.2-lib
666 (package-for-guile-2.2 guile-lib))
668 (define-public guile-json
674 (uri (string-append "mirror://savannah/guile-json/guile-json-"
678 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
679 (modules '((guix build utils)))
681 ;; Make sure everything goes under .../site/X.Y, like Guile's
682 ;; search paths expects.
684 (substitute* "configure"
686 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
687 (substitute* '("Makefile.in" "json/Makefile.in")
688 (("moddir =.*/share/guile/site" all)
689 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
690 (build-system gnu-build-system)
691 (native-inputs `(("guile" ,guile-2.0)))
692 (home-page "http://savannah.nongnu.org/projects/guile-json/")
693 (synopsis "JSON module for Guile")
695 "Guile-JSON supports parsing and building JSON documents according to the
696 specification. These are the main features:
699 @item Strictly complies to @uref{http://json.org, specification}.
700 @item Build JSON documents programmatically via macros.
701 @item Unicode support for strings.
702 @item Allows JSON pretty printing.
704 (license license:lgpl3+)))
706 (define-public guile2.2-json
707 (package-for-guile-2.2 guile-json))
709 (define-public guile-minikanren
711 (name "guile-minikanren")
712 (version "20150424.e844d85")
716 (url "https://github.com/ijp/minikanren.git")
717 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
718 (file-name (string-append name "-" version "-checkout"))
721 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
722 (build-system trivial-build-system)
724 `(#:modules ((guix build utils))
727 (use-modules (guix build utils)
732 (let* ((out (assoc-ref %outputs "out"))
733 (guile (assoc-ref %build-inputs "guile"))
734 (effective (read-line
735 (open-pipe* OPEN_READ
736 (string-append guile "/bin/guile")
737 "-c" "(display (effective-version))")))
738 (module-dir (string-append out "/share/guile/site/"
740 (source (assoc-ref %build-inputs "source"))
741 (doc (string-append out "/share/doc/guile-minikanren"))
742 (scm-files '("minikanren.scm"
743 "minikanren/mkextraforms.scm"
744 "minikanren/mkprelude.scm"
745 "minikanren/mk.scm"))
746 (guild (string-append (assoc-ref %build-inputs "guile")
748 ;; Make installation directories.
749 (mkdir-p (string-append module-dir "/minikanren"))
752 ;; Compile .scm files and install.
754 (setenv "GUILE_AUTO_COMPILE" "0")
755 (for-each (lambda (file)
756 (let* ((dest-file (string-append module-dir "/"
758 (go-file (match (string-split file #\.)
760 (string-append module-dir "/"
762 ;; Install source module.
763 (copy-file file dest-file)
764 ;; Install compiled module.
765 (unless (zero? (system* guild "compile"
769 (error (format #f "Failed to compile ~s to ~s!"
773 ;; Also copy over the README.
774 (install-file "README.org" doc)
777 `(("guile" ,guile-2.0)))
778 (home-page "https://github.com/ijp/minikanren")
779 (synopsis "MiniKanren declarative logic system, packaged for Guile")
781 "MiniKanren is a relational programming extension to the Scheme
782 programming Language, written as a smaller version of Kanren suitable for
783 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
784 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
786 This is Ian Price's r6rs packaged version of miniKanren, which deviates
787 slightly from miniKanren mainline.
789 See http://minikanren.org/ for more on miniKanren generally.")
790 (license license:expat)))
792 (define-public guile2.2-minikanren
793 (package-for-guile-2.2 guile-minikanren))
795 (define-public guile-irregex
797 (name "guile-irregex")
802 "http://synthcode.com/scheme/irregex/irregex-"
806 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
807 (build-system gnu-build-system)
809 `(#:modules ((guix build utils)
813 (guix build gnu-build-system))
815 (modify-phases %standard-phases
820 (lambda* (#:key inputs outputs #:allow-other-keys)
821 (let* ((out (assoc-ref outputs "out"))
822 (effective (read-line
823 (open-pipe* OPEN_READ
825 "(display (effective-version))")))
826 (module-dir (string-append out "/share/guile/site/"
828 (source (assoc-ref inputs "source"))
829 (doc (string-append out "/share/doc/guile-irregex/"))
830 (guild (string-append (assoc-ref %build-inputs "guile")
832 ;; Make installation directories.
833 (mkdir-p (string-append module-dir "/rx/source"))
836 ;; Compile .scm files and install.
837 (setenv "GUILE_AUTO_COMPILE" "0")
839 (for-each (lambda (copy-info)
841 ((src-file dest-file-basis)
842 (let* ((dest-file (string-append
843 module-dir dest-file-basis
845 (go-file (string-append
846 module-dir dest-file-basis
848 ;; Install source module.
851 ;; Install compiled module.
852 (unless (zero? (system* guild "compile"
856 (error (format #f "Failed to compile ~s to ~s!"
857 src-file dest-file)))))))
858 '(("irregex-guile.scm" "/rx/irregex")
859 ("irregex.scm" "/rx/source/irregex")
860 ;; Not really reachable via guile's packaging system,
861 ;; but nice to have around
862 ("irregex-utils.scm" "/rx/source/irregex-utils")))
864 ;; Also copy over the README.
865 (install-file "irregex.html" doc)
868 `(("guile" ,guile-2.0)))
869 (home-page "http://synthcode.com/scheme/irregex")
870 (synopsis "S-expression based regular expressions")
872 "Irregex is an s-expression based alternative to your classic
873 string-based regular expressions. It implements SRFI 115 and is deeply
874 inspired by the SCSH regular expression system.")
875 (license license:bsd-3)))
877 (define-public guile2.2-irregex
878 (package-for-guile-2.2 guile-irregex))
880 ;; There are two guile-gdbm packages, one using the FFI and one with
881 ;; direct C bindings, hence the verbose name.
883 (define-public guile-gdbm-ffi
885 (name "guile-gdbm-ffi")
886 (version "20120209.fa1d5b6")
890 (url "https://github.com/ijp/guile-gdbm.git")
891 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
892 (file-name (string-append name "-" version "-checkout"))
895 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
896 (build-system trivial-build-system)
902 (use-modules (guix build utils)
906 ;; Avoid warnings we can safely ignore
907 (setenv "GUILE_AUTO_COMPILE" "0")
909 (let* ((out (assoc-ref %outputs "out"))
912 (open-pipe* OPEN_READ
914 (assoc-ref %build-inputs "guile")
916 "-c" "(display (effective-version))")))
917 (module-dir (string-append out "/share/guile/site/"
919 (source (assoc-ref %build-inputs "source"))
920 (doc (string-append out "/share/doc"))
921 (guild (string-append (assoc-ref %build-inputs "guile")
924 (string-append module-dir "/gdbm.scm"))
926 (string-append module-dir "/gdbm.go"))
928 (lambda (in-file out-file)
929 (system* guild "compile" "-o" out-file in-file))))
930 ;; Make installation directories.
934 ;; Switch directory for compiling and installing
938 (copy-file "gdbm.scm" gdbm.scm-dest)
941 (substitute* gdbm.scm-dest
942 (("\\(dynamic-link \"libgdbm\"\\)")
943 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
944 (assoc-ref %build-inputs "gdbm"))))
946 ;; compile to the destination
947 (compile-file gdbm.scm-dest gdbm.go-dest)))))
949 `(("guile" ,guile-2.0)))
952 (home-page "https://github.com/ijp/guile-gdbm")
953 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
955 "Guile bindings to the GDBM key-value storage system, using
956 Guile's foreign function interface.")
957 (license license:gpl3+)))
959 (define-public guile2.2-gdbm-ffi
960 (package-for-guile-2.2 guile-gdbm-ffi))
962 (define-public guile-sqlite3
963 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
965 (name "guile-sqlite3")
966 (version (string-append "0.0-0." (string-take commit 7)))
968 ;; XXX: This used to be available read-only at
969 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
970 ;; eventually disappeared, so we have our own copy here.
971 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
979 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
980 (file-name (string-append name "-" version "-checkout"))
981 (modules '((guix build utils)))
983 ;; Upgrade 'Makefile.am' to the current way of doing things.
984 '(substitute* "Makefile.am"
985 (("TESTS_ENVIRONMENT")
986 "TEST_LOG_COMPILER")))))
988 (build-system gnu-build-system)
990 `(("autoconf" ,autoconf)
991 ("automake" ,automake)
992 ("pkg-config" ,pkg-config)))
994 `(("guile" ,guile-2.0)
997 '(#:phases (modify-phases %standard-phases
998 (add-before 'configure 'autoreconf
1000 (zero? (system* "autoreconf" "-vfi"))))
1001 (add-before 'build 'set-sqlite3-file-name
1002 (lambda* (#:key inputs #:allow-other-keys)
1003 (substitute* "sqlite3.scm"
1005 (string-append "\"" (assoc-ref inputs "sqlite")
1006 "/lib/libsqlite3\"")))
1008 (synopsis "Access SQLite databases from Guile")
1010 "This package provides Guile bindings to the SQLite database system.")
1011 (license license:gpl3+))))
1013 (define-public haunt
1019 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1023 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1024 (build-system gnu-build-system)
1026 `(#:modules ((ice-9 match) (ice-9 ftw)
1027 ,@%gnu-build-system-modules)
1028 #:tests? #f ; test suite is non-deterministic :(
1029 #:phases (modify-phases %standard-phases
1030 (add-after 'install 'wrap-haunt
1031 (lambda* (#:key outputs #:allow-other-keys)
1032 ;; Wrap the 'haunt' command to refer to the right
1034 (let* ((out (assoc-ref outputs "out"))
1035 (bin (string-append out "/bin"))
1036 (site (string-append
1037 out "/share/guile/site")))
1038 (match (scandir site)
1040 (let ((modules (string-append site "/" version)))
1041 (wrap-program (string-append bin "/haunt")
1042 `("GUILE_LOAD_PATH" ":" prefix
1044 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1048 `(("pkg-config" ,pkg-config)
1049 ("texinfo" ,texinfo)))
1051 `(("guile" ,guile-2.2)))
1053 `(("guile-reader" ,guile-reader)
1054 ("guile-commonmark" ,guile-commonmark)))
1055 (synopsis "Functional static site generator")
1056 (description "Haunt is a static site generator written in Guile
1057 Scheme. Haunt features a functional build system and an extensible
1058 interface for reading articles in any format.")
1059 (home-page "http://haunt.dthompson.us")
1060 (license license:gpl3+)))
1062 (define-public guile2.0-haunt
1063 (package-for-guile-2.0
1064 (package (inherit haunt) (name "guile2.0-haunt"))))
1065 (define-public guile2.2-haunt
1066 (deprecated-package "guile2.2-haunt" haunt))
1068 (define-public guile-config
1070 (name "guile-config")
1075 "http://alex.pompo.co/software/" name "-" version
1079 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1080 (build-system gnu-build-system)
1082 `(("guile" ,guile-2.0)))
1083 (synopsis "Guile application configuration parsing library")
1085 "Guile Config is a library providing a declarative approach to
1086 application configuration specification. The library provides clean
1087 configuration declaration forms, and processors that take care of:
1088 configuration file creation; configuration file parsing; command-line
1089 parameter parsing using getopt-long; basic GNU command-line parameter
1090 generation (--help, --usage, --version); automatic output generation for the
1091 above command-line parameters.")
1092 (home-page "https://github.com/a-sassmannshausen/guile-config")
1093 (license license:agpl3+)))
1095 (define-public guile-redis
1097 (name "guile-redis")
1101 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1105 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1106 (modules '((guix build utils)))
1108 ;; Make sure everything goes under .../site/X.Y, like Guile's
1109 ;; search paths expects.
1111 (substitute* "configure"
1112 (("ac_subst_vars='")
1113 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1114 (substitute* '("Makefile.in"
1116 "redis/commands/Makefile.in")
1117 (("moddir =.*/share/guile/site" all)
1118 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1119 (build-system gnu-build-system)
1121 `(("guile" ,guile-2.0)))
1122 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1123 (synopsis "Redis client library for Guile")
1124 (description "Guile-redis provides a Scheme interface to the Redis
1125 key-value cache and store.")
1126 (license license:lgpl3+)))
1128 (define-public guile2.2-redis
1129 (package-for-guile-2.2 guile-redis))
1131 (define-public guile-wisp
1137 (uri (string-append "https://bitbucket.org/ArneBab/"
1138 "wisp/downloads/wisp-"
1142 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1143 (build-system gnu-build-system)
1145 `(#:modules ((system base compile)
1146 ,@%gnu-build-system-modules)
1148 (modify-phases %standard-phases
1150 'configure 'substitute-before-config
1152 (lambda* (#:key inputs #:allow-other-keys)
1153 (let ((bash (assoc-ref inputs "bash")))
1154 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1155 (substitute* "configure"
1156 (("guile-2.0") "guile"))
1157 ;; Puts together some test files with /bin/bash hardcoded
1158 (substitute* "Makefile.in"
1160 (string-append bash "/bin/bash") ))
1163 ;; auto compilation breaks, but if we set HOME to /tmp,
1166 'check 'auto-compile-hacky-workaround
1168 (setenv "HOME" "/tmp")
1172 (lambda* (#:key outputs inputs #:allow-other-keys)
1173 (let* ((out (assoc-ref outputs "out"))
1174 (module-dir (string-append out "/share/guile/site/2.0"))
1176 (string-append module-dir "/language/wisp"))
1177 (guild (string-append (assoc-ref inputs "guile")
1179 ;; Make installation directories.
1180 (mkdir-p module-dir)
1181 (mkdir-p language-dir)
1184 (copy-file "wisp-scheme.scm"
1185 (string-append module-dir "/wisp-scheme.scm"))
1186 (copy-file "language/wisp/spec.scm"
1187 (string-append language-dir "/spec.scm"))
1189 ;; compile to the destination
1190 (compile-file "wisp-scheme.scm"
1191 #:output-file (string-append
1192 module-dir "/wisp-scheme.go"))
1193 (compile-file "language/wisp/spec.scm"
1194 #:output-file (string-append
1195 language-dir "/spec.go"))
1197 (home-page "http://draketo.de/english/wisp")
1199 `(("guile" ,guile-2.0)
1200 ("python" ,python)))
1201 (synopsis "Whitespace to lisp syntax for Guile")
1202 (description "Wisp is a syntax for Guile which provides a Python-like
1203 whitespace-significant language. It may be easier on the eyes for some
1204 users and in some situations.")
1205 (license license:gpl3+)))
1207 (define-public guile-sly
1213 (uri (string-append "https://files.dthompson.us/sly/sly-"
1217 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1218 (build-system gnu-build-system)
1221 (list (string-append "--with-libfreeimage-prefix="
1222 (assoc-ref %build-inputs "freeimage"))
1223 (string-append "--with-libgslcblas-prefix="
1224 (assoc-ref %build-inputs "gsl")))))
1226 `(("pkg-config" ,pkg-config)))
1228 `(("guile" ,guile-2.0)
1229 ("guile-sdl" ,guile-sdl)
1230 ("guile-opengl" ,guile-opengl)))
1233 ("freeimage" ,freeimage)
1235 (synopsis "2D/3D game engine for GNU Guile")
1236 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1237 features a functional reactive programming interface and live coding
1239 (home-page "http://dthompson.us/pages/software/sly.html")
1240 (license license:gpl3+)))
1242 (define-public g-wrap
1248 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1252 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1253 (build-system gnu-build-system)
1255 `(("pkg-config" ,pkg-config)))
1257 `(("guile" ,guile-2.0)
1258 ("guile-lib" ,guile-lib)))
1260 `(("libffi" ,libffi)))
1263 (modify-phases %standard-phases
1264 (add-before 'configure 'pre-configure
1265 (lambda* (#:key outputs #:allow-other-keys)
1266 (let ((out (assoc-ref outputs "out")))
1267 (substitute* (find-files "." "^Makefile.in$")
1268 (("guilemoduledir =.*guile/site" all)
1269 (string-append all "/2.0")))
1271 (synopsis "Generate C bindings for Guile")
1272 (description "G-Wrap is a tool and Guile library for generating function
1273 wrappers for inter-language calls. It currently only supports generating Guile
1274 wrappers for C functions. Given a definition of the types and prototypes for
1275 a given C interface, G-Wrap will automatically generate the C code that
1276 provides access to that interface and its types from the Scheme level.")
1277 (home-page "http://www.nongnu.org/g-wrap/index.html")
1278 (license license:lgpl2.1+)))
1280 (define-public guile-dbi
1287 "http://download.gna.org/guile-dbi/guile-dbi-"
1291 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1292 (build-system gnu-build-system)
1295 (list (string-append
1296 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1298 (modify-phases %standard-phases
1299 (add-after 'install 'patch-extension-path
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 (let* ((out (assoc-ref outputs "out"))
1302 (dbi.scm (string-append
1303 out "/share/guile/site/2.0/dbi/dbi.scm"))
1304 (ext (string-append out "/lib/libguile-dbi")))
1305 (substitute* dbi.scm (("libguile-dbi") ext))
1308 `(("guile" ,guile-2.0)))
1309 (synopsis "Guile database abstraction layer")
1310 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1312 "guile-dbi is a library for Guile that provides a convenient interface to
1313 SQL databases. Database programming with guile-dbi is generic in that the same
1314 programming interface is presented regardless of which database system is used.
1315 It currently supports MySQL, Postgres and SQLite3.")
1316 (license license:gpl2+)))
1318 (define-public guile-dbd-sqlite3
1320 (name "guile-dbd-sqlite3")
1325 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1329 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1330 (build-system gnu-build-system)
1332 `(("pkg-config" ,pkg-config)))
1334 `(("sqlite" ,sqlite)
1335 ("zlib" ,(@ (gnu packages compression) zlib))))
1337 `(("guile-dbi" ,guile-dbi)))
1338 (synopsis "Guile DBI driver for SQLite")
1339 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1341 "guile-dbi is a library for Guile that provides a convenient interface to
1342 SQL databases. This package implements the interface for SQLite.")
1343 (license license:gpl2+)))
1345 (define-public guile-xosd
1351 (uri (string-append "https://github.com/alezost/" name
1352 "/releases/download/v" version
1353 "/" name "-" version ".tar.gz"))
1356 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1357 (build-system gnu-build-system)
1359 `(("pkg-config" ,pkg-config)))
1361 `(("guile" ,guile-2.0)
1363 ("libxext" ,libxext)
1364 ("libxinerama" ,libxinerama)
1366 (home-page "https://github.com/alezost/guile-xosd")
1367 (synopsis "XOSD bindings for Guile")
1369 "Guile-XOSD provides Guile bindings for @code{libxosd},
1370 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1372 (license license:gpl3+)))
1374 (define-public guile-daemon
1376 (name "guile-daemon")
1380 (uri (string-append "https://github.com/alezost/" name
1381 "/releases/download/v" version
1382 "/" name "-" version ".tar.gz"))
1385 "0wsq9l6a4sijq4i1r3kcddfaznsak2jc5k59gzkhs5il5d2kn5yi"))))
1386 (build-system gnu-build-system)
1388 `(("pkg-config" ,pkg-config)))
1390 `(("guile" ,guile-2.0)))
1391 (home-page "https://github.com/alezost/guile-daemon")
1392 (synopsis "Evaluate code in a running Guile process")
1394 "Guile-Daemon is a small Guile program that loads your initial
1395 configuration file, and then reads and evaluates Guile expressions that
1396 you send to a FIFO file.")
1397 (license license:gpl3+)))
1399 (define-public guile-commonmark
1401 (name "guile-commonmark")
1405 (uri (string-append "https://github.com/OrangeShark/" name
1406 "/releases/download/v" version
1407 "/" name "-" version ".tar.gz"))
1410 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1411 (modules '((guix build utils)))
1413 ;; Use the real effective version of Guile in directory names
1414 ;; instead of a hard-coded "/2.0".
1416 (substitute* "configure"
1417 (("ac_subst_vars='")
1418 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1419 (substitute* "Makefile.in"
1421 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1422 (build-system gnu-build-system)
1424 `(("guile" ,guile-2.2)))
1425 (synopsis "CommonMark parser for Guile")
1427 "guile-commonmark is a library for parsing CommonMark, a fully specified
1428 variant of Markdown. The library is written in Guile Scheme and is designed
1429 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1430 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1431 is no support for parsing block and inline level HTML.")
1432 (home-page "https://github.com/OrangeShark/guile-commonmark")
1433 (license license:lgpl3+)))
1435 (define-public guile2.0-commonmark
1436 (package-for-guile-2.0 guile-commonmark))
1437 (define-public guile2.2-commonmark
1438 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1440 (define-public guile-bytestructures
1442 (name "guile-bytestructures")
1443 (version "20160726.53127f6")
1447 (url "https://github.com/TaylanUB/scheme-bytestructures")
1448 (commit "53127f608caf64b34fa41c389b2743b546fbe9da")))
1449 (file-name (string-append name "-" version "-checkout"))
1452 "0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq"))))
1453 (build-system trivial-build-system)
1455 `(#:modules ((guix build utils))
1458 (use-modules (guix build utils)
1462 (let* ((out (assoc-ref %outputs "out"))
1463 (guile (assoc-ref %build-inputs "guile"))
1464 (effective (read-line
1465 (open-pipe* OPEN_READ
1466 (string-append guile "/bin/guile")
1467 "-c" "(display (effective-version))")))
1468 (module-dir (string-append out "/share/guile/site/"
1470 (source (assoc-ref %build-inputs "source"))
1471 (doc (string-append out "/share/doc/scheme-bytestructures"))
1472 (scm-files (filter (lambda (path)
1473 (not (string-prefix? "bytestructures/r7" path)))
1474 (with-directory-excursion source
1475 (find-files "bytestructures" "\\.scm$"))))
1476 (guild (string-append (assoc-ref %build-inputs "guile")
1478 ;; Make installation directories.
1481 ;; Compile .scm files and install.
1483 (setenv "GUILE_AUTO_COMPILE" "0")
1484 (for-each (lambda (file)
1485 (let* ((dest-file (string-append module-dir "/"
1487 (go-file (string-append module-dir "/"
1489 (string-rindex file #\.))
1491 ;; Install source module.
1492 (mkdir-p (dirname dest-file))
1493 (copy-file file dest-file)
1495 ;; Install compiled module.
1496 (mkdir-p (dirname go-file))
1497 (unless (zero? (system* guild "compile"
1501 (error (format #f "Failed to compile ~s to ~s!"
1505 ;; Also copy over the README.
1506 (install-file "README.md" doc)
1509 `(("guile" ,guile-2.2)))
1510 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1511 (synopsis "Structured access to bytevector contents for Guile")
1513 "Guile bytestructures offers a system imitating the type system
1514 of the C programming language, to be used on bytevectors. C's type
1515 system works on raw memory, and Guile works on bytevectors which are
1516 an abstraction over raw memory. It's also more powerful than the C
1517 type system, elevating types to first-class status.")
1518 (license license:gpl3+)))
1520 (define-public guile-aspell
1522 (name "guile-aspell")
1527 "http://lonelycactus.com/tarball/guile_aspell-"
1531 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1532 (build-system gnu-build-system)
1534 '(#:phases (modify-phases %standard-phases
1535 (add-before 'configure 'set-guilesitedir
1537 (substitute* "Makefile.in"
1538 (("^guilesitedir =.*$")
1540 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1542 (add-before 'build 'set-libaspell-file-name
1543 (lambda* (#:key inputs #:allow-other-keys)
1544 (let ((aspell (assoc-ref inputs "aspell")))
1545 (substitute* "aspell.scm"
1546 (("\"libaspell\\.so\"")
1547 (string-append "\"" aspell
1548 "/lib/libaspell\"")))
1550 (native-inputs `(("pkg-config" ,pkg-config)))
1551 (inputs `(("guile" ,guile-2.2)
1552 ("aspell" ,aspell)))
1553 (home-page "https://github.com/spk121/guile-aspell")
1554 (synopsis "Spell-checking from Guile")
1556 "guile-aspell is a Guile Scheme library for comparing a string against a
1557 dictionary and suggesting spelling corrections.")
1558 (license license:gpl3+)))
1560 (define-public guile-bash
1561 ;; This project is currently retired. It was initially announced here:
1562 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1563 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1567 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1569 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1577 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1578 (file-name (string-append name "-" version "-checkout"))))
1579 (build-system gnu-build-system)
1581 '(#:phases (modify-phases %standard-phases
1582 (add-after 'unpack 'bootstrap
1584 (zero? (system* "sh" "bootstrap")))))
1587 ;; Add -I to match 'bash.pc' of Bash 4.4.
1588 (list (string-append "CPPFLAGS=-I"
1589 (assoc-ref %build-inputs "bash:include")
1590 "/include/bash/include")
1592 ;; The '.a' file is useless.
1595 ;; Install 'lib/bash' as Bash 4.4 expects.
1596 (string-append "--libdir=" (assoc-ref %outputs "out")
1598 (native-inputs `(("pkg-config" ,pkg-config)
1599 ("autoconf" ,(autoconf-wrapper))
1600 ("automake" ,automake)
1601 ("libtool" ,libtool)
1602 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1603 ("gettext" ,gettext-minimal)))
1604 (inputs `(("guile" ,guile-2.0)
1605 ("bash:include" ,bash "include")))
1606 (synopsis "Extend Bash using Guile")
1608 "Guile-Bash provides a shared library and set of Guile modules,
1609 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1610 the following aspects of Bash:
1614 @item setting and getting Bash variables;
1615 @item creating dynamic variables;
1616 @item creating Bash functions with a Scheme implementation;
1617 @item reader macro for output capturing;
1618 @item reader macro for evaluating raw Bash commands.
1624 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1627 and then run @command{scm example.scm}.")
1628 (license license:gpl3+))))
1630 (define-public guile-8sync
1632 (name "guile-8sync")
1636 (uri (string-append "mirror://gnu/8sync/8sync-" version
1640 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1641 (build-system gnu-build-system)
1642 (native-inputs `(("autoconf" ,autoconf)
1643 ("automake" ,automake)
1644 ("guile" ,guile-2.2)
1645 ("pkg-config" ,pkg-config)
1646 ("texinfo" ,texinfo)))
1648 `(#:phases (modify-phases %standard-phases
1649 (add-before 'configure 'setenv
1652 (setenv "GUILE_AUTO_COMPILE" "0")
1654 (home-page "https://gnu.org/s/8sync/")
1655 (synopsis "Asynchronous actor model library for Guile")
1657 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1658 library for GNU Guile based on the actor model.
1660 Note that 8sync is only available for Guile 2.2.")
1661 (license license:lgpl3+)))
1663 (define-public guile-fibers
1665 (name "guile-fibers")
1669 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1673 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1674 (build-system gnu-build-system)
1676 `(("texinfo" ,texinfo)
1677 ("pkg-config" ,pkg-config)))
1679 `(("guile" ,guile-2.2)))
1680 (synopsis "Lightweight concurrency facility for Guile")
1682 "Fibers is a Guile library that implements a a lightweight concurrency
1683 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1684 like a \"goroutine\" from the Go language: a lightweight thread-like
1685 abstraction. Systems built with Fibers can scale up to millions of concurrent
1686 fibers, tens of thousands of concurrent socket connections, and many parallel
1687 cores. The Fibers library also provides Concurrent ML-like channels for
1688 communication between fibers.
1690 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1691 is not available for Guile 2.0.")
1692 (home-page "https://github.com/wingo/fibers")
1693 (license license:lgpl3+)))
1695 (define-public guile-git
1696 (let ((revision "1")
1697 (commit "96dfb3bdba39a37cf6aefb18e335118a6115f963"))
1700 (version (string-append "0.0-" revision "." (string-take commit 7)))
1701 (home-page "https://gitlab.com/amirouche/guile-git")
1704 (uri (git-reference (url home-page) (commit commit)))
1707 "0v73251kmh1vs7gp3jh4pk4rikl4d8illwi0gnhwa55ij1mn9apl"))
1708 (file-name (git-file-name name version))))
1709 (build-system gnu-build-system)
1711 '(#:phases (modify-phases %standard-phases
1712 (add-after 'unpack 'bootstrap
1714 ;; Install .go files to "site-ccache", not "ccache".
1715 (substitute* "Makefile.am"
1719 (zero? (system* "autoreconf" "-vfi")))))))
1721 `(("autoconf" ,autoconf)
1722 ("automake" ,automake)
1723 ("pkg-config" ,pkg-config)))
1725 `(("guile" ,guile-2.2)
1726 ("libgit2" ,libgit2)))
1728 `(("guile-bytestructures" ,guile-bytestructures)))
1729 (synopsis "Guile bindings for libgit2")
1731 "This package provides Guile bindings to libgit2, a library to
1732 manipulate repositories of the Git version control system.")
1733 (license license:gpl3+))))
1735 ;;; guile.scm ends here