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 "http://www.gnu.org/software/guile/")
135 (license license:lgpl2.0+)))
137 (define-public guile-2.0
141 (replacement guile-2.0.13) ;CVE-2016-8606 and CVE-2016-8605
144 (uri (string-append "mirror://gnu/guile/guile-" version
148 "1sdpjq0jf1h65w29q0zprj4x6kdp5jskkvbnlwphy9lvdxrqg0fy"))))
149 (build-system gnu-build-system)
150 (native-inputs `(("pkgconfig" ,pkg-config)))
151 (inputs `(("libffi" ,libffi)
152 ("readline" ,readline)
153 ,@(libiconv-if-needed)
154 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
156 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
157 ;; reads `-lltdl -lunistring', adding them here will add the needed
158 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
159 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
160 ("libunistring" ,libunistring)
162 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
163 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
166 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
167 ;; must be propagated.
171 (self-native-input? #t)
173 (outputs '("out" "debug"))
176 `(#:configure-flags '("--disable-static") ;saves 3MiB
177 #:phases (alist-cons-before
178 'configure 'pre-configure
179 (lambda* (#:key inputs #:allow-other-keys)
180 ;; Tell (ice-9 popen) the file name of Bash.
181 (let ((bash (assoc-ref inputs "bash")))
182 (substitute* "module/ice-9/popen.scm"
183 ;; If bash is #f allow fallback for user to provide
184 ;; "bash" in PATH. This happens when cross-building to
185 ;; MinGW for which we do not have Bash yet.
187 ,@(if (target-mingw?)
189 (string-append bash "/bin/bash")
191 '((string-append bash "/bin/bash")))))))
195 (list (search-path-specification
196 (variable "GUILE_LOAD_PATH")
197 (files '("share/guile/site/2.0")))
198 (search-path-specification
199 (variable "GUILE_LOAD_COMPILED_PATH")
200 (files '("lib/guile/2.0/site-ccache"
201 "share/guile/site/2.0")))))
203 (synopsis "Scheme implementation intended especially for extensions")
205 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
206 official extension language of the GNU system. It is an implementation of
207 the Scheme language which can be easily embedded in other applications to
208 provide a convenient means of extending the functionality of the application
209 without requiring the source code to be rewritten.")
210 (home-page "http://www.gnu.org/software/guile/")
211 (license license:lgpl3+)))
213 (define-public guile-2.0/fixed
214 ;; A package of Guile 2.0 that's rarely changed. It is the one used
215 ;; in the `base' module, and thus changing it entails a full rebuild.
218 (properties '((hidden? . #t))) ;people should install 'guile-2.0'
227 (uri (string-append "mirror://gnu/guile/guile-" version
231 "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p"))
232 (patches (search-patches "guile-repl-server-test.patch"))))))
234 (define-public guile-next
235 (package (inherit guile-2.0)
241 (uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-"
245 "0rh9vahqqwbyj79p1lc9pljkgxg8rczczf074dr8wl13j5h0y27m"))
246 (modules '((guix build utils)))
248 ;; Remove the pre-built object files. Instead, build everything
249 ;; from source, at the expense of significantly longer build
250 ;; times (almost 3 hours on a 4-core Intel i5).
251 (snippet '(for-each delete-file
252 (find-files "prebuilt" "\\.go$")))))
253 (synopsis "Snapshot of what will become version 2.2 of GNU Guile")
254 (properties '((timeout . 72000) ;20 hours
255 (max-silent-time . 10800) ;3 hours (needed on ARM)
256 (upstream-name . "guile")
257 (ftp-server . "alpha.gnu.org")
258 (ftp-directory . "/gnu/guile")))
260 (list (search-path-specification
261 (variable "GUILE_LOAD_PATH")
262 (files '("share/guile/site/2.2")))
263 (search-path-specification
264 (variable "GUILE_LOAD_COMPILED_PATH")
265 (files '("lib/guile/2.2/site-ccache"
266 "share/guile/site/2.2")))))))
268 (define (guile-2.2-package-name name)
269 "Return NAME with a \"guile2.2-\" prefix instead of \"guile-\", when
271 (if (string-prefix? "guile-" name)
272 (string-append "guile2.2-"
274 (string-length "guile-")))
277 (define package-for-guile-2.2
278 ;; A procedure that rewrites the dependency tree of the given package to use
279 ;; GUILE-NEXT instead of GUILE-2.0.
280 (package-input-rewriting `((,guile-2.0 . ,guile-next))
281 guile-2.2-package-name))
283 (define-public guile-for-guile-emacs
284 (package (inherit guile-next)
285 (name "guile-for-guile-emacs")
286 (version "20150510.d8d9a8d")
290 (url "git://git.hcoop.net/git/bpt/guile.git")
291 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
294 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
296 (substitute-keyword-arguments `(;; Tests aren't passing for now.
297 ;; Obviously we should re-enable this!
299 ,@(package-arguments guile-next))
301 `(modify-phases ,phases
302 (add-after 'unpack 'autogen
304 (zero? (system* "sh" "autogen.sh"))))
305 (add-before 'autogen 'patch-/bin/sh
307 (substitute* "build-aux/git-version-gen"
308 (("#!/bin/sh") (string-append "#!" (which "sh"))))
311 `(("autoconf" ,autoconf)
312 ("automake" ,automake)
316 ("gettext" ,gettext-minimal)
317 ,@(package-native-inputs guile-next)))
318 ;; Same as in guile-2.0
320 (list (search-path-specification
321 (variable "GUILE_LOAD_PATH")
322 (files '("share/guile/site/2.0")))
323 (search-path-specification
324 (variable "GUILE_LOAD_COMPILED_PATH")
325 (files '("lib/guile/2.0/site-ccache"
326 "share/guile/site/2.0")))))))
328 ;; There has not been any release yet.
329 (define-public guildhall
330 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
334 (version (string-append "0-" revision "." (string-take commit 9)))
338 (url "https://github.com/ijp/guildhall.git")
340 (file-name (string-append name "-" version "-checkout"))
343 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
344 (build-system gnu-build-system)
347 (modify-phases %standard-phases
348 ;; Tests fail without this fix because they try to load the bash
349 ;; executable as a Scheme file. See bug report at
350 ;; https://github.com/ijp/guildhall/issues/22
351 (add-after 'unpack 'fix-bug-22
353 (substitute* "Makefile.am"
354 (("TESTS_ENVIRONMENT=.*")
355 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
356 TEST_EXTENSIONS = .scm
357 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
358 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
359 ;; FIXME: one of the database tests fails for unknown
360 ;; reasons. It does not fail when run outside of Guix.
361 (("tests/database.scm") ""))
363 (add-before 'configure 'autogen
365 (zero? (system* "sh" "autogen.sh")))))))
367 `(("guile" ,guile-2.0)))
369 `(("zip" ,zip) ; for tests
370 ("autoconf" ,autoconf)
371 ("automake" ,automake)
372 ("texinfo" ,texinfo)))
373 (synopsis "Package manager for Guile")
375 "Guildhall is a package manager written for Guile Scheme. A guild is
376 an association of independent craftspeople. A guildhall is where they meet.
377 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
380 On a practical level, Guildhall lets you share Scheme modules and programs
381 over the internet, and install code that has been shared by others. Guildhall
382 can handle dependencies, so when a program requires several libraries, and
383 each of those has further dependencies, all of the prerequisites for the
384 program can be installed in one go.")
385 (home-page "https://github.com/ijp/guildhall")
386 (license license:gpl3+))))
393 (define-public artanis
399 (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
403 "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
404 (patches (search-patches "artanis-fix-Makefile.in.patch"))))
405 (build-system gnu-build-system)
406 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
407 (inputs `(("guile" ,guile-2.0)))
408 (native-inputs `(("bash" ,bash) ;for the `source' builtin
409 ("pkgconfig" ,pkg-config)
410 ("util-linux" ,util-linux))) ;for the `script' command
413 ;; TODO: The documentation must be built with the `docs' target.
414 (let* ((out (assoc-ref %outputs "out"))
415 (dir (string-append out "/share/guile/site/2.0")))
416 ;; Don't use (%site-dir) for site paths.
417 (list (string-append "MOD_PATH=" dir)
418 (string-append "MOD_COMPILED_PATH=" dir)))
421 (modify-phases %standard-phases
423 'install 'substitute-root-dir
424 (lambda* (#:key outputs #:allow-other-keys)
425 (let ((out (assoc-ref outputs "out")))
426 (substitute* "Makefile" ;ignore the execution of bash.bashrc
427 ((" /etc/bash.bashrc") " /dev/null"))
428 (substitute* "Makefile" ;set the root of config files to OUT
429 ((" /etc") (string-append " " out "/etc")))
430 (mkdir-p (string-append out "/bin")) ;for the `art' executable
432 (synopsis "Web application framework written in Guile")
433 (description "GNU Artanis is a web application framework written in Guile
434 Scheme. A web application framework (WAF) is a software framework that is
435 designed to support the development of dynamic websites, web applications, web
436 services and web resources. The framework aims to alleviate the overhead
437 associated with common activities performed in web development. Artanis
438 provides several tools for web development: database access, templating
439 frameworks, session management, URL-remapping for RESTful, page caching, and
441 (home-page "https://www.gnu.org/software/artanis/")
442 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
444 (define-public guile-reader
446 (name "guile-reader")
450 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
454 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
455 (build-system gnu-build-system)
456 (native-inputs `(("pkgconfig" ,pkg-config)
458 (inputs `(("guile" ,guile-2.0)))
459 (synopsis "Framework for building readers for GNU Guile")
461 "Guile-Reader is a simple framework for building readers for GNU Guile.
463 The idea is to make it easy to build procedures that extend Guile’s read
464 procedure. Readers supporting various syntax variants can easily be written,
465 possibly by re-using existing “token readers” of a standard Scheme
466 readers. For example, it is used to implement Skribilo’s R5RS-derived
469 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
470 hopefully more powerful and flexible (for instance, one may instantiate as
471 many readers as needed).")
472 (home-page "http://www.nongnu.org/guile-reader/")
473 (license license:gpl3+)))
475 (define-public guile2.2-reader
476 (package-for-guile-2.2 guile-reader))
478 (define-public guile-ncurses
480 (name "guile-ncurses")
484 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
488 "1h7rnq4g7xlxxybcb3vjq6nscm9zhlmfaxb7258c8ax7him4azg6"))))
489 (build-system gnu-build-system)
490 (inputs `(("ncurses" ,ncurses)
491 ("guile" ,guile-2.0)))
492 (native-inputs `(("pkg-config" ,pkg-config)))
494 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
495 "--with-gnu-filesystem-hierarchy")
497 (modify-phases %standard-phases
498 (add-before 'build 'fix-libguile-ncurses-file-name
499 (lambda* (#:key outputs #:allow-other-keys)
500 (and (zero? (system* "make" "install"
503 (parallel-job-count))))
504 (let* ((out (assoc-ref outputs "out"))
506 (files (find-files dir ".scm")))
508 (("\"libguile-ncurses\"")
509 (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
512 (home-page "https://www.gnu.org/software/guile-ncurses/")
513 (synopsis "Guile bindings to ncurses")
515 "guile-ncurses provides Guile language bindings for the ncurses
517 (license license:lgpl3+)))
525 (uri (string-append "mirror://gnu/mcron/mcron-"
529 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
530 (patches (search-patches "mcron-install.patch"))))
531 (build-system gnu-build-system)
532 (native-inputs `(("pkg-config" ,pkg-config)))
533 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
534 (home-page "http://www.gnu.org/software/mcron/")
535 (synopsis "Run jobs at scheduled times")
537 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
538 tasks on a schedule, such as every hour or every Monday. Mcron is written in
539 Guile, so its configuration can be written in Scheme; the original cron
540 format is also supported.")
541 (license license:gpl3+)))
543 (define-public mcron2
544 ;; This is mthl's mcron development branch, not yet merged in mcron.
545 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
549 (version (string-append (package-version mcron) "-0."
550 (string-take commit 7)))
554 (url "https://notabug.org/mthl/mcron/")
558 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
559 (file-name (string-append name "-" version "-checkout"))))
561 `(("autoconf" ,autoconf)
562 ("automake" ,automake)
563 ("pkg-config" ,pkg-config)
565 ("help2man" ,help2man)))
567 `(#:modules ((ice-9 match) (ice-9 ftw)
568 ,@%gnu-build-system-modules)
570 #:phases (modify-phases %standard-phases
571 (add-after 'unpack 'bootstrap
573 (zero? (system* "autoreconf" "-vfi"))))
574 (add-after 'install 'wrap-mcron
575 (lambda* (#:key outputs #:allow-other-keys)
576 ;; Wrap the 'mcron' command to refer to the right
578 (let* ((out (assoc-ref outputs "out"))
579 (bin (string-append out "/bin"))
581 out "/share/guile/site")))
582 (match (scandir site)
584 (let ((modules (string-append site "/" version)))
585 (wrap-program (string-append bin "/mcron")
586 `("GUILE_LOAD_PATH" ":" prefix
588 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
592 (define-public guile-ics
599 (url "https://github.com/artyom-poptsov/guile-ics")
601 (file-name (string-append name "-" version "-checkout"))
604 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
605 (build-system gnu-build-system)
607 '(#:phases (modify-phases %standard-phases
608 (add-before 'configure 'autoreconf
610 ;; Repository comes with a broken symlink
611 (delete-file "README")
612 (symlink "README.org" "README")
613 (zero? (system* "autoreconf" "-fi")))))))
615 `(("autoconf" ,(autoconf-wrapper))
616 ("automake" ,automake)
618 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
619 ("gettext" ,gettext-minimal)
620 ("pkg-config" ,pkg-config)))
621 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
622 (propagated-inputs `(("guile-lib" ,guile-lib)))
623 (home-page "https://github.com/artyom-poptsov/guile-ics")
624 (synopsis "Guile parser library for the iCalendar format")
626 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
627 pure Scheme. The library can be used to read and write iCalendar data.
629 The library is shipped with documentation in Info format and usage examples.")
630 (license license:gpl3+)))
632 (define-public guile-lib
638 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
642 "1qbk485djgxqrbfjvk4b7w7y4x9xygf2qb8dqnl7885kajasx8qg"))))
643 (build-system gnu-build-system)
646 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
648 (modify-phases %standard-phases
649 (add-before 'configure 'patch-module-dir
651 (substitute* "src/Makefile.in"
652 (("^moddir = ([[:graph:]]+)")
653 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
654 (("^godir = ([[:graph:]]+)")
656 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
658 (native-inputs `(("pkg-config" ,pkg-config)))
659 (inputs `(("guile" ,guile-2.0)))
660 (home-page "http://www.nongnu.org/guile-lib/")
661 (synopsis "Collection of useful Guile Scheme modules")
663 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
664 modules, allowing for people to cooperate integrating their generic Guile
665 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
668 ;; The whole is under GPLv3+, but some modules are under laxer
669 ;; distribution terms such as LGPL and public domain. See `COPYING' for
671 (license license:gpl3+)))
673 (define-public guile2.2-lib
674 (package-for-guile-2.2 guile-lib))
676 (define-public guile-json
682 (uri (string-append "mirror://savannah/guile-json/guile-json-"
686 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
687 (modules '((guix build utils)))
689 ;; Make sure everything goes under .../site/X.Y, like Guile's
690 ;; search paths expects.
692 (substitute* "configure"
694 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
695 (substitute* '("Makefile.in" "json/Makefile.in")
696 (("moddir =.*/share/guile/site" all)
697 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
698 (build-system gnu-build-system)
699 (native-inputs `(("guile" ,guile-2.0)))
700 (home-page "http://savannah.nongnu.org/projects/guile-json/")
701 (synopsis "JSON module for Guile")
703 "Guile-JSON supports parsing and building JSON documents according to the
704 specification. These are the main features:
707 @item Strictly complies to @uref{http://json.org, specification}.
708 @item Build JSON documents programmatically via macros.
709 @item Unicode support for strings.
710 @item Allows JSON pretty printing.
712 (license license:lgpl3+)))
714 (define-public guile2.2-json
715 (package-for-guile-2.2 guile-json))
717 (define-public guile-minikanren
719 (name "guile-minikanren")
720 (version "20150424.e844d85")
724 (url "https://github.com/ijp/minikanren.git")
725 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
726 (file-name (string-append name "-" version "-checkout"))
729 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
730 (build-system trivial-build-system)
732 `(#:modules ((guix build utils))
735 (use-modules (guix build utils)
740 (let* ((out (assoc-ref %outputs "out"))
741 (guile (assoc-ref %build-inputs "guile"))
742 (effective (read-line
743 (open-pipe* OPEN_READ
744 (string-append guile "/bin/guile")
745 "-c" "(display (effective-version))")))
746 (module-dir (string-append out "/share/guile/site/"
748 (source (assoc-ref %build-inputs "source"))
749 (doc (string-append out "/share/doc/guile-minikanren"))
750 (scm-files '("minikanren.scm"
751 "minikanren/mkextraforms.scm"
752 "minikanren/mkprelude.scm"
753 "minikanren/mk.scm"))
754 (guild (string-append (assoc-ref %build-inputs "guile")
756 ;; Make installation directories.
757 (mkdir-p (string-append module-dir "/minikanren"))
760 ;; Compile .scm files and install.
762 (setenv "GUILE_AUTO_COMPILE" "0")
763 (for-each (lambda (file)
764 (let* ((dest-file (string-append module-dir "/"
766 (go-file (match (string-split file #\.)
768 (string-append module-dir "/"
770 ;; Install source module.
771 (copy-file file dest-file)
772 ;; Install compiled module.
773 (unless (zero? (system* guild "compile"
777 (error (format #f "Failed to compile ~s to ~s!"
781 ;; Also copy over the README.
782 (install-file "README.org" doc)
785 `(("guile" ,guile-2.0)))
786 (home-page "https://github.com/ijp/minikanren")
787 (synopsis "MiniKanren declarative logic system, packaged for Guile")
789 "MiniKanren is a relational programming extension to the Scheme
790 programming Language, written as a smaller version of Kanren suitable for
791 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
792 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
794 This is Ian Price's r6rs packaged version of miniKanren, which deviates
795 slightly from miniKanren mainline.
797 See http://minikanren.org/ for more on miniKanren generally.")
798 (license license:expat)))
800 (define-public guile2.2-minikanren
801 (package-for-guile-2.2 guile-minikanren))
803 (define-public guile-irregex
805 (name "guile-irregex")
810 "http://synthcode.com/scheme/irregex/irregex-"
814 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
815 (build-system gnu-build-system)
817 `(#:modules ((guix build utils)
821 (guix build gnu-build-system))
823 (modify-phases %standard-phases
828 (lambda* (#:key inputs outputs #:allow-other-keys)
829 (let* ((out (assoc-ref outputs "out"))
830 (effective (read-line
831 (open-pipe* OPEN_READ
833 "(display (effective-version))")))
834 (module-dir (string-append out "/share/guile/site/"
836 (source (assoc-ref inputs "source"))
837 (doc (string-append out "/share/doc/guile-irregex/"))
838 (guild (string-append (assoc-ref %build-inputs "guile")
840 ;; Make installation directories.
841 (mkdir-p (string-append module-dir "/rx/source"))
844 ;; Compile .scm files and install.
845 (setenv "GUILE_AUTO_COMPILE" "0")
847 (for-each (lambda (copy-info)
849 ((src-file dest-file-basis)
850 (let* ((dest-file (string-append
851 module-dir dest-file-basis
853 (go-file (string-append
854 module-dir dest-file-basis
856 ;; Install source module.
859 ;; Install compiled module.
860 (unless (zero? (system* guild "compile"
864 (error (format #f "Failed to compile ~s to ~s!"
865 src-file dest-file)))))))
866 '(("irregex-guile.scm" "/rx/irregex")
867 ("irregex.scm" "/rx/source/irregex")
868 ;; Not really reachable via guile's packaging system,
869 ;; but nice to have around
870 ("irregex-utils.scm" "/rx/source/irregex-utils")))
872 ;; Also copy over the README.
873 (install-file "irregex.html" doc)
876 `(("guile" ,guile-2.0)))
877 (home-page "http://synthcode.com/scheme/irregex")
878 (synopsis "S-expression based regular expressions")
880 "Irregex is an s-expression based alternative to your classic
881 string-based regular expressions. It implements SRFI 115 and is deeply
882 inspired by the SCSH regular expression system.")
883 (license license:bsd-3)))
885 (define-public guile2.2-irregex
886 (package-for-guile-2.2 guile-irregex))
888 ;; There are two guile-gdbm packages, one using the FFI and one with
889 ;; direct C bindings, hence the verbose name.
891 (define-public guile-gdbm-ffi
893 (name "guile-gdbm-ffi")
894 (version "20120209.fa1d5b6")
898 (url "https://github.com/ijp/guile-gdbm.git")
899 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
900 (file-name (string-append name "-" version "-checkout"))
903 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
904 (build-system trivial-build-system)
910 (use-modules (guix build utils)
914 ;; Avoid warnings we can safely ignore
915 (setenv "GUILE_AUTO_COMPILE" "0")
917 (let* ((out (assoc-ref %outputs "out"))
920 (open-pipe* OPEN_READ
922 (assoc-ref %build-inputs "guile")
924 "-c" "(display (effective-version))")))
925 (module-dir (string-append out "/share/guile/site/"
927 (source (assoc-ref %build-inputs "source"))
928 (doc (string-append out "/share/doc"))
929 (guild (string-append (assoc-ref %build-inputs "guile")
932 (string-append module-dir "/gdbm.scm"))
934 (string-append module-dir "/gdbm.go"))
936 (lambda (in-file out-file)
937 (system* guild "compile" "-o" out-file in-file))))
938 ;; Make installation directories.
942 ;; Switch directory for compiling and installing
946 (copy-file "gdbm.scm" gdbm.scm-dest)
949 (substitute* gdbm.scm-dest
950 (("\\(dynamic-link \"libgdbm\"\\)")
951 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
952 (assoc-ref %build-inputs "gdbm"))))
954 ;; compile to the destination
955 (compile-file gdbm.scm-dest gdbm.go-dest)))))
957 `(("guile" ,guile-2.0)))
960 (home-page "https://github.com/ijp/guile-gdbm")
961 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
963 "Guile bindings to the GDBM key-value storage system, using
964 Guile's foreign function interface.")
965 (license license:gpl3+)))
967 (define-public guile2.2-gdbm-ffi
968 (package-for-guile-2.2 guile-gdbm-ffi))
970 (define-public guile-sqlite3
971 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
973 (name "guile-sqlite3")
974 (version (string-append "0.0-0." (string-take commit 7)))
976 ;; XXX: This used to be available read-only at
977 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
978 ;; eventually disappeared, so we have our own copy here.
979 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
987 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
988 (file-name (string-append name "-" version "-checkout"))
989 (modules '((guix build utils)))
991 ;; Upgrade 'Makefile.am' to the current way of doing things.
992 '(substitute* "Makefile.am"
993 (("TESTS_ENVIRONMENT")
994 "TEST_LOG_COMPILER")))))
996 (build-system gnu-build-system)
998 `(("autoconf" ,autoconf)
999 ("automake" ,automake)
1000 ("pkg-config" ,pkg-config)))
1002 `(("guile" ,guile-2.0)
1003 ("sqlite" ,sqlite)))
1005 '(#:phases (modify-phases %standard-phases
1006 (add-before 'configure 'autoreconf
1008 (zero? (system* "autoreconf" "-vfi"))))
1009 (add-before 'build 'set-sqlite3-file-name
1010 (lambda* (#:key inputs #:allow-other-keys)
1011 (substitute* "sqlite3.scm"
1013 (string-append "\"" (assoc-ref inputs "sqlite")
1014 "/lib/libsqlite3\"")))
1016 (synopsis "Access SQLite databases from Guile")
1018 "This package provides Guile bindings to the SQLite database system.")
1019 (license license:gpl3+))))
1021 (define-public haunt
1027 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1031 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1032 (build-system gnu-build-system)
1034 `(#:modules ((ice-9 match) (ice-9 ftw)
1035 ,@%gnu-build-system-modules)
1037 #:phases (modify-phases %standard-phases
1038 (add-after 'install 'wrap-haunt
1039 (lambda* (#:key outputs #:allow-other-keys)
1040 ;; Wrap the 'haunt' command to refer to the right
1042 (let* ((out (assoc-ref outputs "out"))
1043 (bin (string-append out "/bin"))
1044 (site (string-append
1045 out "/share/guile/site")))
1046 (match (scandir site)
1048 (let ((modules (string-append site "/" version)))
1049 (wrap-program (string-append bin "/haunt")
1050 `("GUILE_LOAD_PATH" ":" prefix
1052 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1056 `(("pkg-config" ,pkg-config)
1057 ("texinfo" ,texinfo)))
1059 `(("guile" ,guile-2.0)))
1061 `(("guile-reader" ,guile-reader)
1062 ("guile-commonmark" ,guile-commonmark)))
1063 (synopsis "Functional static site generator")
1064 (description "Haunt is a static site generator written in Guile
1065 Scheme. Haunt features a functional build system and an extensible
1066 interface for reading articles in any format.")
1067 (home-page "http://haunt.dthompson.us")
1068 (license license:gpl3+)))
1070 (define-public guile2.2-haunt
1071 (package-for-guile-2.2
1072 (package (inherit haunt) (name "guile2.2-haunt"))))
1074 (define-public guile-config
1076 (name "guile-config")
1081 "http://alex.pompo.co/software/" name "-" version
1085 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1086 (build-system gnu-build-system)
1088 `(("guile" ,guile-2.0)))
1089 (synopsis "Guile application configuration parsing library")
1091 "Guile Config is a library providing a declarative approach to
1092 application configuration specification. The library provides clean
1093 configuration declaration forms, and processors that take care of:
1094 configuration file creation; configuration file parsing; command-line
1095 parameter parsing using getopt-long; basic GNU command-line parameter
1096 generation (--help, --usage, --version); automatic output generation for the
1097 above command-line parameters.")
1098 (home-page "https://github.com/a-sassmannshausen/guile-config")
1099 (license license:agpl3+)))
1101 (define-public guile-redis
1103 (name "guile-redis")
1107 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1111 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1112 (modules '((guix build utils)))
1114 ;; Make sure everything goes under .../site/X.Y, like Guile's
1115 ;; search paths expects.
1117 (substitute* "configure"
1118 (("ac_subst_vars='")
1119 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1120 (substitute* '("Makefile.in"
1122 "redis/commands/Makefile.in")
1123 (("moddir =.*/share/guile/site" all)
1124 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1125 (build-system gnu-build-system)
1127 `(("guile" ,guile-2.0)))
1128 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1129 (synopsis "Redis client library for Guile")
1130 (description "Guile-redis provides a Scheme interface to the Redis
1131 key-value cache and store.")
1132 (license license:lgpl3+)))
1134 (define-public guile2.2-redis
1135 (package-for-guile-2.2 guile-redis))
1137 (define-public guile-wisp
1143 (uri (string-append "https://bitbucket.org/ArneBab/"
1144 "wisp/downloads/wisp-"
1148 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1149 (build-system gnu-build-system)
1151 `(#:modules ((system base compile)
1152 ,@%gnu-build-system-modules)
1154 (modify-phases %standard-phases
1156 'configure 'substitute-before-config
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 (let ((bash (assoc-ref inputs "bash")))
1160 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1161 (substitute* "configure"
1162 (("guile-2.0") "guile"))
1163 ;; Puts together some test files with /bin/bash hardcoded
1164 (substitute* "Makefile.in"
1166 (string-append bash "/bin/bash") ))
1169 ;; auto compilation breaks, but if we set HOME to /tmp,
1172 'check 'auto-compile-hacky-workaround
1174 (setenv "HOME" "/tmp")
1178 (lambda* (#:key outputs inputs #:allow-other-keys)
1179 (let* ((out (assoc-ref outputs "out"))
1180 (module-dir (string-append out "/share/guile/site/2.0"))
1182 (string-append module-dir "/language/wisp"))
1183 (guild (string-append (assoc-ref inputs "guile")
1185 ;; Make installation directories.
1186 (mkdir-p module-dir)
1187 (mkdir-p language-dir)
1190 (copy-file "wisp-scheme.scm"
1191 (string-append module-dir "/wisp-scheme.scm"))
1192 (copy-file "language/wisp/spec.scm"
1193 (string-append language-dir "/spec.scm"))
1195 ;; compile to the destination
1196 (compile-file "wisp-scheme.scm"
1197 #:output-file (string-append
1198 module-dir "/wisp-scheme.go"))
1199 (compile-file "language/wisp/spec.scm"
1200 #:output-file (string-append
1201 language-dir "/spec.go"))
1203 (home-page "http://draketo.de/english/wisp")
1205 `(("guile" ,guile-2.0)
1206 ("python" ,python)))
1207 (synopsis "Whitespace to lisp syntax for Guile")
1208 (description "Wisp is a syntax for Guile which provides a Python-like
1209 whitespace-significant language. It may be easier on the eyes for some
1210 users and in some situations.")
1211 (license license:gpl3+)))
1213 (define-public guile-sly
1219 (uri (string-append "https://files.dthompson.us/sly/sly-"
1223 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1224 (build-system gnu-build-system)
1227 (list (string-append "--with-libfreeimage-prefix="
1228 (assoc-ref %build-inputs "freeimage"))
1229 (string-append "--with-libgslcblas-prefix="
1230 (assoc-ref %build-inputs "gsl")))))
1232 `(("pkg-config" ,pkg-config)))
1234 `(("guile" ,guile-2.0)
1235 ("guile-sdl" ,guile-sdl)
1236 ("guile-opengl" ,guile-opengl)))
1239 ("freeimage" ,freeimage)
1241 (synopsis "2D/3D game engine for GNU Guile")
1242 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1243 features a functional reactive programming interface and live coding
1245 (home-page "http://dthompson.us/pages/software/sly.html")
1246 (license license:gpl3+)))
1248 (define-public g-wrap
1254 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1258 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1259 (build-system gnu-build-system)
1261 `(("pkg-config" ,pkg-config)))
1263 `(("guile" ,guile-2.0)
1264 ("guile-lib" ,guile-lib)))
1266 `(("libffi" ,libffi)))
1269 (modify-phases %standard-phases
1270 (add-before 'configure 'pre-configure
1271 (lambda* (#:key outputs #:allow-other-keys)
1272 (let ((out (assoc-ref outputs "out")))
1273 (substitute* (find-files "." "^Makefile.in$")
1274 (("guilemoduledir =.*guile/site" all)
1275 (string-append all "/2.0")))
1277 (synopsis "Generate C bindings for Guile")
1278 (description "G-Wrap is a tool and Guile library for generating function
1279 wrappers for inter-language calls. It currently only supports generating Guile
1280 wrappers for C functions. Given a definition of the types and prototypes for
1281 a given C interface, G-Wrap will automatically generate the C code that
1282 provides access to that interface and its types from the Scheme level.")
1283 (home-page "http://www.nongnu.org/g-wrap/index.html")
1284 (license license:lgpl2.1+)))
1286 (define-public guile-dbi
1293 "http://download.gna.org/guile-dbi/guile-dbi-"
1297 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1298 (build-system gnu-build-system)
1301 (list (string-append
1302 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1304 (modify-phases %standard-phases
1305 (add-after 'install 'patch-extension-path
1306 (lambda* (#:key outputs #:allow-other-keys)
1307 (let* ((out (assoc-ref outputs "out"))
1308 (dbi.scm (string-append
1309 out "/share/guile/site/2.0/dbi/dbi.scm"))
1310 (ext (string-append out "/lib/libguile-dbi")))
1311 (substitute* dbi.scm (("libguile-dbi") ext))
1314 `(("guile" ,guile-2.0)))
1315 (synopsis "Guile database abstraction layer")
1316 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1318 "guile-dbi is a library for Guile that provides a convenient interface to
1319 SQL databases. Database programming with guile-dbi is generic in that the same
1320 programming interface is presented regardless of which database system is used.
1321 It currently supports MySQL, Postgres and SQLite3.")
1322 (license license:gpl2+)))
1324 (define-public guile-dbd-sqlite3
1326 (name "guile-dbd-sqlite3")
1331 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1335 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1336 (build-system gnu-build-system)
1338 `(("pkg-config" ,pkg-config)))
1340 `(("sqlite" ,sqlite)
1341 ("zlib" ,(@ (gnu packages compression) zlib))))
1343 `(("guile-dbi" ,guile-dbi)))
1344 (synopsis "Guile DBI driver for SQLite")
1345 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1347 "guile-dbi is a library for Guile that provides a convenient interface to
1348 SQL databases. This package implements the interface for SQLite.")
1349 (license license:gpl2+)))
1351 (define-public guile-xosd
1357 (uri (string-append "https://github.com/alezost/" name
1358 "/releases/download/v" version
1359 "/" name "-" version ".tar.gz"))
1362 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1363 (build-system gnu-build-system)
1365 `(("pkg-config" ,pkg-config)))
1367 `(("guile" ,guile-2.0)
1369 ("libxext" ,libxext)
1370 ("libxinerama" ,libxinerama)
1372 (home-page "https://github.com/alezost/guile-xosd")
1373 (synopsis "XOSD bindings for Guile")
1375 "Guile-XOSD provides Guile bindings for @code{libxosd},
1376 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1378 (license license:gpl3+)))
1380 (define-public guile-daemon
1382 (name "guile-daemon")
1386 (uri (string-append "https://github.com/alezost/" name
1387 "/releases/download/v" version
1388 "/" name "-" version ".tar.gz"))
1391 "0wsq9l6a4sijq4i1r3kcddfaznsak2jc5k59gzkhs5il5d2kn5yi"))))
1392 (build-system gnu-build-system)
1394 `(("pkg-config" ,pkg-config)))
1396 `(("guile" ,guile-2.0)))
1397 (home-page "https://github.com/alezost/guile-daemon")
1398 (synopsis "Evaluate code in a running Guile process")
1400 "Guile-Daemon is a small Guile program that loads your initial
1401 configuration file, and then reads and evaluates Guile expressions that
1402 you send to a FIFO file.")
1403 (license license:gpl3+)))
1405 (define-public guile-commonmark
1407 (name "guile-commonmark")
1411 (uri (string-append "https://github.com/OrangeShark/" name
1412 "/releases/download/v" version
1413 "/" name "-" version ".tar.gz"))
1416 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1417 (modules '((guix build utils)))
1419 ;; Use the real effective version of Guile in directory names
1420 ;; instead of a hard-coded "/2.0".
1422 (substitute* "configure"
1423 (("ac_subst_vars='")
1424 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1425 (substitute* "Makefile.in"
1427 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1428 (build-system gnu-build-system)
1430 `(("guile" ,guile-2.0)))
1431 (synopsis "CommonMark parser for Guile")
1433 "guile-commonmark is a library for parsing CommonMark, a fully specified
1434 variant of Markdown. The library is written in Guile Scheme and is designed
1435 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1436 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1437 is no support for parsing block and inline level HTML.")
1438 (home-page "https://github.com/OrangeShark/guile-commonmark")
1439 (license license:lgpl3+)))
1441 (define-public guile2.2-commonmark
1442 (package-for-guile-2.2 guile-commonmark))
1444 (define-public guile-bytestructures
1446 (name "guile-bytestructures")
1447 (version "20160726.53127f6")
1451 (url "https://github.com/TaylanUB/scheme-bytestructures")
1452 (commit "53127f608caf64b34fa41c389b2743b546fbe9da")))
1453 (file-name (string-append name "-" version "-checkout"))
1456 "0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq"))))
1457 (build-system trivial-build-system)
1459 `(#:modules ((guix build utils))
1462 (use-modules (guix build utils)
1466 (let* ((out (assoc-ref %outputs "out"))
1467 (guile (assoc-ref %build-inputs "guile"))
1468 (effective (read-line
1469 (open-pipe* OPEN_READ
1470 (string-append guile "/bin/guile")
1471 "-c" "(display (effective-version))")))
1472 (module-dir (string-append out "/share/guile/site/"
1474 (source (assoc-ref %build-inputs "source"))
1475 (doc (string-append out "/share/doc/scheme-bytestructures"))
1476 (scm-files (filter (lambda (path)
1477 (not (string-prefix? "bytestructures/r7" path)))
1478 (with-directory-excursion source
1479 (find-files "bytestructures" "\\.scm$"))))
1480 (guild (string-append (assoc-ref %build-inputs "guile")
1482 ;; Make installation directories.
1485 ;; Compile .scm files and install.
1487 (setenv "GUILE_AUTO_COMPILE" "0")
1488 (for-each (lambda (file)
1489 (let* ((dest-file (string-append module-dir "/"
1491 (go-file (string-append module-dir "/"
1493 (string-rindex file #\.))
1495 ;; Install source module.
1496 (mkdir-p (dirname dest-file))
1497 (copy-file file dest-file)
1499 ;; Install compiled module.
1500 (mkdir-p (dirname go-file))
1501 (unless (zero? (system* guild "compile"
1505 (error (format #f "Failed to compile ~s to ~s!"
1509 ;; Also copy over the README.
1510 (install-file "README.md" doc)
1513 `(("guile" ,guile-2.0)))
1514 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1515 (synopsis "Structured access to bytevector contents for Guile")
1517 "Guile bytestructures offers a system imitating the type system
1518 of the C programming language, to be used on bytevectors. C's type
1519 system works on raw memory, and Guile works on bytevectors which are
1520 an abstraction over raw memory. It's also more powerful than the C
1521 type system, elevating types to first-class status.")
1522 (license license:gpl3+)))
1524 (define-public guile-aspell
1526 (name "guile-aspell")
1531 "http://lonelycactus.com/tarball/guile_aspell-"
1535 "1wknn57x2qcsbn7zw6sbn1ma6fjsg8cvpnf78ak47s8jw6k6j75n"))))
1536 (build-system gnu-build-system)
1538 '(#:configure-flags (list (string-append "--with-guilesitedir="
1539 (assoc-ref %outputs "out")
1540 "/share/guile/site/2.0"))
1541 #:phases (modify-phases %standard-phases
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/aspell.scm"
1546 (("\"libaspell\\.so\"")
1547 (string-append "\"" aspell
1548 "/lib/libaspell\"")))
1550 (native-inputs `(("pkg-config" ,pkg-config)))
1551 (inputs `(("guile" ,guile-2.0)
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 "1fvf8d2s3vvg4nyskbqaiqmlm2x571hv7hizcnmny45zvalydr9h"))))
1641 (build-system gnu-build-system)
1642 (native-inputs `(("autoconf" ,autoconf)
1643 ("automake" ,automake)
1644 ("guile" ,guile-next)
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 (guile-next in Guix).")
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-next)))
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 "0")
1697 (commit "969514aa7224217bc3c1a4c5312a9469ac5f13d5"))
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 "079l8y6pjkmahb4k6dfqh3hk34pg540rrl29aixyvv86w9bdfjil"))
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 (zero? (system* "autoreconf" "-vfi")))))
1716 ;; Test suite is not parallel-safe: the tests open same-named repos.
1717 #:parallel-tests? #f))
1719 `(("autoconf" ,autoconf)
1720 ("automake" ,automake)
1721 ("pkg-config" ,pkg-config)))
1723 `(("guile" ,guile-2.0)
1724 ("libgit2" ,libgit2)))
1726 `(("guile-bytestructures" ,guile-bytestructures)))
1727 (synopsis "Guile bindings for libgit2")
1729 "This package provides Guile bindings to libgit2, a library to
1730 manipulate repositories of the Git version control system.")
1731 (license license:gpl3+))))
1733 ;;; guile.scm ends here