1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
8 ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10 ;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11 ;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
12 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
13 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14 ;;; Copyright © 2017 David Thompson <davet@gnu.org>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
17 ;;; Copyright © 2017 ng0 <ng0@infotropique.org>
18 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages guile)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages admin) ;;for tree
39 #:use-module (gnu packages aspell)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages bdw-gc)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages gawk)
44 #:use-module (gnu packages gperf)
45 #:use-module (gnu packages libffi)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages flex)
48 #:use-module (gnu packages libunistring)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages m4)
51 #:use-module (gnu packages multiprecision)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages readline)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages ed)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages texinfo)
58 #:use-module (gnu packages man)
59 #:use-module (gnu packages gettext)
60 #:use-module (gnu packages databases)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages gl)
63 #:use-module (gnu packages sdl)
64 #:use-module (gnu packages maths)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages version-control)
67 #:use-module (gnu packages xdisorg)
68 #:use-module (gnu packages xorg)
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix git-download)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system trivial)
74 #:use-module (guix utils)
75 #:use-module (ice-9 match))
79 ;;; GNU Guile, and modules and extensions.
83 (define-public guile-1.8
89 (uri (string-append "mirror://gnu/guile/guile-" version
93 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
94 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
95 (build-system gnu-build-system)
96 (arguments '(#:configure-flags '("--disable-error-on-warning")
98 ;; Insert a phase before `configure' to patch things up.
100 (modify-phases %standard-phases
101 (add-before 'configure 'patch-stuff
102 (lambda* (#:key outputs #:allow-other-keys)
103 ;; Add a call to `lt_dladdsearchdir' so that
104 ;; `libguile-readline.so' & co. are in the
105 ;; loader's search path.
106 (substitute* "libguile/dynl.c"
107 (("lt_dlinit.*$" match)
109 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
111 (assoc-ref outputs "out"))))
113 ;; The usual /bin/sh...
114 (substitute* "ice-9/popen.scm"
115 (("/bin/sh") (which "sh")))
117 (inputs `(("gawk" ,gawk)
118 ("readline" ,readline)))
120 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
122 (propagated-inputs `(("gmp" ,gmp)
123 ("libltdl" ,libltdl)))
125 ;; When cross-compiling, a native version of Guile itself is needed.
126 (self-native-input? #t)
129 (list (search-path-specification
130 (variable "GUILE_LOAD_PATH")
131 (files '("share/guile/site")))))
133 (synopsis "Scheme implementation intended especially for extensions")
135 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
136 official extension language of the GNU system. It is an implementation of
137 the Scheme language which can be easily embedded in other applications to
138 provide a convenient means of extending the functionality of the application
139 without requiring the source code to be rewritten.")
140 (home-page "https://www.gnu.org/software/guile/")
141 (license license:lgpl2.0+)))
143 (define-public guile-2.0
149 (uri (string-append "mirror://gnu/guile/guile-" version
153 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
154 (build-system gnu-build-system)
155 (native-inputs `(("pkgconfig" ,pkg-config)))
156 (inputs `(("libffi" ,libffi)
157 ("readline" ,readline)
158 ,@(libiconv-if-needed)
160 ;; We need Bash when cross-compiling because some of the scripts
161 ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
162 ;; an interactive Bash with Readline and all.
163 ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
165 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
166 ;; reads `-lltdl -lunistring', adding them here will add the needed
167 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
168 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
169 ("libunistring" ,libunistring)
171 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
172 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
175 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
176 ;; must be propagated.
180 (self-native-input? #t)
182 (outputs '("out" "debug"))
185 `(#:configure-flags '("--disable-static") ;saves 3MiB
186 #:phases (alist-cons-before
187 'configure 'pre-configure
188 (lambda* (#:key inputs #:allow-other-keys)
189 ;; Tell (ice-9 popen) the file name of Bash.
190 (let ((bash (assoc-ref inputs "bash")))
191 (substitute* "module/ice-9/popen.scm"
192 ;; If bash is #f allow fallback for user to provide
193 ;; "bash" in PATH. This happens when cross-building to
194 ;; MinGW for which we do not have Bash yet.
196 ,@(if (target-mingw?)
198 (string-append bash "/bin/bash")
200 '((string-append bash "/bin/bash")))))))
204 (list (search-path-specification
205 (variable "GUILE_LOAD_PATH")
206 (files '("share/guile/site/2.0")))
207 (search-path-specification
208 (variable "GUILE_LOAD_COMPILED_PATH")
209 (files '("lib/guile/2.0/site-ccache"
210 "share/guile/site/2.0")))))
212 (synopsis "Scheme implementation intended especially for extensions")
214 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
215 official extension language of the GNU system. It is an implementation of
216 the Scheme language which can be easily embedded in other applications to
217 provide a convenient means of extending the functionality of the application
218 without requiring the source code to be rewritten.")
219 (home-page "https://www.gnu.org/software/guile/")
220 (license license:lgpl3+)))
222 (define-public guile-2.2
223 (package (inherit guile-2.0)
225 (version "2.2.2") ;TODO: Update to 2.2.3 (see below).
229 ;; Note: we are limited to one of the compression formats
230 ;; supported by the bootstrap binaries, so no lzip here.
231 (uri (string-append "mirror://gnu/guile/guile-" version
235 "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w"))
236 (modules '((guix build utils)))
238 ;; Remove the pre-built object files. Instead, build everything
239 ;; from source, at the expense of significantly longer build
240 ;; times (almost 3 hours on a 4-core Intel i5).
241 (snippet '(for-each delete-file
242 (find-files "prebuilt" "\\.go$")))))
243 (properties '((timeout . 72000) ;20 hours
244 (max-silent-time . 36000))) ;10 hours (needed on ARM
245 ; when heavily loaded)
247 (list (search-path-specification
248 (variable "GUILE_LOAD_PATH")
249 (files '("share/guile/site/2.2")))
250 (search-path-specification
251 (variable "GUILE_LOAD_COMPILED_PATH")
252 (files '("lib/guile/2.2/site-ccache"
253 "share/guile/site/2.2")))))))
255 (define-public guile-2.2.3
256 ;; TODO: Make it the new 'guile-2.2' on the next rebuild cycle.
260 (source (origin (inherit (package-source guile-2.2))
261 (uri (list (string-append "mirror://gnu/guile/guile-"
264 "https://wingolog.org/priv/guile-"
268 "11j01agvnci2cx32wwpqs9078856yxmvs15gcsz7ganpkj2ahlw3"))))))
270 (define-public guile-2.2/fixed
271 ;; A package of Guile 2.2 that's rarely changed. It is the one used
272 ;; in the `base' module, and thus changing it entails a full rebuild.
275 (properties '((hidden? . #t) ;people should install 'guile-2.2'
276 (timeout . 72000) ;20 hours
277 (max-silent-time . 36000))) ;10 hours (needed on ARM
278 ; when heavily loaded)
281 (define-public guile-next
282 (deprecated-package "guile-next" guile-2.2))
284 (define (guile-variant-package-name prefix)
286 "Return NAME with PREFIX instead of \"guile-\", when applicable."
287 (if (string-prefix? "guile-" name)
288 (string-append prefix "-"
290 (string-length "guile-")))
293 (define package-for-guile-2.2
294 ;; A procedure that rewrites the dependency tree of the given package to use
295 ;; GUILE-2.2 instead of GUILE-2.0.
296 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
297 (guile-variant-package-name "guile2.2")))
299 (define package-for-guile-2.0
300 ;; Likewise, but the other way around. :-)
301 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
302 (guile-variant-package-name "guile2.0")))
304 (define-public guile-for-guile-emacs
305 (package (inherit guile-2.2)
306 (name "guile-for-guile-emacs")
307 (version "20150510.d8d9a8d")
311 (url "git://git.hcoop.net/git/bpt/guile.git")
312 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
313 (file-name (string-append name "-" version "-checkout"))
316 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
318 (substitute-keyword-arguments `(;; Tests aren't passing for now.
319 ;; Obviously we should re-enable this!
321 ,@(package-arguments guile-2.2))
323 `(modify-phases ,phases
324 (add-after 'unpack 'autogen
326 (zero? (system* "sh" "autogen.sh"))))
327 (add-before 'autogen 'patch-/bin/sh
329 (substitute* "build-aux/git-version-gen"
330 (("#!/bin/sh") (string-append "#!" (which "sh"))))
333 `(("autoconf" ,autoconf)
334 ("automake" ,automake)
338 ("gettext" ,gettext-minimal)
339 ,@(package-native-inputs guile-2.2)))
340 ;; Same as in guile-2.0
342 (list (search-path-specification
343 (variable "GUILE_LOAD_PATH")
344 (files '("share/guile/site/2.0")))
345 (search-path-specification
346 (variable "GUILE_LOAD_COMPILED_PATH")
347 (files '("lib/guile/2.0/site-ccache"
348 "share/guile/site/2.0")))))))
350 ;; There has not been any release yet.
351 (define-public guildhall
352 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
356 (version (string-append "0-" revision "." (string-take commit 9)))
360 (url "https://github.com/ijp/guildhall.git")
362 (file-name (string-append name "-" version "-checkout"))
365 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
366 (build-system gnu-build-system)
369 (modify-phases %standard-phases
370 ;; Tests fail without this fix because they try to load the bash
371 ;; executable as a Scheme file. See bug report at
372 ;; https://github.com/ijp/guildhall/issues/22
373 (add-after 'unpack 'fix-bug-22
375 (substitute* "Makefile.am"
376 (("TESTS_ENVIRONMENT=.*")
377 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
378 TEST_EXTENSIONS = .scm
379 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
380 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
381 ;; FIXME: one of the database tests fails for unknown
382 ;; reasons. It does not fail when run outside of Guix.
383 (("tests/database.scm") ""))
385 (add-after 'fix-bug-22 'autogen
387 (zero? (system* "sh" "autogen.sh")))))))
389 `(("guile" ,guile-2.0)))
391 `(("zip" ,zip) ; for tests
392 ("autoconf" ,autoconf)
393 ("automake" ,automake)
394 ("texinfo" ,texinfo)))
395 (synopsis "Package manager for Guile")
397 "Guildhall is a package manager written for Guile Scheme. A guild is
398 an association of independent craftspeople. A guildhall is where they meet.
399 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
402 On a practical level, Guildhall lets you share Scheme modules and programs
403 over the internet, and install code that has been shared by others. Guildhall
404 can handle dependencies, so when a program requires several libraries, and
405 each of those has further dependencies, all of the prerequisites for the
406 program can be installed in one go.")
407 (home-page "https://github.com/ijp/guildhall")
408 (license license:gpl3+))))
415 (define-public artanis
416 (let ((release "0.2.1")
420 (version (if (zero? revision)
422 (string-append release "-"
423 (number->string revision))))
426 (uri (string-append "mirror://gnu/artanis/artanis-"
428 (file-name (string-append name "-" version ".tar.gz"))
431 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
432 (modules '((guix build utils)))
435 (delete-file-recursively "artanis/third-party/json.scm")
436 (delete-file-recursively "artanis/third-party/json")
437 (substitute* '("artanis/artanis.scm"
439 (("(#:use-module \\()artanis third-party (json\\))" _
441 (string-append use-module json)))
442 (substitute* "artanis/oht.scm"
443 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
444 _ pre json-string post)
448 (substitute* "artanis/artanis.scm"
449 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
451 (build-system gnu-build-system)
452 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
453 (inputs `(("guile" ,guile-2.2)
454 ("guile-json" ,guile-json)))
455 (native-inputs `(("bash" ,bash) ;for the `source' builtin
456 ("pkgconfig" ,pkg-config)
457 ("util-linux" ,util-linux))) ;for the `script' command
460 ;; TODO: The documentation must be built with the `docs' target.
461 (let* ((out (assoc-ref %outputs "out"))
462 (scm (string-append out "/share/guile/site/2.2"))
463 (go (string-append out "/lib/guile/2.2/site-ccache")))
464 ;; Don't use (%site-dir) for site paths.
465 (list (string-append "MOD_PATH=" scm)
466 (string-append "MOD_COMPILED_PATH=" go)))
469 (modify-phases %standard-phases
470 (add-before 'install 'substitute-root-dir
471 (lambda* (#:key outputs #:allow-other-keys)
472 (let ((out (assoc-ref outputs "out")))
473 (substitute* "Makefile" ;ignore the execution of bash.bashrc
474 ((" /etc/bash.bashrc") " /dev/null"))
475 (substitute* "Makefile" ;set the root of config files to OUT
476 ((" /etc") (string-append " " out "/etc")))
477 (mkdir-p (string-append out "/bin")) ;for the `art' executable
479 (add-after 'install 'wrap-art
480 (lambda* (#:key outputs #:allow-other-keys)
481 (let* ((out (assoc-ref outputs "out"))
482 (bin (string-append out "/bin"))
483 (scm (string-append out "/share/guile/site/2.2"))
484 (go (string-append out "/lib/guile/2.2/site-ccache")))
485 (wrap-program (string-append bin "/art")
486 `("GUILE_LOAD_PATH" ":" prefix (,scm))
487 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
489 (synopsis "Web application framework written in Guile")
490 (description "GNU Artanis is a web application framework written in Guile
491 Scheme. A web application framework (WAF) is a software framework that is
492 designed to support the development of dynamic websites, web applications, web
493 services and web resources. The framework aims to alleviate the overhead
494 associated with common activities performed in web development. Artanis
495 provides several tools for web development: database access, templating
496 frameworks, session management, URL-remapping for RESTful, page caching, and
498 (home-page "https://www.gnu.org/software/artanis/")
499 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
501 (define-public guile-reader
503 (name "guile-reader")
507 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
511 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
512 (build-system gnu-build-system)
513 (native-inputs `(("pkgconfig" ,pkg-config)
514 ("gperf" ,gperf-3.0)))
515 (inputs `(("guile" ,guile-2.2)))
516 (synopsis "Framework for building readers for GNU Guile")
518 "Guile-Reader is a simple framework for building readers for GNU Guile.
520 The idea is to make it easy to build procedures that extend Guile’s read
521 procedure. Readers supporting various syntax variants can easily be written,
522 possibly by re-using existing “token readers” of a standard Scheme
523 readers. For example, it is used to implement Skribilo’s R5RS-derived
526 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
527 hopefully more powerful and flexible (for instance, one may instantiate as
528 many readers as needed).")
529 (home-page "http://www.nongnu.org/guile-reader/")
530 (license license:gpl3+)))
532 (define-public guile2.0-reader
533 (package-for-guile-2.0 guile-reader))
534 (define-public guile2.2-reader
535 (deprecated-package "guile2.2-reader" guile-reader))
537 (define-public guile-ncurses
539 (name "guile-ncurses")
543 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
547 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
548 (build-system gnu-build-system)
549 (inputs `(("ncurses" ,ncurses)
550 ("guile" ,guile-2.2)))
551 (native-inputs `(("pkg-config" ,pkg-config)))
553 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
554 "--with-gnu-filesystem-hierarchy")
556 (modify-phases %standard-phases
557 (add-before 'build 'fix-libguile-ncurses-file-name
558 (lambda* (#:key outputs #:allow-other-keys)
559 (and (zero? (system* "make" "install"
562 (parallel-job-count))))
563 (let* ((out (assoc-ref outputs "out"))
565 (files (find-files dir ".scm")))
567 (("\"libguile-ncurses\"")
568 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
571 (home-page "https://www.gnu.org/software/guile-ncurses/")
572 (synopsis "Guile bindings to ncurses")
574 "guile-ncurses provides Guile language bindings for the ncurses
576 (license license:lgpl3+)))
578 (define-public guile-ncurses/gpm
580 (inherit guile-ncurses)
581 (name "guile-ncurses-with-gpm")
582 (inputs `(("ncurses" ,ncurses/gpm)
583 ("guile" ,guile-2.2)))))
591 (uri (string-append "mirror://gnu/mcron/mcron-"
595 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
596 (patches (search-patches "mcron-install.patch"))))
597 (build-system gnu-build-system)
598 (native-inputs `(("pkg-config" ,pkg-config)))
599 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
600 (home-page "https://www.gnu.org/software/mcron/")
601 (synopsis "Run jobs at scheduled times")
603 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
604 tasks on a schedule, such as every hour or every Monday. Mcron is written in
605 Guile, so its configuration can be written in Scheme; the original cron
606 format is also supported.")
607 (license license:gpl3+)))
609 (define-public mcron2
610 ;; This is mthl's mcron development branch, not yet merged in mcron.
611 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
615 (version (string-append (package-version mcron) "-0."
616 (string-take commit 7)))
620 (url "https://notabug.org/mthl/mcron/")
624 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
625 (file-name (string-append name "-" version "-checkout"))))
627 `(("autoconf" ,autoconf)
628 ("automake" ,automake)
629 ("pkg-config" ,pkg-config)
631 ("help2man" ,help2man)))
633 `(#:modules ((ice-9 match) (ice-9 ftw)
634 ,@%gnu-build-system-modules)
636 #:phases (modify-phases %standard-phases
637 (add-after 'unpack 'bootstrap
639 (zero? (system* "autoreconf" "-vfi"))))
640 (add-after 'install 'wrap-mcron
641 (lambda* (#:key outputs #:allow-other-keys)
642 ;; Wrap the 'mcron' command to refer to the right
644 (let* ((out (assoc-ref outputs "out"))
645 (bin (string-append out "/bin"))
647 out "/share/guile/site")))
648 (match (scandir site)
650 (let ((modules (string-append site "/" version)))
651 (wrap-program (string-append bin "/mcron")
652 `("GUILE_LOAD_PATH" ":" prefix
654 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
658 (define-public guile-ics
665 (url "https://github.com/artyom-poptsov/guile-ics")
667 (file-name (string-append name "-" version "-checkout"))
670 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
671 (build-system gnu-build-system)
673 '(#:phases (modify-phases %standard-phases
674 (add-after 'unpack 'autoreconf
676 ;; Repository comes with a broken symlink
677 (delete-file "README")
678 (symlink "README.org" "README")
679 (zero? (system* "autoreconf" "-fi")))))))
681 `(("autoconf" ,(autoconf-wrapper))
682 ("automake" ,automake)
684 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
685 ("gettext" ,gettext-minimal)
686 ("pkg-config" ,pkg-config)))
687 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
688 (propagated-inputs `(("guile-lib" ,guile2.0-lib)))
689 (home-page "https://github.com/artyom-poptsov/guile-ics")
690 (synopsis "Guile parser library for the iCalendar format")
692 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
693 pure Scheme. The library can be used to read and write iCalendar data.
695 The library is shipped with documentation in Info format and usage examples.")
696 (license license:gpl3+)))
698 (define-public guile-lib
704 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
708 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
709 (build-system gnu-build-system)
712 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
714 (modify-phases %standard-phases
715 (add-before 'configure 'patch-module-dir
717 (substitute* "src/Makefile.in"
718 (("^moddir = ([[:graph:]]+)")
719 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
720 (("^godir = ([[:graph:]]+)")
722 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
724 (native-inputs `(("pkg-config" ,pkg-config)))
725 (inputs `(("guile" ,guile-2.2)))
726 (home-page "http://www.nongnu.org/guile-lib/")
727 (synopsis "Collection of useful Guile Scheme modules")
729 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
730 modules, allowing for people to cooperate integrating their generic Guile
731 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
734 ;; The whole is under GPLv3+, but some modules are under laxer
735 ;; distribution terms such as LGPL and public domain. See `COPYING' for
737 (license license:gpl3+)))
739 (define-public guile2.0-lib
740 (package-for-guile-2.0 guile-lib))
742 (define-public guile2.2-lib
743 (deprecated-package "guile2.2-lib" guile-lib))
745 (define-public guile-json
751 (uri (string-append "mirror://savannah/guile-json/guile-json-"
755 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
756 (modules '((guix build utils)))
758 ;; Make sure everything goes under .../site/X.Y, like Guile's
759 ;; search paths expects.
761 (substitute* "configure"
763 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
764 (substitute* '("Makefile.in" "json/Makefile.in")
765 (("moddir =.*/share/guile/site" all)
766 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
767 (build-system gnu-build-system)
768 (native-inputs `(("guile" ,guile-2.2)))
769 (home-page "http://savannah.nongnu.org/projects/guile-json/")
770 (synopsis "JSON module for Guile")
772 "Guile-JSON supports parsing and building JSON documents according to the
773 specification. These are the main features:
776 @item Strictly complies to @uref{http://json.org, specification}.
777 @item Build JSON documents programmatically via macros.
778 @item Unicode support for strings.
779 @item Allows JSON pretty printing.
781 (license license:lgpl3+)))
783 (define-public guile2.2-json
784 (deprecated-package "guile2.2-json" guile-json))
786 (define-public guile2.0-json
787 (package-for-guile-2.0 guile-json))
789 (define-public guile-minikanren
791 (name "guile-minikanren")
792 (version "20150424.e844d85")
796 (url "https://github.com/ijp/minikanren.git")
797 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
798 (file-name (string-append name "-" version "-checkout"))
801 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
802 (build-system trivial-build-system)
804 `(#:modules ((guix build utils))
807 (use-modules (guix build utils)
812 (let* ((out (assoc-ref %outputs "out"))
813 (guile (assoc-ref %build-inputs "guile"))
814 (effective (read-line
815 (open-pipe* OPEN_READ
816 (string-append guile "/bin/guile")
817 "-c" "(display (effective-version))")))
818 (module-dir (string-append out "/share/guile/site/"
820 (source (assoc-ref %build-inputs "source"))
821 (doc (string-append out "/share/doc/guile-minikanren"))
822 (scm-files '("minikanren.scm"
823 "minikanren/mkextraforms.scm"
824 "minikanren/mkprelude.scm"
825 "minikanren/mk.scm"))
826 (guild (string-append (assoc-ref %build-inputs "guile")
828 ;; Make installation directories.
829 (mkdir-p (string-append module-dir "/minikanren"))
832 ;; Compile .scm files and install.
834 (setenv "GUILE_AUTO_COMPILE" "0")
835 (for-each (lambda (file)
836 (let* ((dest-file (string-append module-dir "/"
838 (go-file (match (string-split file #\.)
840 (string-append module-dir "/"
842 ;; Install source module.
843 (copy-file file dest-file)
844 ;; Install compiled module.
845 (unless (zero? (system* guild "compile"
849 (error (format #f "Failed to compile ~s to ~s!"
853 ;; Also copy over the README.
854 (install-file "README.org" doc)
857 `(("guile" ,guile-2.0)))
858 (home-page "https://github.com/ijp/minikanren")
859 (synopsis "MiniKanren declarative logic system, packaged for Guile")
861 "MiniKanren is a relational programming extension to the Scheme
862 programming Language, written as a smaller version of Kanren suitable for
863 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
864 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
866 This is Ian Price's r6rs packaged version of miniKanren, which deviates
867 slightly from miniKanren mainline.
869 See http://minikanren.org/ for more on miniKanren generally.")
870 (license license:expat)))
872 (define-public guile2.2-minikanren
873 (package-for-guile-2.2 guile-minikanren))
875 (define-public guile-miniadapton
876 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
879 (name "guile-miniadapton")
880 (version (string-append "0-" revision "." (string-take commit 9)))
884 (url "https://github.com/fisherdj/miniAdapton.git")
886 (file-name (string-append name "-" version "-checkout"))
889 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
890 (build-system gnu-build-system)
892 `(#:modules ((guix build utils)
896 (guix build gnu-build-system))
897 #:tests? #f ; there is no test target
899 (modify-phases %standard-phases
903 (lambda* (#:key outputs #:allow-other-keys)
904 (let* ((cwd (getcwd))
905 (scm-files (find-files "." "\\.scm$"))
906 (effective (read-line
907 (open-pipe* OPEN_READ
909 "(display (effective-version))")))
910 (module-dir (string-append (assoc-ref outputs "out")
914 ;; Make installation directories.
917 (setenv "GUILE_AUTO_COMPILE" "0")
919 ;; Compile .scm files and install.
920 (every (lambda (file)
921 (let ((go-file (string-append module-dir "/"
922 (basename file ".scm") ".go")))
923 ;; Install source module.
924 (install-file file module-dir)
925 ;; Compile and install module.
926 (zero? (system* "guild" "compile" "-L" cwd
927 "-o" go-file file))))
930 `(("guile" ,guile-2.2)))
931 (home-page "https://github.com/fisherdj/miniAdapton")
932 (synopsis "Minimal implementation of incremental computation in Guile
934 (description "This package provides a complete Scheme implementation of
935 miniAdapton, which implements the core functionality of the Adapton system for
936 incremental computation (also known as self-adjusting computation). Like
937 Adapton, miniAdapton allows programmers to safely combine mutation and
938 memoization. miniAdapton is built on top of an even simpler system,
939 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
940 understand, extend, and port to host languages other than Scheme.")
941 (license license:expat))))
943 (define-public guile-irregex
945 (name "guile-irregex")
950 "http://synthcode.com/scheme/irregex/irregex-"
954 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
955 (build-system gnu-build-system)
957 `(#:modules ((guix build utils)
961 (guix build gnu-build-system))
963 (modify-phases %standard-phases
968 (lambda* (#:key inputs outputs #:allow-other-keys)
969 (let* ((out (assoc-ref outputs "out"))
970 (effective (read-line
971 (open-pipe* OPEN_READ
973 "(display (effective-version))")))
974 (module-dir (string-append out "/share/guile/site/"
976 (source (assoc-ref inputs "source"))
977 (doc (string-append out "/share/doc/guile-irregex/"))
978 (guild (string-append (assoc-ref %build-inputs "guile")
980 ;; Make installation directories.
981 (mkdir-p (string-append module-dir "/rx/source"))
984 ;; Compile .scm files and install.
985 (setenv "GUILE_AUTO_COMPILE" "0")
987 (for-each (lambda (copy-info)
989 ((src-file dest-file-basis)
990 (let* ((dest-file (string-append
991 module-dir dest-file-basis
993 (go-file (string-append
994 module-dir dest-file-basis
996 ;; Install source module.
999 ;; Install compiled module.
1000 (unless (zero? (system* guild "compile"
1004 (error (format #f "Failed to compile ~s to ~s!"
1005 src-file dest-file)))))))
1006 '(("irregex-guile.scm" "/rx/irregex")
1007 ("irregex.scm" "/rx/source/irregex")
1008 ;; Not really reachable via guile's packaging system,
1009 ;; but nice to have around
1010 ("irregex-utils.scm" "/rx/source/irregex-utils")))
1012 ;; Also copy over the README.
1013 (install-file "irregex.html" doc)
1016 `(("guile" ,guile-2.0)))
1017 (home-page "http://synthcode.com/scheme/irregex")
1018 (synopsis "S-expression based regular expressions")
1020 "Irregex is an s-expression based alternative to your classic
1021 string-based regular expressions. It implements SRFI 115 and is deeply
1022 inspired by the SCSH regular expression system.")
1023 (license license:bsd-3)))
1025 (define-public guile2.2-irregex
1026 (package-for-guile-2.2 guile-irregex))
1028 ;; There are two guile-gdbm packages, one using the FFI and one with
1029 ;; direct C bindings, hence the verbose name.
1031 (define-public guile-gdbm-ffi
1033 (name "guile-gdbm-ffi")
1034 (version "20120209.fa1d5b6")
1038 (url "https://github.com/ijp/guile-gdbm.git")
1039 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1040 (file-name (string-append name "-" version "-checkout"))
1043 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1044 (build-system trivial-build-system)
1047 ((guix build utils))
1050 (use-modules (guix build utils)
1054 ;; Avoid warnings we can safely ignore
1055 (setenv "GUILE_AUTO_COMPILE" "0")
1057 (let* ((out (assoc-ref %outputs "out"))
1060 (open-pipe* OPEN_READ
1062 (assoc-ref %build-inputs "guile")
1064 "-c" "(display (effective-version))")))
1065 (module-dir (string-append out "/share/guile/site/"
1067 (source (assoc-ref %build-inputs "source"))
1068 (doc (string-append out "/share/doc"))
1069 (guild (string-append (assoc-ref %build-inputs "guile")
1072 (string-append module-dir "/gdbm.scm"))
1074 (string-append module-dir "/gdbm.go"))
1076 (lambda (in-file out-file)
1077 (system* guild "compile" "-o" out-file in-file))))
1078 ;; Switch directory for compiling and installing
1081 ;; Install the documentation.
1082 (install-file "README.md" doc)
1083 (copy-recursively "examples" (string-append doc "/examples"))
1085 ;; Make installation directories.
1086 (mkdir-p module-dir)
1089 (copy-file "gdbm.scm" gdbm.scm-dest)
1092 (substitute* gdbm.scm-dest
1093 (("\\(dynamic-link \"libgdbm\"\\)")
1094 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1095 (assoc-ref %build-inputs "gdbm"))))
1097 ;; compile to the destination
1098 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1100 `(("guile" ,guile-2.0)))
1103 (home-page "https://github.com/ijp/guile-gdbm")
1104 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1106 "Guile bindings to the GDBM key-value storage system, using
1107 Guile's foreign function interface.")
1108 (license license:gpl3+)))
1110 (define-public guile2.2-gdbm-ffi
1111 (package-for-guile-2.2 guile-gdbm-ffi))
1113 (define-public guile-sqlite3
1114 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
1116 (name "guile-sqlite3")
1117 (version (string-append "0.0-1." (string-take commit 7)))
1119 ;; XXX: This used to be available read-only at
1120 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1121 ;; eventually disappeared, so we have our own copy here.
1122 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1130 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
1131 (file-name (string-append name "-" version "-checkout"))
1132 (modules '((guix build utils)))
1134 ;; Upgrade 'Makefile.am' to the current way of doing things.
1135 '(substitute* "Makefile.am"
1136 (("TESTS_ENVIRONMENT")
1137 "TEST_LOG_COMPILER")))))
1139 (build-system gnu-build-system)
1141 `(("autoconf" ,autoconf)
1142 ("automake" ,automake)
1143 ("pkg-config" ,pkg-config)))
1145 `(("guile" ,guile-2.2)
1146 ("sqlite" ,sqlite)))
1148 '(#:phases (modify-phases %standard-phases
1149 (add-after 'unpack 'autoreconf
1151 (zero? (system* "autoreconf" "-vfi"))))
1152 (add-before 'build 'set-sqlite3-file-name
1153 (lambda* (#:key inputs #:allow-other-keys)
1154 (substitute* "sqlite3.scm"
1156 (string-append "\"" (assoc-ref inputs "sqlite")
1157 "/lib/libsqlite3\"")))
1159 (synopsis "Access SQLite databases from Guile")
1161 "This package provides Guile bindings to the SQLite database system.")
1162 (license license:gpl3+))))
1164 (define-public haunt
1170 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1174 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1175 (build-system gnu-build-system)
1177 `(#:modules ((ice-9 match) (ice-9 ftw)
1178 ,@%gnu-build-system-modules)
1179 #:tests? #f ; test suite is non-deterministic :(
1180 #:phases (modify-phases %standard-phases
1181 (add-after 'install 'wrap-haunt
1182 (lambda* (#:key outputs #:allow-other-keys)
1183 ;; Wrap the 'haunt' command to refer to the right
1185 (let* ((out (assoc-ref outputs "out"))
1186 (bin (string-append out "/bin"))
1187 (site (string-append
1188 out "/share/guile/site")))
1189 (match (scandir site)
1191 (let ((modules (string-append site "/" version)))
1192 (wrap-program (string-append bin "/haunt")
1193 `("GUILE_LOAD_PATH" ":" prefix
1195 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1199 `(("pkg-config" ,pkg-config)
1200 ("texinfo" ,texinfo)))
1202 `(("guile" ,guile-2.2)))
1204 `(("guile-reader" ,guile-reader)
1205 ("guile-commonmark" ,guile-commonmark)))
1206 (synopsis "Functional static site generator")
1207 (description "Haunt is a static site generator written in Guile
1208 Scheme. Haunt features a functional build system and an extensible
1209 interface for reading articles in any format.")
1210 (home-page "http://haunt.dthompson.us")
1211 (license license:gpl3+)))
1213 (define-public guile2.0-haunt
1214 (package-for-guile-2.0
1215 (package (inherit haunt) (name "guile2.0-haunt"))))
1216 (define-public guile2.2-haunt
1217 (deprecated-package "guile2.2-haunt" haunt))
1219 (define-public guile-config
1221 (name "guile-config")
1226 "http://alex.pompo.co/software/" name "-" version
1230 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1231 (build-system gnu-build-system)
1233 `(("guile" ,guile-2.0)))
1234 (synopsis "Guile application configuration parsing library")
1236 "Guile Config is a library providing a declarative approach to
1237 application configuration specification. The library provides clean
1238 configuration declaration forms, and processors that take care of:
1239 configuration file creation; configuration file parsing; command-line
1240 parameter parsing using getopt-long; basic GNU command-line parameter
1241 generation (--help, --usage, --version); automatic output generation for the
1242 above command-line parameters.")
1243 (home-page "https://github.com/a-sassmannshausen/guile-config")
1244 (license license:agpl3+)))
1246 (define-public guile-redis
1248 (name "guile-redis")
1252 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1256 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1257 (modules '((guix build utils)))
1259 ;; Make sure everything goes under .../site/X.Y, like Guile's
1260 ;; search paths expects.
1262 (substitute* "configure"
1263 (("ac_subst_vars='")
1264 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1265 (substitute* '("Makefile.in"
1267 "redis/commands/Makefile.in")
1268 (("moddir =.*/share/guile/site" all)
1269 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1270 (build-system gnu-build-system)
1272 `(("guile" ,guile-2.0)))
1273 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1274 (synopsis "Redis client library for Guile")
1275 (description "Guile-redis provides a Scheme interface to the Redis
1276 key-value cache and store.")
1277 (license license:lgpl3+)))
1279 (define-public guile2.2-redis
1280 (package-for-guile-2.2 guile-redis))
1282 (define-public guile-wisp
1288 (uri (string-append "https://bitbucket.org/ArneBab/"
1289 "wisp/downloads/wisp-"
1293 "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
1294 (build-system gnu-build-system)
1296 `(#:modules ((guix build gnu-build-system)
1302 (modify-phases %standard-phases
1303 (add-before 'configure 'substitute-before-config
1305 (lambda* (#:key inputs #:allow-other-keys)
1306 (let ((bash (assoc-ref inputs "bash")))
1307 ;; Puts together some test files with /bin/bash hardcoded
1308 (substitute* "Makefile.in"
1309 (("/usr/bin/env bash")
1310 (string-append bash "/bin/bash"))
1311 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1312 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
1315 ;; auto compilation breaks, but if we set HOME to /tmp,
1318 'check 'auto-compile-hacky-workaround
1320 (setenv "HOME" "/tmp")
1322 (add-after 'install 'install-go-files
1323 (lambda* (#:key outputs inputs #:allow-other-keys)
1324 (let* ((out (assoc-ref outputs "out"))
1325 (effective (read-line
1326 (open-pipe* OPEN_READ
1328 "(display (effective-version))")))
1329 (module-dir (string-append out "/share/guile/site/"
1331 (object-dir (string-append out "/lib/guile/" effective
1333 (prefix (string-length module-dir)))
1334 ;; compile to the destination
1335 (for-each (lambda (file)
1336 (let* ((base (string-drop (string-drop-right file 4)
1338 (go (string-append object-dir base ".go")))
1339 (invoke "guild" "compile" "-L" module-dir
1341 (find-files module-dir "\\.scm$"))
1343 (home-page "http://draketo.de/english/wisp")
1345 `(("guile" ,guile-2.2)))
1347 `(("python" ,python)
1348 ("pkg-config" ,pkg-config)))
1349 (synopsis "Whitespace to lisp syntax for Guile")
1350 (description "Wisp is a syntax for Guile which provides a Python-like
1351 whitespace-significant language. It may be easier on the eyes for some
1352 users and in some situations.")
1353 (license license:gpl3+)))
1355 (define-public guile-sly
1361 (uri (string-append "https://files.dthompson.us/sly/sly-"
1365 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1366 (modules '((guix build utils)))
1369 (substitute* "configure"
1370 (("_guile_required_version=\"2.0.11\"")
1371 "_guile_required_version=\"2\"")
1372 (("ac_subst_vars='")
1373 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1374 (substitute* (find-files "." "Makefile.in")
1378 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1382 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))))))
1383 (build-system gnu-build-system)
1386 (list (string-append "--with-libfreeimage-prefix="
1387 (assoc-ref %build-inputs "freeimage"))
1388 (string-append "--with-libgslcblas-prefix="
1389 (assoc-ref %build-inputs "gsl")))))
1391 `(("pkg-config" ,pkg-config)))
1393 `(("guile-sdl" ,guile-sdl)
1394 ("guile-opengl" ,guile-opengl)))
1396 `(("guile" ,guile-2.2)
1398 ("freeimage" ,freeimage)
1400 (synopsis "2D/3D game engine for GNU Guile")
1401 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1402 features a functional reactive programming interface and live coding
1404 (home-page "http://dthompson.us/pages/software/sly.html")
1405 (license license:gpl3+)))
1407 (define-public g-wrap
1413 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1417 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1418 (build-system gnu-build-system)
1420 `(("pkg-config" ,pkg-config)))
1422 `(("guile" ,guile-2.2)
1423 ("guile-lib" ,guile-lib)))
1425 `(("libffi" ,libffi)))
1427 `(#:configure-flags '("--disable-Werror")
1429 (modify-phases %standard-phases
1430 (add-before 'configure 'pre-configure
1431 (lambda* (#:key outputs #:allow-other-keys)
1432 (let ((out (assoc-ref outputs "out")))
1433 (substitute* (find-files "." "^Makefile.in$")
1434 (("guilemoduledir =.*guile/site" all)
1435 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1437 (synopsis "Generate C bindings for Guile")
1438 (description "G-Wrap is a tool and Guile library for generating function
1439 wrappers for inter-language calls. It currently only supports generating Guile
1440 wrappers for C functions. Given a definition of the types and prototypes for
1441 a given C interface, G-Wrap will automatically generate the C code that
1442 provides access to that interface and its types from the Scheme level.")
1443 (home-page "http://www.nongnu.org/g-wrap/index.html")
1444 (license license:lgpl2.1+)))
1446 (define-public guile-dbi
1453 "http://download.gna.org/guile-dbi/guile-dbi-"
1457 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1458 (build-system gnu-build-system)
1461 (list (string-append
1462 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1464 (modify-phases %standard-phases
1465 (add-after 'install 'patch-extension-path
1466 (lambda* (#:key outputs #:allow-other-keys)
1467 (let* ((out (assoc-ref outputs "out"))
1468 (dbi.scm (string-append
1469 out "/share/guile/site/2.0/dbi/dbi.scm"))
1470 (ext (string-append out "/lib/libguile-dbi")))
1471 (substitute* dbi.scm (("libguile-dbi") ext))
1474 `(("guile" ,guile-2.0)))
1475 (synopsis "Guile database abstraction layer")
1476 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1478 "guile-dbi is a library for Guile that provides a convenient interface to
1479 SQL databases. Database programming with guile-dbi is generic in that the same
1480 programming interface is presented regardless of which database system is used.
1481 It currently supports MySQL, Postgres and SQLite3.")
1482 (license license:gpl2+)))
1484 (define-public guile-dbd-sqlite3
1486 (name "guile-dbd-sqlite3")
1491 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1495 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1496 (build-system gnu-build-system)
1498 `(("pkg-config" ,pkg-config)))
1500 `(("sqlite" ,sqlite)
1501 ("zlib" ,(@ (gnu packages compression) zlib))))
1503 `(("guile-dbi" ,guile-dbi)))
1504 (synopsis "Guile DBI driver for SQLite")
1505 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1507 "guile-dbi is a library for Guile that provides a convenient interface to
1508 SQL databases. This package implements the interface for SQLite.")
1509 (license license:gpl2+)))
1511 (define-public guile-dsv
1518 (url "https://github.com/artyom-poptsov/guile-dsv")
1519 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
1520 (file-name (string-append name "-" version "-checkout"))
1523 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
1524 (build-system gnu-build-system)
1526 `(("autoconf" ,autoconf)
1527 ("automake" ,automake)
1528 ("pkg-config" ,pkg-config)
1529 ("texinfo" ,texinfo)))
1530 (inputs `(("guile" ,guile-2.2)))
1531 (propagated-inputs `(("guile-lib" ,guile-lib)))
1533 '(#:phases (modify-phases %standard-phases
1534 (add-before 'configure 'set-guilesitedir
1536 (substitute* "Makefile.in"
1537 (("^guilesitedir =.*$")
1539 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1540 (substitute* "modules/Makefile.in"
1541 (("^guilesitedir =.*$")
1543 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1544 (substitute* "modules/dsv/Makefile.in"
1545 (("^guilesitedir =.*$")
1547 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1549 (add-after 'unpack 'autoreconf
1551 (zero? (system* "autoreconf" "-vfi")))))))
1552 (home-page "https://github.com/artyom-poptsov/guile-dsv")
1553 (synopsis "DSV module for Guile")
1555 "Guile-DSV is a GNU Guile module for working with the
1556 delimiter-separated values (DSV) data format. Guile-DSV supports the
1557 Unix-style DSV format and RFC 4180 format.")
1558 (license license:gpl3+)))
1560 (define-public guile-xosd
1566 (uri (string-append "https://github.com/alezost/" name
1567 "/releases/download/v" version
1568 "/" name "-" version ".tar.gz"))
1571 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1572 (build-system gnu-build-system)
1574 `(("pkg-config" ,pkg-config)))
1576 `(("guile" ,guile-2.2)
1578 ("libxext" ,libxext)
1579 ("libxinerama" ,libxinerama)
1581 (home-page "https://github.com/alezost/guile-xosd")
1582 (synopsis "XOSD bindings for Guile")
1584 "Guile-XOSD provides Guile bindings for @code{libxosd},
1585 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1587 (license license:gpl3+)))
1589 (define-public guile-daemon
1591 (name "guile-daemon")
1595 (uri (string-append "https://github.com/alezost/" name
1596 "/releases/download/v" version
1597 "/" name "-" version ".tar.gz"))
1600 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1601 (build-system gnu-build-system)
1603 `(("pkg-config" ,pkg-config)))
1605 `(("guile" ,guile-2.2)))
1606 (home-page "https://github.com/alezost/guile-daemon")
1607 (synopsis "Evaluate code in a running Guile process")
1609 "Guile-Daemon is a small Guile program that loads your initial
1610 configuration file, and then reads and evaluates Guile expressions that
1611 you send to a FIFO file.")
1612 (license license:gpl3+)))
1614 (define-public guile-commonmark
1616 (name "guile-commonmark")
1620 (uri (string-append "https://github.com/OrangeShark/" name
1621 "/releases/download/v" version
1622 "/" name "-" version ".tar.gz"))
1625 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1626 (modules '((guix build utils)))
1628 ;; Use the real effective version of Guile in directory names
1629 ;; instead of a hard-coded "/2.0".
1631 (substitute* "configure"
1632 (("ac_subst_vars='")
1633 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1634 (substitute* "Makefile.in"
1636 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1637 (build-system gnu-build-system)
1639 `(("guile" ,guile-2.2)))
1640 (synopsis "CommonMark parser for Guile")
1642 "guile-commonmark is a library for parsing CommonMark, a fully specified
1643 variant of Markdown. The library is written in Guile Scheme and is designed
1644 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1645 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1646 is no support for parsing block and inline level HTML.")
1647 (home-page "https://github.com/OrangeShark/guile-commonmark")
1648 (license license:lgpl3+)))
1650 (define-public guile2.0-commonmark
1651 (package-for-guile-2.0 guile-commonmark))
1652 (define-public guile2.2-commonmark
1653 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1655 (define-public guile-bytestructures
1657 (name "guile-bytestructures")
1658 (version "20170402.91d042e")
1662 (url "https://github.com/TaylanUB/scheme-bytestructures")
1663 (commit "91d042e3427e1d7740b604b6296c616cf2eec13d")))
1664 (file-name (string-append name "-" version "-checkout"))
1667 "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb"))
1668 (patches (search-patches "guile-bytestructures-name-clash.patch"))))
1669 (build-system trivial-build-system)
1671 `(#:modules ((guix build utils))
1674 (use-modules (guix build utils)
1681 (string-join (list (assoc-ref %build-inputs "tar")
1682 (assoc-ref %build-inputs "xz"))
1684 (system* "tar" "xf" (assoc-ref %build-inputs "source"))
1685 (match (scandir ".")
1686 (("." ".." directory)
1689 (let* ((out (assoc-ref %outputs "out"))
1690 (guile (assoc-ref %build-inputs "guile"))
1691 (effective (read-line
1692 (open-pipe* OPEN_READ
1693 (string-append guile "/bin/guile")
1694 "-c" "(display (effective-version))")))
1695 (module-dir (string-append out "/share/guile/site/"
1697 (object-dir (string-append out "/lib/guile/" effective
1700 (doc (string-append out "/share/doc/scheme-bytestructures"))
1701 (sld-files (with-directory-excursion source
1702 (find-files "bytestructures/r7" "\\.exports.sld$")))
1703 (scm-files (filter (lambda (path)
1704 (not (string-prefix? "bytestructures/r7" path)))
1705 (with-directory-excursion source
1706 (find-files "bytestructures" "\\.scm$"))))
1707 (guild (string-append (assoc-ref %build-inputs "guile")
1709 ;; Make installation directories.
1712 ;; Compile .scm files and install.
1714 (setenv "GUILE_AUTO_COMPILE" "0")
1715 (for-each (lambda (file)
1716 (let* ((dest-file (string-append module-dir "/"
1718 (go-file (string-append object-dir "/"
1720 (string-rindex file #\.))
1722 ;; Install source module.
1723 (mkdir-p (dirname dest-file))
1724 (copy-file file dest-file)
1726 ;; Install compiled module.
1727 (mkdir-p (dirname go-file))
1728 (unless (zero? (system* guild "compile"
1732 (error (format #f "Failed to compile ~s to ~s!"
1734 (append sld-files scm-files))
1736 ;; Also copy over the README.
1737 (install-file "README.md" doc)
1743 `(("guile" ,guile-2.2)))
1744 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1745 (synopsis "Structured access to bytevector contents for Guile")
1747 "Guile bytestructures offers a system imitating the type system
1748 of the C programming language, to be used on bytevectors. C's type
1749 system works on raw memory, and Guile works on bytevectors which are
1750 an abstraction over raw memory. It's also more powerful than the C
1751 type system, elevating types to first-class status.")
1752 (license license:gpl3+)))
1754 (define-public guile2.0-bytestructures
1755 (package-for-guile-2.0 guile-bytestructures))
1757 (define-public guile-aspell
1759 (name "guile-aspell")
1764 "http://lonelycactus.com/tarball/guile_aspell-"
1768 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1769 (build-system gnu-build-system)
1771 '(#:phases (modify-phases %standard-phases
1772 (add-before 'configure 'set-guilesitedir
1774 (substitute* "Makefile.in"
1775 (("^guilesitedir =.*$")
1777 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1779 (add-before 'build 'set-libaspell-file-name
1780 (lambda* (#:key inputs #:allow-other-keys)
1781 (let ((aspell (assoc-ref inputs "aspell")))
1782 (substitute* "aspell.scm"
1783 (("\"libaspell\\.so\"")
1784 (string-append "\"" aspell
1785 "/lib/libaspell\"")))
1787 (native-inputs `(("pkg-config" ,pkg-config)))
1788 (inputs `(("guile" ,guile-2.2)
1789 ("aspell" ,aspell)))
1790 (home-page "https://github.com/spk121/guile-aspell")
1791 (synopsis "Spell-checking from Guile")
1793 "guile-aspell is a Guile Scheme library for comparing a string against a
1794 dictionary and suggesting spelling corrections.")
1795 (license license:gpl3+)))
1797 (define-public guile-bash
1798 ;; This project is currently retired. It was initially announced here:
1799 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1800 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1804 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1806 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1814 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1815 (file-name (string-append name "-" version "-checkout"))))
1816 (build-system gnu-build-system)
1818 '(#:phases (modify-phases %standard-phases
1819 (add-after 'unpack 'bootstrap
1821 (zero? (system* "sh" "bootstrap")))))
1824 ;; Add -I to match 'bash.pc' of Bash 4.4.
1825 (list (string-append "CPPFLAGS=-I"
1826 (assoc-ref %build-inputs "bash:include")
1827 "/include/bash/include")
1829 ;; The '.a' file is useless.
1832 ;; Install 'lib/bash' as Bash 4.4 expects.
1833 (string-append "--libdir=" (assoc-ref %outputs "out")
1835 (native-inputs `(("pkg-config" ,pkg-config)
1836 ("autoconf" ,(autoconf-wrapper))
1837 ("automake" ,automake)
1838 ("libtool" ,libtool)
1839 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1840 ("gettext" ,gettext-minimal)
1842 ;; Bash with loadable module support, for the test
1844 ("bash-full" ,bash)))
1845 (inputs `(("guile" ,guile-2.0)
1846 ("bash:include" ,bash "include")))
1847 (synopsis "Extend Bash using Guile")
1849 "Guile-Bash provides a shared library and set of Guile modules,
1850 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1851 the following aspects of Bash:
1855 @item setting and getting Bash variables;
1856 @item creating dynamic variables;
1857 @item creating Bash functions with a Scheme implementation;
1858 @item reader macro for output capturing;
1859 @item reader macro for evaluating raw Bash commands.
1865 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1868 and then run @command{scm example.scm}.")
1869 (license license:gpl3+))))
1871 (define-public guile-8sync
1873 (name "guile-8sync")
1877 (uri (string-append "mirror://gnu/8sync/8sync-" version
1881 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1882 (build-system gnu-build-system)
1883 (native-inputs `(("autoconf" ,autoconf)
1884 ("automake" ,automake)
1885 ("guile" ,guile-2.2)
1886 ("pkg-config" ,pkg-config)
1887 ("texinfo" ,texinfo)))
1889 `(#:phases (modify-phases %standard-phases
1890 (add-before 'configure 'setenv
1893 (setenv "GUILE_AUTO_COMPILE" "0")
1895 (home-page "https://gnu.org/s/8sync/")
1896 (synopsis "Asynchronous actor model library for Guile")
1898 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1899 library for GNU Guile based on the actor model.
1901 Note that 8sync is only available for Guile 2.2.")
1902 (license license:lgpl3+)))
1904 (define-public guile-fibers
1906 (name "guile-fibers")
1910 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1914 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1915 (build-system gnu-build-system)
1917 `(("texinfo" ,texinfo)
1918 ("pkg-config" ,pkg-config)))
1920 `(("guile" ,guile-2.2)))
1921 (synopsis "Lightweight concurrency facility for Guile")
1923 "Fibers is a Guile library that implements a a lightweight concurrency
1924 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1925 like a \"goroutine\" from the Go language: a lightweight thread-like
1926 abstraction. Systems built with Fibers can scale up to millions of concurrent
1927 fibers, tens of thousands of concurrent socket connections, and many parallel
1928 cores. The Fibers library also provides Concurrent ML-like channels for
1929 communication between fibers.
1931 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1932 is not available for Guile 2.0.")
1933 (home-page "https://github.com/wingo/fibers")
1934 (license license:lgpl3+)))
1936 (define-public guile-git
1937 (let ((revision "4")
1938 (commit "951a32c56cc4d80f8836e3c7394783e69c1fcbad"))
1941 (version (string-append "0.0-" revision "." (string-take commit 7)))
1942 (home-page "https://gitlab.com/guile-git/guile-git.git")
1945 (uri (git-reference (url home-page) (commit commit)))
1948 "0qri9x73ij6g40ijs4hyhj8knxw39ydgghiafq74dp99bc8hh0qc"))
1949 (file-name (git-file-name name version))))
1950 (build-system gnu-build-system)
1952 `(#:phases (modify-phases %standard-phases
1953 (add-after 'unpack 'bootstrap
1955 (zero? (system* "autoreconf" "-vfi"))))
1957 ;; FIXME: On i686, bytestructures miscalculates the offset
1958 ;; of the 'old-file' and 'new-file' fields within the
1959 ;; '%diff-delta' structure.
1960 ,@(if (string=? (%current-system) "x86_64-linux")
1962 '((add-before 'check 'skip-tests
1964 (substitute* "Makefile"
1965 (("tests/status\\.scm")
1969 `(("autoconf" ,autoconf)
1970 ("automake" ,automake)
1971 ("texinfo" ,texinfo)
1972 ("pkg-config" ,pkg-config)))
1974 `(("guile" ,guile-2.2)
1975 ("libgit2" ,libgit2)))
1977 `(("guile-bytestructures" ,guile-bytestructures)))
1978 (synopsis "Guile bindings for libgit2")
1980 "This package provides Guile bindings to libgit2, a library to
1981 manipulate repositories of the Git version control system.")
1982 (license license:gpl3+))))
1984 (define-public guile2.0-git
1985 (package-for-guile-2.0 guile-git))
1987 (define-public guile-syntax-highlight
1988 (let ((commit "a047675e66861b647426372aa2ba7820f749616d")
1991 (name "guile-syntax-highlight")
1992 (version (string-append "0.0." revision "."
1993 (string-take commit 7)))
1997 (url "git://dthompson.us/guile-syntax-highlight.git")
1999 (file-name (string-append name "-" version "-checkout"))
2002 "1zjr6sg3n7xbdsliy45i39dqanxvcms58ayx36wxrz72zpq58vq3"))))
2003 (build-system gnu-build-system)
2005 '(#:phases (modify-phases %standard-phases
2006 (add-after 'unpack 'bootstrap
2008 (zero? (system* "sh" "bootstrap")))))))
2010 `(("autoconf" ,autoconf)
2011 ("automake" ,automake)
2012 ("pkg-config" ,pkg-config)))
2014 `(("guile" ,guile-2.2)))
2015 (synopsis "General-purpose syntax highlighter for GNU Guile")
2016 (description "Guile-syntax-highlight is a general-purpose syntax
2017 highlighting library for GNU Guile. It can parse code written in various
2018 programming languages into a simple s-expression that can be converted to
2019 HTML (via SXML) or any other format for rendering.")
2020 (home-page "http://dthompson.us/software/guile-syntax-highlight")
2021 (license license:lgpl3+))))
2023 (define-public guile-sjson
2025 (name "guile-sjson")
2029 (uri (string-append "https://dustycloud.org/misc/sjson-" version
2033 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
2034 (build-system gnu-build-system)
2037 (modify-phases %standard-phases
2038 (add-after 'unpack 'bootstrap
2039 (lambda _ (zero? (system* "sh" "bootstrap.sh")))))))
2041 `(("autoconf" ,autoconf)
2042 ("automake" ,automake)
2043 ("pkg-config" ,pkg-config)))
2045 `(("guile" ,guile-2.2)))
2046 (home-page "https://gitlab.com/dustyweb/guile-sjson")
2047 (synopsis "S-expression based json reader/writer for Guile")
2048 (description "guile-sjson is a json reader/writer for Guile.
2049 It has a nice, simple s-expression based syntax.")
2050 (license license:lgpl3+)))
2052 (define-public guile-colorized
2054 (name "guile-colorized")
2058 (uri (string-append "https://github.com/NalaGinrut/guile-colorized/"
2059 "archive/v" version ".tar.gz"))
2060 (file-name (string-append name "-" version ".tar.gz"))
2063 "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
2064 (build-system gnu-build-system)
2066 `(#:modules ((system base compile)
2067 ,@%gnu-build-system-modules)
2068 #:tests? #f ;No tests included
2070 (modify-phases %standard-phases
2071 (delete 'configure) ;No configure script
2073 (lambda* (#:key outputs inputs #:allow-other-keys)
2074 (let* ((out (assoc-ref outputs "out"))
2075 (module-dir (string-append out "/share/guile/site/2.2"))
2076 (language-dir (string-append module-dir "/ice-9"))
2077 (guild (string-append (assoc-ref inputs "guile")
2079 ;; The original 'make install' is too primitive.
2082 (install-file "ice-9/colorized.scm" language-dir)
2084 ;; compile to the destination
2085 (compile-file "ice-9/colorized.scm"
2086 #:output-file (string-append
2087 language-dir "/colorized.go"))
2090 `(("guile" ,guile-2.2)))
2091 (home-page "https://github.com/NalaGinrut/guile-colorized")
2092 (synopsis "Colorized REPL for Guile")
2094 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
2095 (license license:gpl3+)))
2097 ;;; guile.scm ends here