1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015, 2018 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, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages guile)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages admin) ;;for tree
40 #:use-module (gnu packages aspell)
41 #:use-module (gnu packages bash)
42 #:use-module (gnu packages bdw-gc)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages gawk)
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages libffi)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages flex)
49 #:use-module (gnu packages libunistring)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages m4)
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages readline)
55 #:use-module (gnu packages ncurses)
56 #:use-module (gnu packages ed)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages man)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages sdl)
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages version-control)
68 #:use-module (gnu packages xdisorg)
69 #:use-module (gnu packages xorg)
70 #:use-module (guix packages)
71 #:use-module (guix download)
72 #:use-module (guix git-download)
73 #:use-module (guix build-system gnu)
74 #:use-module (guix build-system trivial)
75 #:use-module (guix utils)
76 #:use-module (ice-9 match)
77 #:use-module ((srfi srfi-1) #:prefix srfi-1:))
81 ;;; GNU Guile, and modules and extensions.
85 (define-public guile-1.8
91 (uri (string-append "mirror://gnu/guile/guile-" version
95 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
96 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
97 (build-system gnu-build-system)
98 (arguments '(#:configure-flags '("--disable-error-on-warning")
100 ;; Insert a phase before `configure' to patch things up.
102 (modify-phases %standard-phases
103 (add-before 'configure 'patch-stuff
104 (lambda* (#:key outputs #:allow-other-keys)
105 ;; Add a call to `lt_dladdsearchdir' so that
106 ;; `libguile-readline.so' & co. are in the
107 ;; loader's search path.
108 (substitute* "libguile/dynl.c"
109 (("lt_dlinit.*$" match)
111 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
113 (assoc-ref outputs "out"))))
115 ;; The usual /bin/sh...
116 (substitute* "ice-9/popen.scm"
117 (("/bin/sh") (which "sh")))
119 (inputs `(("gawk" ,gawk)
120 ("readline" ,readline)))
122 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
124 (propagated-inputs `(("gmp" ,gmp)
125 ("libltdl" ,libltdl)))
127 ;; When cross-compiling, a native version of Guile itself is needed.
128 (self-native-input? #t)
131 (list (search-path-specification
132 (variable "GUILE_LOAD_PATH")
133 (files '("share/guile/site")))))
135 (synopsis "Scheme implementation intended especially for extensions")
137 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
138 official extension language of the GNU system. It is an implementation of
139 the Scheme language which can be easily embedded in other applications to
140 provide a convenient means of extending the functionality of the application
141 without requiring the source code to be rewritten.")
142 (home-page "https://www.gnu.org/software/guile/")
143 (license license:lgpl2.0+)))
145 (define-public guile-2.0
151 (uri (string-append "mirror://gnu/guile/guile-" version
155 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
156 (build-system gnu-build-system)
157 (native-inputs `(("pkgconfig" ,pkg-config)))
158 (inputs `(("libffi" ,libffi)
159 ,@(libiconv-if-needed)
161 ;; We need Bash when cross-compiling because some of the scripts
162 ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
163 ;; an interactive Bash with Readline and all.
164 ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
166 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
167 ;; reads `-lltdl -lunistring', adding them here will add the needed
168 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
169 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
170 ("libunistring" ,libunistring)
172 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
173 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
176 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
177 ;; must be propagated.
181 (self-native-input? #t)
183 (outputs '("out" "debug"))
186 `(#:configure-flags '("--disable-static") ; saves 3 MiB
188 (modify-phases %standard-phases
189 (add-before 'configure 'pre-configure
190 (lambda* (#:key inputs #:allow-other-keys)
191 ;; Tell (ice-9 popen) the file name of Bash.
192 (let ((bash (assoc-ref inputs "bash")))
193 (substitute* "module/ice-9/popen.scm"
194 ;; If bash is #f allow fallback for user to provide
195 ;; "bash" in PATH. This happens when cross-building to
196 ;; MinGW for which we do not have Bash yet.
198 ,@(if (target-mingw?)
200 (string-append bash "/bin/bash")
202 '((string-append bash "/bin/bash")))))
206 (list (search-path-specification
207 (variable "GUILE_LOAD_PATH")
208 (files '("share/guile/site/2.0")))
209 (search-path-specification
210 (variable "GUILE_LOAD_COMPILED_PATH")
211 (files '("lib/guile/2.0/site-ccache"
212 "share/guile/site/2.0")))))
214 (synopsis "Scheme implementation intended especially for extensions")
216 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
217 official extension language of the GNU system. It is an implementation of
218 the Scheme language which can be easily embedded in other applications to
219 provide a convenient means of extending the functionality of the application
220 without requiring the source code to be rewritten.")
221 (home-page "https://www.gnu.org/software/guile/")
222 (license license:lgpl3+)))
224 (define-public guile-2.2
225 (package (inherit guile-2.0)
231 ;; Note: we are limited to one of the compression formats
232 ;; supported by the bootstrap binaries, so no lzip here.
233 (uri (string-append "mirror://gnu/guile/guile-" version
237 "11j01agvnci2cx32wwpqs9078856yxmvs15gcsz7ganpkj2ahlw3"))
238 (modules '((guix build utils)))
240 ;; Remove the pre-built object files. Instead, build everything
241 ;; from source, at the expense of significantly longer build
242 ;; times (almost 3 hours on a 4-core Intel i5).
244 (for-each delete-file
245 (find-files "prebuilt" "\\.go$"))
247 (properties '((timeout . 72000) ;20 hours
248 (max-silent-time . 36000))) ;10 hours (needed on ARM
249 ; when heavily loaded)
251 (list (search-path-specification
252 (variable "GUILE_LOAD_PATH")
253 (files '("share/guile/site/2.2")))
254 (search-path-specification
255 (variable "GUILE_LOAD_COMPILED_PATH")
256 (files '("lib/guile/2.2/site-ccache"
257 "share/guile/site/2.2")))))
260 (if (%current-target-system)
261 (substitute-keyword-arguments (package-arguments guile-2.0)
262 ((#:phases phases '%standard-phases)
263 `(modify-phases ,phases
264 (add-after 'unpack 'sacrifice-elisp-support
266 ;; Cross-compiling language/elisp/boot.el fails, so
268 ;; <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=988aa29238fca862c7e2cb55f15762a69b4c16ce>
269 ;; for the upstream fix.
270 (substitute* "module/Makefile.in"
271 (("language/elisp/boot\\.el")
274 (package-arguments guile-2.0)))))
276 (define-public guile-2.2/fixed
277 ;; A package of Guile 2.2 that's rarely changed. It is the one used
278 ;; in the `base' module, and thus changing it entails a full rebuild.
281 (properties '((hidden? . #t) ;people should install 'guile-2.2'
282 (timeout . 72000) ;20 hours
283 (max-silent-time . 36000))) ;10 hours (needed on ARM
284 ; when heavily loaded)
287 (define-public guile-2.2.2
288 ;; Keep it so that, when 'guix' runs on 2.2.2, 'guix pull' compiles objects
289 ;; with 2.2.2, thereby avoiding the ABI incompatibility issues described in
290 ;; <https://bugs.gnu.org/29570>.
295 (inherit (package-source guile-2.2))
296 (uri (string-append "mirror://gnu/guile/guile-" version
300 "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w"))))))
302 (define-public guile-next
303 (deprecated-package "guile-next" guile-2.2))
305 (define (make-guile-readline guile)
307 (name "guile-readline")
308 (version (package-version guile))
309 (source (package-source guile))
310 (build-system gnu-build-system)
312 '(#:configure-flags '("--disable-silent-rules")
313 #:phases (modify-phases %standard-phases
314 (add-before 'build 'chdir
315 (lambda* (#:key outputs #:allow-other-keys)
316 (invoke "make" "-C" "libguile" "scmconfig.h")
317 (invoke "make" "-C" "lib")
318 (chdir "guile-readline")
320 (substitute* "Makefile"
321 (("../libguile/libguile-[[:graph:]]+\\.la")
322 ;; Remove dependency on libguile-X.Y.la.
324 (("^READLINE_LIBS = (.*)$" _ libs)
325 ;; Link against the provided libguile.
326 (string-append "READLINE_LIBS = "
327 "-lguile-$(GUILE_EFFECTIVE_VERSION) "
329 (("\\$\\(top_builddir\\)/meta/build-env")
330 ;; Use the provided Guile, not the one from
334 ;; Install modules to the 'site' directories.
336 "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
337 (("^ccachedir = .*$")
338 "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
340 ;; Load 'guile-readline.so' from the right place.
341 (substitute* "ice-9/readline.scm"
342 (("load-extension \"guile-readline\"")
343 (format #f "load-extension \
344 (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
345 (assoc-ref outputs "out"))))
347 (home-page (package-home-page guile))
348 (native-inputs (package-native-inputs guile))
350 `(,@(package-inputs guile) ;to placate 'configure'
351 ,@(package-propagated-inputs guile)
353 ("readline" ,readline)))
354 (synopsis "Line editing support for GNU Guile")
356 "This module provides line editing support via the Readline library for
357 GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
358 @code{activate-readline} procedure to enable it.")
359 (license license:gpl3+)))
361 (define-public guile-readline
362 (make-guile-readline guile-2.2))
364 (define (guile-variant-package-name prefix)
366 "Return NAME with PREFIX instead of \"guile-\", when applicable."
367 (if (string-prefix? "guile-" name)
368 (string-append prefix "-"
370 (string-length "guile-")))
373 (define package-for-guile-2.2
374 ;; A procedure that rewrites the dependency tree of the given package to use
375 ;; GUILE-2.2 instead of GUILE-2.0.
376 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
377 (guile-variant-package-name "guile2.2")))
379 (define package-for-guile-2.0
380 ;; Likewise, but the other way around. :-)
381 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
382 (guile-variant-package-name "guile2.0")))
384 (define-public guile-for-guile-emacs
385 (package (inherit guile-2.2)
386 (name "guile-for-guile-emacs")
387 (version "20150510.d8d9a8d")
391 (url "git://git.hcoop.net/git/bpt/guile.git")
392 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
393 (file-name (string-append name "-" version "-checkout"))
396 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
398 (substitute-keyword-arguments `(;; Tests aren't passing for now.
399 ;; Obviously we should re-enable this!
401 ,@(package-arguments guile-2.2))
403 `(modify-phases ,phases
404 (add-after 'unpack 'autogen
406 (zero? (system* "sh" "autogen.sh"))))
407 (add-before 'autogen 'patch-/bin/sh
409 (substitute* "build-aux/git-version-gen"
410 (("#!/bin/sh") (string-append "#!" (which "sh"))))
413 `(("autoconf" ,autoconf)
414 ("automake" ,automake)
418 ("gettext" ,gettext-minimal)
419 ,@(package-native-inputs guile-2.2)))
420 ;; Same as in guile-2.0
422 (list (search-path-specification
423 (variable "GUILE_LOAD_PATH")
424 (files '("share/guile/site/2.0")))
425 (search-path-specification
426 (variable "GUILE_LOAD_COMPILED_PATH")
427 (files '("lib/guile/2.0/site-ccache"
428 "share/guile/site/2.0")))))))
430 ;; There has not been any release yet.
431 (define-public guildhall
432 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
436 (version (string-append "0-" revision "." (string-take commit 9)))
440 (url "https://github.com/ijp/guildhall.git")
442 (file-name (string-append name "-" version "-checkout"))
445 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
446 (build-system gnu-build-system)
449 (modify-phases %standard-phases
450 ;; Tests fail without this fix because they try to load the bash
451 ;; executable as a Scheme file. See bug report at
452 ;; https://github.com/ijp/guildhall/issues/22
453 (add-after 'unpack 'fix-bug-22
455 (substitute* "Makefile.am"
456 (("TESTS_ENVIRONMENT=.*")
457 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
458 TEST_EXTENSIONS = .scm
459 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
460 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
461 ;; FIXME: one of the database tests fails for unknown
462 ;; reasons. It does not fail when run outside of Guix.
463 (("tests/database.scm") ""))
465 (add-after 'fix-bug-22 'autogen
467 (zero? (system* "sh" "autogen.sh")))))))
469 `(("guile" ,guile-2.0)))
471 `(("zip" ,zip) ; for tests
472 ("autoconf" ,autoconf)
473 ("automake" ,automake)
474 ("texinfo" ,texinfo)))
475 (synopsis "Package manager for Guile")
477 "Guildhall is a package manager written for Guile Scheme. A guild is
478 an association of independent craftspeople. A guildhall is where they meet.
479 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
482 On a practical level, Guildhall lets you share Scheme modules and programs
483 over the internet, and install code that has been shared by others. Guildhall
484 can handle dependencies, so when a program requires several libraries, and
485 each of those has further dependencies, all of the prerequisites for the
486 program can be installed in one go.")
487 (home-page "https://github.com/ijp/guildhall")
488 (license license:gpl3+))))
495 (define-public artanis
496 (let ((release "0.2.1")
500 (version (if (zero? revision)
502 (string-append release "-"
503 (number->string revision))))
506 (uri (string-append "mirror://gnu/artanis/artanis-"
508 (file-name (string-append name "-" version ".tar.gz"))
511 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
512 (modules '((guix build utils)))
515 (delete-file-recursively "artanis/third-party/json.scm")
516 (delete-file-recursively "artanis/third-party/json")
517 (substitute* '("artanis/artanis.scm"
519 (("(#:use-module \\()artanis third-party (json\\))" _
521 (string-append use-module json)))
522 (substitute* "artanis/oht.scm"
523 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
524 _ pre json-string post)
528 (substitute* "artanis/artanis.scm"
529 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
532 (build-system gnu-build-system)
533 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
534 (inputs `(("guile" ,guile-2.2)
535 ("guile-json" ,guile-json)))
536 (native-inputs `(("bash" ,bash) ;for the `source' builtin
537 ("pkgconfig" ,pkg-config)
538 ("util-linux" ,util-linux))) ;for the `script' command
541 ;; TODO: The documentation must be built with the `docs' target.
542 (let* ((out (assoc-ref %outputs "out"))
543 (scm (string-append out "/share/guile/site/2.2"))
544 (go (string-append out "/lib/guile/2.2/site-ccache")))
545 ;; Don't use (%site-dir) for site paths.
546 (list (string-append "MOD_PATH=" scm)
547 (string-append "MOD_COMPILED_PATH=" go)))
550 (modify-phases %standard-phases
551 (add-before 'install 'substitute-root-dir
552 (lambda* (#:key outputs #:allow-other-keys)
553 (let ((out (assoc-ref outputs "out")))
554 (substitute* "Makefile" ;ignore the execution of bash.bashrc
555 ((" /etc/bash.bashrc") " /dev/null"))
556 (substitute* "Makefile" ;set the root of config files to OUT
557 ((" /etc") (string-append " " out "/etc")))
558 (mkdir-p (string-append out "/bin")) ;for the `art' executable
560 (add-after 'install 'wrap-art
561 (lambda* (#:key outputs #:allow-other-keys)
562 (let* ((out (assoc-ref outputs "out"))
563 (bin (string-append out "/bin"))
564 (scm (string-append out "/share/guile/site/2.2"))
565 (go (string-append out "/lib/guile/2.2/site-ccache")))
566 (wrap-program (string-append bin "/art")
567 `("GUILE_LOAD_PATH" ":" prefix (,scm))
568 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
570 (synopsis "Web application framework written in Guile")
571 (description "GNU Artanis is a web application framework written in Guile
572 Scheme. A web application framework (WAF) is a software framework that is
573 designed to support the development of dynamic websites, web applications, web
574 services and web resources. The framework aims to alleviate the overhead
575 associated with common activities performed in web development. Artanis
576 provides several tools for web development: database access, templating
577 frameworks, session management, URL-remapping for RESTful, page caching, and
579 (home-page "https://www.gnu.org/software/artanis/")
580 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
582 (define-public guile-reader
584 (name "guile-reader")
588 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
592 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
593 (build-system gnu-build-system)
594 (native-inputs `(("pkgconfig" ,pkg-config)
595 ("gperf" ,gperf-3.0)))
596 (inputs `(("guile" ,guile-2.2)))
597 (synopsis "Framework for building readers for GNU Guile")
599 "Guile-Reader is a simple framework for building readers for GNU Guile.
601 The idea is to make it easy to build procedures that extend Guile’s read
602 procedure. Readers supporting various syntax variants can easily be written,
603 possibly by re-using existing “token readers” of a standard Scheme
604 readers. For example, it is used to implement Skribilo’s R5RS-derived
607 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
608 hopefully more powerful and flexible (for instance, one may instantiate as
609 many readers as needed).")
610 (home-page "https://www.nongnu.org/guile-reader/")
611 (license license:gpl3+)))
613 (define-public guile2.0-reader
614 (package-for-guile-2.0 guile-reader))
615 (define-public guile2.2-reader
616 (deprecated-package "guile2.2-reader" guile-reader))
618 (define-public guile-ncurses
620 (name "guile-ncurses")
624 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
628 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
629 (build-system gnu-build-system)
630 (inputs `(("ncurses" ,ncurses)
631 ("guile" ,guile-2.2)))
632 (native-inputs `(("pkg-config" ,pkg-config)))
634 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
635 "--with-gnu-filesystem-hierarchy")
637 (modify-phases %standard-phases
638 (add-before 'build 'fix-libguile-ncurses-file-name
639 (lambda* (#:key outputs #:allow-other-keys)
640 (and (zero? (system* "make" "install"
643 (parallel-job-count))))
644 (let* ((out (assoc-ref outputs "out"))
646 (files (find-files dir ".scm")))
648 (("\"libguile-ncurses\"")
649 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
652 (home-page "https://www.gnu.org/software/guile-ncurses/")
653 (synopsis "Guile bindings to ncurses")
655 "guile-ncurses provides Guile language bindings for the ncurses
657 (license license:lgpl3+)))
659 (define-public guile-ncurses/gpm
661 (inherit guile-ncurses)
662 (name "guile-ncurses-with-gpm")
663 (inputs `(("ncurses" ,ncurses/gpm)
664 ("guile" ,guile-2.2)))))
672 (uri (string-append "mirror://gnu/mcron/mcron-"
676 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
677 (patches (search-patches "mcron-install.patch"))))
678 (build-system gnu-build-system)
679 (native-inputs `(("pkg-config" ,pkg-config)))
680 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
681 (home-page "https://www.gnu.org/software/mcron/")
682 (synopsis "Run jobs at scheduled times")
684 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
685 tasks on a schedule, such as every hour or every Monday. Mcron is written in
686 Guile, so its configuration can be written in Scheme; the original cron
687 format is also supported.")
688 (license license:gpl3+)))
690 (define-public mcron2
691 ;; This is mthl's mcron development branch, not yet merged in mcron.
692 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
696 (version (string-append (package-version mcron) "-0."
697 (string-take commit 7)))
701 (url "https://notabug.org/mthl/mcron/")
705 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
706 (file-name (string-append name "-" version "-checkout"))))
708 `(("autoconf" ,autoconf)
709 ("automake" ,automake)
710 ("pkg-config" ,pkg-config)
712 ("help2man" ,help2man)))
714 `(("guile-2.2" ,guile-2.2)
715 ,@(srfi-1:alist-delete "guile" (package-inputs mcron))))
717 `(#:modules ((ice-9 match) (ice-9 ftw)
718 ,@%gnu-build-system-modules)
719 ;; When building the targets in parallel, help2man tries to generate
720 ;; the manpage from ./cron --help before it is built, which fails.
723 (modify-phases %standard-phases
724 (add-after 'unpack 'use-guile-2.2
726 (substitute* "configure.ac"
727 (("PKG_CHECK_MODULES\\(\\[GUILE\\],.*$")
728 "PKG_CHECK_MODULES([GUILE], [guile-2.2])\n")
732 (add-after 'install 'wrap-mcron
733 (lambda* (#:key outputs #:allow-other-keys)
734 ;; Wrap the 'mcron' command to refer to the right
736 (let* ((out (assoc-ref outputs "out"))
737 (bin (string-append out "/bin"))
739 out "/share/guile/site")))
740 (match (scandir site)
742 (let ((modules (string-append site "/" version)))
743 (wrap-program (string-append bin "/mcron")
744 `("GUILE_LOAD_PATH" ":" prefix
746 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
750 (define-public guile-ics
757 (url "https://github.com/artyom-poptsov/guile-ics")
759 (file-name (string-append name "-" version "-checkout"))
762 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
763 (build-system gnu-build-system)
765 '(#:phases (modify-phases %standard-phases
766 (add-after 'unpack 'autoreconf
768 ;; Repository comes with a broken symlink
769 (delete-file "README")
770 (symlink "README.org" "README")
771 (zero? (system* "autoreconf" "-fi")))))))
773 `(("autoconf" ,autoconf-wrapper)
774 ("automake" ,automake)
776 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
777 ("gettext" ,gettext-minimal)
778 ("pkg-config" ,pkg-config)))
779 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
780 (propagated-inputs `(("guile-lib" ,guile2.0-lib)))
781 (home-page "https://github.com/artyom-poptsov/guile-ics")
782 (synopsis "Guile parser library for the iCalendar format")
784 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
785 pure Scheme. The library can be used to read and write iCalendar data.
787 The library is shipped with documentation in Info format and usage examples.")
788 (license license:gpl3+)))
790 (define-public guile-lib
796 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
800 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
801 (build-system gnu-build-system)
804 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
806 (modify-phases %standard-phases
807 (add-before 'configure 'patch-module-dir
809 (substitute* "src/Makefile.in"
810 (("^moddir = ([[:graph:]]+)")
811 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
812 (("^godir = ([[:graph:]]+)")
814 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
816 (native-inputs `(("pkg-config" ,pkg-config)))
817 (inputs `(("guile" ,guile-2.2)))
818 (home-page "https://www.nongnu.org/guile-lib/")
819 (synopsis "Collection of useful Guile Scheme modules")
821 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
822 modules, allowing for people to cooperate integrating their generic Guile
823 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
826 ;; The whole is under GPLv3+, but some modules are under laxer
827 ;; distribution terms such as LGPL and public domain. See `COPYING' for
829 (license license:gpl3+)))
831 (define-public guile2.0-lib
832 (package-for-guile-2.0 guile-lib))
834 (define-public guile2.2-lib
835 (deprecated-package "guile2.2-lib" guile-lib))
837 (define-public guile-json
843 (uri (string-append "mirror://savannah/guile-json/guile-json-"
847 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
848 (modules '((guix build utils)))
850 ;; Make sure everything goes under .../site/X.Y, like Guile's
851 ;; search paths expects.
853 (substitute* "configure"
855 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
856 (substitute* '("Makefile.in" "json/Makefile.in")
857 (("moddir =.*/share/guile/site" all)
858 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
860 (build-system gnu-build-system)
861 (native-inputs `(("guile" ,guile-2.2)))
862 (home-page "https://savannah.nongnu.org/projects/guile-json/")
863 (synopsis "JSON module for Guile")
865 "Guile-JSON supports parsing and building JSON documents according to the
866 specification. These are the main features:
869 @item Strictly complies to @uref{http://json.org, specification}.
870 @item Build JSON documents programmatically via macros.
871 @item Unicode support for strings.
872 @item Allows JSON pretty printing.
874 (license license:lgpl3+)))
876 (define-public guile2.2-json
877 (deprecated-package "guile2.2-json" guile-json))
879 (define-public guile2.0-json
880 (package-for-guile-2.0 guile-json))
882 (define-public guile-minikanren
884 (name "guile-minikanren")
885 (version "20150424.e844d85")
889 (url "https://github.com/ijp/minikanren.git")
890 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
891 (file-name (string-append name "-" version "-checkout"))
894 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
895 (build-system trivial-build-system)
897 `(#:modules ((guix build utils))
900 (use-modules (guix build utils)
905 (let* ((out (assoc-ref %outputs "out"))
906 (guile (assoc-ref %build-inputs "guile"))
907 (effective (read-line
908 (open-pipe* OPEN_READ
909 (string-append guile "/bin/guile")
910 "-c" "(display (effective-version))")))
911 (module-dir (string-append out "/share/guile/site/"
913 (source (assoc-ref %build-inputs "source"))
914 (doc (string-append out "/share/doc/guile-minikanren"))
915 (scm-files '("minikanren.scm"
916 "minikanren/mkextraforms.scm"
917 "minikanren/mkprelude.scm"
918 "minikanren/mk.scm"))
919 (guild (string-append (assoc-ref %build-inputs "guile")
921 ;; Make installation directories.
922 (mkdir-p (string-append module-dir "/minikanren"))
925 ;; Compile .scm files and install.
927 (setenv "GUILE_AUTO_COMPILE" "0")
928 (for-each (lambda (file)
929 (let* ((dest-file (string-append module-dir "/"
931 (go-file (match (string-split file #\.)
933 (string-append module-dir "/"
935 ;; Install source module.
936 (copy-file file dest-file)
937 ;; Install compiled module.
938 (unless (zero? (system* guild "compile"
942 (error (format #f "Failed to compile ~s to ~s!"
946 ;; Also copy over the README.
947 (install-file "README.org" doc)
950 `(("guile" ,guile-2.0)))
951 (home-page "https://github.com/ijp/minikanren")
952 (synopsis "MiniKanren declarative logic system, packaged for Guile")
954 "MiniKanren is a relational programming extension to the Scheme
955 programming Language, written as a smaller version of Kanren suitable for
956 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
957 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
959 This is Ian Price's r6rs packaged version of miniKanren, which deviates
960 slightly from miniKanren mainline.
962 See http://minikanren.org/ for more on miniKanren generally.")
963 (license license:expat)))
965 (define-public guile2.2-minikanren
966 (package-for-guile-2.2 guile-minikanren))
968 (define-public guile-miniadapton
969 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
972 (name "guile-miniadapton")
973 (version (string-append "0-" revision "." (string-take commit 9)))
977 (url "https://github.com/fisherdj/miniAdapton.git")
979 (file-name (string-append name "-" version "-checkout"))
982 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
983 (build-system gnu-build-system)
985 `(#:modules ((guix build utils)
989 (guix build gnu-build-system))
990 #:tests? #f ; there is no test target
992 (modify-phases %standard-phases
996 (lambda* (#:key outputs #:allow-other-keys)
997 (let* ((cwd (getcwd))
998 (scm-files (find-files "." "\\.scm$"))
999 (effective (read-line
1000 (open-pipe* OPEN_READ
1002 "(display (effective-version))")))
1003 (module-dir (string-append (assoc-ref outputs "out")
1004 "/share/guile/site/"
1007 ;; Make installation directories.
1008 (mkdir-p module-dir)
1010 (setenv "GUILE_AUTO_COMPILE" "0")
1012 ;; Compile .scm files and install.
1013 (every (lambda (file)
1014 (let ((go-file (string-append module-dir "/"
1015 (basename file ".scm") ".go")))
1016 ;; Install source module.
1017 (install-file file module-dir)
1018 ;; Compile and install module.
1019 (zero? (system* "guild" "compile" "-L" cwd
1020 "-o" go-file file))))
1023 `(("guile" ,guile-2.2)))
1024 (home-page "https://github.com/fisherdj/miniAdapton")
1025 (synopsis "Minimal implementation of incremental computation in Guile
1027 (description "This package provides a complete Scheme implementation of
1028 miniAdapton, which implements the core functionality of the Adapton system for
1029 incremental computation (also known as self-adjusting computation). Like
1030 Adapton, miniAdapton allows programmers to safely combine mutation and
1031 memoization. miniAdapton is built on top of an even simpler system,
1032 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1033 understand, extend, and port to host languages other than Scheme.")
1034 (license license:expat))))
1036 (define-public guile-irregex
1038 (name "guile-irregex")
1043 "http://synthcode.com/scheme/irregex/irregex-"
1047 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1048 (build-system gnu-build-system)
1050 `(#:modules ((guix build utils)
1054 (guix build gnu-build-system))
1056 (modify-phases %standard-phases
1061 (lambda* (#:key inputs outputs #:allow-other-keys)
1062 (let* ((out (assoc-ref outputs "out"))
1063 (effective (read-line
1064 (open-pipe* OPEN_READ
1066 "(display (effective-version))")))
1067 (module-dir (string-append out "/share/guile/site/"
1069 (source (assoc-ref inputs "source"))
1070 (doc (string-append out "/share/doc/guile-irregex/"))
1071 (guild (string-append (assoc-ref %build-inputs "guile")
1073 ;; Make installation directories.
1074 (mkdir-p (string-append module-dir "/rx/source"))
1077 ;; Compile .scm files and install.
1078 (setenv "GUILE_AUTO_COMPILE" "0")
1080 (for-each (lambda (copy-info)
1082 ((src-file dest-file-basis)
1083 (let* ((dest-file (string-append
1084 module-dir dest-file-basis
1086 (go-file (string-append
1087 module-dir dest-file-basis
1089 ;; Install source module.
1092 ;; Install compiled module.
1093 (unless (zero? (system* guild "compile"
1097 (error (format #f "Failed to compile ~s to ~s!"
1098 src-file dest-file)))))))
1099 '(("irregex-guile.scm" "/rx/irregex")
1100 ("irregex.scm" "/rx/source/irregex")
1101 ;; Not really reachable via guile's packaging system,
1102 ;; but nice to have around
1103 ("irregex-utils.scm" "/rx/source/irregex-utils")))
1105 ;; Also copy over the README.
1106 (install-file "irregex.html" doc)
1109 `(("guile" ,guile-2.0)))
1110 (home-page "http://synthcode.com/scheme/irregex")
1111 (synopsis "S-expression based regular expressions")
1113 "Irregex is an s-expression based alternative to your classic
1114 string-based regular expressions. It implements SRFI 115 and is deeply
1115 inspired by the SCSH regular expression system.")
1116 (license license:bsd-3)))
1118 (define-public guile2.2-irregex
1119 (package-for-guile-2.2 guile-irregex))
1121 ;; There are two guile-gdbm packages, one using the FFI and one with
1122 ;; direct C bindings, hence the verbose name.
1124 (define-public guile-gdbm-ffi
1126 (name "guile-gdbm-ffi")
1127 (version "20120209.fa1d5b6")
1131 (url "https://github.com/ijp/guile-gdbm.git")
1132 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1133 (file-name (string-append name "-" version "-checkout"))
1136 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1137 (build-system trivial-build-system)
1140 ((guix build utils))
1143 (use-modules (guix build utils)
1147 ;; Avoid warnings we can safely ignore
1148 (setenv "GUILE_AUTO_COMPILE" "0")
1150 (let* ((out (assoc-ref %outputs "out"))
1153 (open-pipe* OPEN_READ
1155 (assoc-ref %build-inputs "guile")
1157 "-c" "(display (effective-version))")))
1158 (module-dir (string-append out "/share/guile/site/"
1160 (source (assoc-ref %build-inputs "source"))
1161 (doc (string-append out "/share/doc"))
1162 (guild (string-append (assoc-ref %build-inputs "guile")
1165 (string-append module-dir "/gdbm.scm"))
1167 (string-append module-dir "/gdbm.go"))
1169 (lambda (in-file out-file)
1170 (system* guild "compile" "-o" out-file in-file))))
1171 ;; Switch directory for compiling and installing
1174 ;; Install the documentation.
1175 (install-file "README.md" doc)
1176 (copy-recursively "examples" (string-append doc "/examples"))
1178 ;; Make installation directories.
1179 (mkdir-p module-dir)
1182 (copy-file "gdbm.scm" gdbm.scm-dest)
1185 (substitute* gdbm.scm-dest
1186 (("\\(dynamic-link \"libgdbm\"\\)")
1187 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1188 (assoc-ref %build-inputs "gdbm"))))
1190 ;; compile to the destination
1191 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1193 `(("guile" ,guile-2.2)))
1196 (home-page "https://github.com/ijp/guile-gdbm")
1197 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1199 "Guile bindings to the GDBM key-value storage system, using
1200 Guile's foreign function interface.")
1201 (license license:gpl3+)))
1203 (define-public guile2.0-gdbm-ffi
1204 (package-for-guile-2.0 guile-gdbm-ffi))
1206 (define-public guile2.2-gdbm-ffi
1207 (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
1209 (define-public guile-sqlite3
1210 (let ((commit "10c13a7e02ab1655c8a758e560cafc9d6eff26f4")
1213 (name "guile-sqlite3")
1214 (version (git-version "0.0" revision commit))
1216 ;; XXX: This used to be available read-only at
1217 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1218 ;; eventually disappeared, so we have our own copy here.
1219 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1227 "0nhhswpd7nb2f0gfr55fzcc2xm3l2xx4rbljsd1clrm8fj2d7q9d"))
1228 (file-name (string-append name "-" version "-checkout"))
1229 (modules '((guix build utils)))
1231 ;; Upgrade 'Makefile.am' to the current way of doing things.
1233 (substitute* "Makefile.am"
1234 (("TESTS_ENVIRONMENT")
1235 "TEST_LOG_COMPILER"))
1238 (build-system gnu-build-system)
1240 `(("autoconf" ,autoconf)
1241 ("automake" ,automake)
1242 ("pkg-config" ,pkg-config)))
1244 `(("guile" ,guile-2.2)
1245 ("sqlite" ,sqlite)))
1247 '(#:phases (modify-phases %standard-phases
1248 (add-after 'unpack 'autoreconf
1250 (zero? (system* "autoreconf" "-vfi"))))
1251 (add-before 'build 'set-sqlite3-file-name
1252 (lambda* (#:key inputs #:allow-other-keys)
1253 (substitute* "sqlite3.scm"
1255 (string-append "\"" (assoc-ref inputs "sqlite")
1256 "/lib/libsqlite3\"")))
1258 (synopsis "Access SQLite databases from Guile")
1260 "This package provides Guile bindings to the SQLite database system.")
1261 (license license:gpl3+))))
1263 (define-public haunt
1269 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1273 "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp"))))
1274 (build-system gnu-build-system)
1276 `(#:modules ((ice-9 match) (ice-9 ftw)
1277 ,@%gnu-build-system-modules)
1278 #:tests? #f ; test suite is non-deterministic :(
1279 #:phases (modify-phases %standard-phases
1280 (add-after 'install 'wrap-haunt
1281 (lambda* (#:key outputs #:allow-other-keys)
1282 ;; Wrap the 'haunt' command to refer to the right
1284 (let* ((out (assoc-ref outputs "out"))
1285 (bin (string-append out "/bin"))
1286 (site (string-append
1287 out "/share/guile/site")))
1288 (match (scandir site)
1290 (let ((modules (string-append site "/" version))
1291 (compiled-modules (string-append
1292 out "/lib/guile/" version
1294 (wrap-program (string-append bin "/haunt")
1295 `("GUILE_LOAD_PATH" ":" prefix
1297 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1298 (,compiled-modules)))
1301 `(("pkg-config" ,pkg-config)
1302 ("texinfo" ,texinfo)))
1304 `(("guile" ,guile-2.2)))
1306 `(("guile-reader" ,guile-reader)
1307 ("guile-commonmark" ,guile-commonmark)))
1308 (synopsis "Functional static site generator")
1309 (description "Haunt is a static site generator written in Guile
1310 Scheme. Haunt features a functional build system and an extensible
1311 interface for reading articles in any format.")
1312 (home-page "http://haunt.dthompson.us")
1313 (license license:gpl3+)))
1315 (define-public guile2.0-haunt
1316 (package-for-guile-2.0
1317 (package (inherit haunt) (name "guile2.0-haunt"))))
1318 (define-public guile2.2-haunt
1319 (deprecated-package "guile2.2-haunt" haunt))
1321 (define-public guile-config
1323 (name "guile-config")
1328 "http://alex.pompo.co/software/" name "-" version
1332 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1333 (build-system gnu-build-system)
1335 `(("guile" ,guile-2.0)))
1336 (synopsis "Guile application configuration parsing library")
1338 "Guile Config is a library providing a declarative approach to
1339 application configuration specification. The library provides clean
1340 configuration declaration forms, and processors that take care of:
1341 configuration file creation; configuration file parsing; command-line
1342 parameter parsing using getopt-long; basic GNU command-line parameter
1343 generation (--help, --usage, --version); automatic output generation for the
1344 above command-line parameters.")
1345 (home-page "https://github.com/a-sassmannshausen/guile-config")
1346 (license license:agpl3+)))
1348 (define-public guile-redis
1350 (name "guile-redis")
1354 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1358 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1359 (modules '((guix build utils)))
1361 ;; Make sure everything goes under .../site/X.Y, like Guile's
1362 ;; search paths expects.
1364 (substitute* "configure"
1365 (("ac_subst_vars='")
1366 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1367 (substitute* '("Makefile.in"
1369 "redis/commands/Makefile.in")
1370 (("moddir =.*/share/guile/site" all)
1371 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1373 (build-system gnu-build-system)
1375 `(("guile" ,guile-2.0)))
1376 (home-page "https://savannah.nongnu.org/projects/guile-redis/")
1377 (synopsis "Redis client library for Guile")
1378 (description "Guile-redis provides a Scheme interface to the Redis
1379 key-value cache and store.")
1380 (license license:lgpl3+)))
1382 (define-public guile2.2-redis
1383 (package-for-guile-2.2 guile-redis))
1385 (define-public guile-wisp
1391 (uri (string-append "https://bitbucket.org/ArneBab/"
1392 "wisp/downloads/wisp-"
1396 "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
1397 (build-system gnu-build-system)
1399 `(#:modules ((guix build gnu-build-system)
1405 (modify-phases %standard-phases
1406 (add-before 'configure 'substitute-before-config
1408 (lambda* (#:key inputs #:allow-other-keys)
1409 (let ((bash (assoc-ref inputs "bash")))
1410 ;; Puts together some test files with /bin/bash hardcoded
1411 (substitute* "Makefile.in"
1412 (("/usr/bin/env bash")
1413 (string-append bash "/bin/bash"))
1414 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1415 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
1418 ;; auto compilation breaks, but if we set HOME to /tmp,
1421 'check 'auto-compile-hacky-workaround
1423 (setenv "HOME" "/tmp")
1425 (add-after 'install 'install-go-files
1426 (lambda* (#:key outputs inputs #:allow-other-keys)
1427 (let* ((out (assoc-ref outputs "out"))
1428 (effective (read-line
1429 (open-pipe* OPEN_READ
1431 "(display (effective-version))")))
1432 (module-dir (string-append out "/share/guile/site/"
1434 (object-dir (string-append out "/lib/guile/" effective
1436 (prefix (string-length module-dir)))
1437 ;; compile to the destination
1438 (for-each (lambda (file)
1439 (let* ((base (string-drop (string-drop-right file 4)
1441 (go (string-append object-dir base ".go")))
1442 (invoke "guild" "compile" "-L" module-dir
1444 (find-files module-dir "\\.scm$"))
1446 (home-page "http://draketo.de/english/wisp")
1448 `(("guile" ,guile-2.2)))
1450 `(("python" ,python)
1451 ("pkg-config" ,pkg-config)))
1452 (synopsis "Whitespace to lisp syntax for Guile")
1453 (description "Wisp is a syntax for Guile which provides a Python-like
1454 whitespace-significant language. It may be easier on the eyes for some
1455 users and in some situations.")
1456 (license license:gpl3+)))
1458 (define-public guile-sly
1464 (uri (string-append "https://files.dthompson.us/sly/sly-"
1468 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1469 (modules '((guix build utils)))
1472 (substitute* "configure"
1473 (("_guile_required_version=\"2.0.11\"")
1474 "_guile_required_version=\"2\"")
1475 (("ac_subst_vars='")
1476 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1477 (substitute* (find-files "." "Makefile.in")
1481 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1485 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1487 (build-system gnu-build-system)
1490 (list (string-append "--with-libfreeimage-prefix="
1491 (assoc-ref %build-inputs "freeimage"))
1492 (string-append "--with-libgslcblas-prefix="
1493 (assoc-ref %build-inputs "gsl")))))
1495 `(("pkg-config" ,pkg-config)))
1497 `(("guile-sdl" ,guile-sdl)
1498 ("guile-opengl" ,guile-opengl)))
1500 `(("guile" ,guile-2.2)
1502 ("freeimage" ,freeimage)
1504 (synopsis "2D/3D game engine for GNU Guile")
1505 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1506 features a functional reactive programming interface and live coding
1508 (home-page "http://dthompson.us/pages/software/sly.html")
1509 (license license:gpl3+)))
1511 (define-public g-wrap
1517 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1521 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1522 (build-system gnu-build-system)
1524 `(("pkg-config" ,pkg-config)))
1526 `(("guile" ,guile-2.2)
1527 ("guile-lib" ,guile-lib)))
1529 `(("libffi" ,libffi)))
1531 `(#:configure-flags '("--disable-Werror")
1533 (modify-phases %standard-phases
1534 (add-before 'configure 'pre-configure
1535 (lambda* (#:key outputs #:allow-other-keys)
1536 (let ((out (assoc-ref outputs "out")))
1537 (substitute* (find-files "." "^Makefile.in$")
1538 (("guilemoduledir =.*guile/site" all)
1539 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1541 (synopsis "Generate C bindings for Guile")
1542 (description "G-Wrap is a tool and Guile library for generating function
1543 wrappers for inter-language calls. It currently only supports generating Guile
1544 wrappers for C functions. Given a definition of the types and prototypes for
1545 a given C interface, G-Wrap will automatically generate the C code that
1546 provides access to that interface and its types from the Scheme level.")
1547 (home-page "https://www.nongnu.org/g-wrap/index.html")
1548 (license license:lgpl2.1+)))
1550 (define-public guile-dbi
1557 "http://download.gna.org/guile-dbi/guile-dbi-"
1561 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1562 (build-system gnu-build-system)
1565 (list (string-append
1566 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1568 (modify-phases %standard-phases
1569 (add-after 'install 'patch-extension-path
1570 (lambda* (#:key outputs #:allow-other-keys)
1571 (let* ((out (assoc-ref outputs "out"))
1572 (dbi.scm (string-append
1573 out "/share/guile/site/2.0/dbi/dbi.scm"))
1574 (ext (string-append out "/lib/libguile-dbi")))
1575 (substitute* dbi.scm (("libguile-dbi") ext))
1578 `(("guile" ,guile-2.0)))
1579 (synopsis "Guile database abstraction layer")
1580 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1582 "guile-dbi is a library for Guile that provides a convenient interface to
1583 SQL databases. Database programming with guile-dbi is generic in that the same
1584 programming interface is presented regardless of which database system is used.
1585 It currently supports MySQL, Postgres and SQLite3.")
1586 (license license:gpl2+)))
1588 (define-public guile-dbd-sqlite3
1590 (name "guile-dbd-sqlite3")
1595 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1599 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1600 (build-system gnu-build-system)
1602 `(("pkg-config" ,pkg-config)))
1604 `(("sqlite" ,sqlite)
1605 ("zlib" ,(@ (gnu packages compression) zlib))))
1607 `(("guile-dbi" ,guile-dbi)))
1608 (synopsis "Guile DBI driver for SQLite")
1609 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1611 "guile-dbi is a library for Guile that provides a convenient interface to
1612 SQL databases. This package implements the interface for SQLite.")
1613 (license license:gpl2+)))
1615 (define-public guile-dsv
1622 (url "https://github.com/artyom-poptsov/guile-dsv")
1623 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
1624 (file-name (string-append name "-" version "-checkout"))
1627 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
1628 (build-system gnu-build-system)
1630 `(("autoconf" ,autoconf)
1631 ("automake" ,automake)
1632 ("pkg-config" ,pkg-config)
1633 ("texinfo" ,texinfo)))
1634 (inputs `(("guile" ,guile-2.2)))
1635 (propagated-inputs `(("guile-lib" ,guile-lib)))
1637 '(#:phases (modify-phases %standard-phases
1638 (add-before 'configure 'set-guilesitedir
1640 (substitute* "Makefile.in"
1641 (("^guilesitedir =.*$")
1643 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1644 (substitute* "modules/Makefile.in"
1645 (("^guilesitedir =.*$")
1647 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1648 (substitute* "modules/dsv/Makefile.in"
1649 (("^guilesitedir =.*$")
1651 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1653 (add-after 'unpack 'autoreconf
1655 (zero? (system* "autoreconf" "-vfi")))))))
1656 (home-page "https://github.com/artyom-poptsov/guile-dsv")
1657 (synopsis "DSV module for Guile")
1659 "Guile-DSV is a GNU Guile module for working with the
1660 delimiter-separated values (DSV) data format. Guile-DSV supports the
1661 Unix-style DSV format and RFC 4180 format.")
1662 (license license:gpl3+)))
1664 (define-public guile-xosd
1670 (uri (string-append "https://github.com/alezost/" name
1671 "/releases/download/v" version
1672 "/" name "-" version ".tar.gz"))
1675 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1676 (build-system gnu-build-system)
1678 `(("pkg-config" ,pkg-config)))
1680 `(("guile" ,guile-2.2)
1682 ("libxext" ,libxext)
1683 ("libxinerama" ,libxinerama)
1685 (home-page "https://github.com/alezost/guile-xosd")
1686 (synopsis "XOSD bindings for Guile")
1688 "Guile-XOSD provides Guile bindings for @code{libxosd},
1689 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1691 (license license:gpl3+)))
1693 (define-public guile-daemon
1695 (name "guile-daemon")
1699 (uri (string-append "https://github.com/alezost/" name
1700 "/releases/download/v" version
1701 "/" name "-" version ".tar.gz"))
1704 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1705 (build-system gnu-build-system)
1707 `(("pkg-config" ,pkg-config)))
1709 `(("guile" ,guile-2.2)))
1710 (home-page "https://github.com/alezost/guile-daemon")
1711 (synopsis "Evaluate code in a running Guile process")
1713 "Guile-Daemon is a small Guile program that loads your initial
1714 configuration file, and then reads and evaluates Guile expressions that
1715 you send to a FIFO file.")
1716 (license license:gpl3+)))
1718 (define-public guile-commonmark
1720 (name "guile-commonmark")
1724 (uri (string-append "https://github.com/OrangeShark/" name
1725 "/releases/download/v" version
1726 "/" name "-" version ".tar.gz"))
1729 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1730 (modules '((guix build utils)))
1732 ;; Use the real effective version of Guile in directory names
1733 ;; instead of a hard-coded "/2.0".
1735 (substitute* "configure"
1736 (("ac_subst_vars='")
1737 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1738 (substitute* "Makefile.in"
1740 "/site/@GUILE_EFFECTIVE_VERSION@"))
1742 (build-system gnu-build-system)
1744 `(("guile" ,guile-2.2)))
1745 (synopsis "CommonMark parser for Guile")
1747 "guile-commonmark is a library for parsing CommonMark, a fully specified
1748 variant of Markdown. The library is written in Guile Scheme and is designed
1749 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1750 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1751 is no support for parsing block and inline level HTML.")
1752 (home-page "https://github.com/OrangeShark/guile-commonmark")
1753 (license license:lgpl3+)))
1755 (define-public guile2.0-commonmark
1756 (package-for-guile-2.0 guile-commonmark))
1757 (define-public guile2.2-commonmark
1758 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1760 (define-public guile-bytestructures
1762 (name "guile-bytestructures")
1766 (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
1767 "/releases/download/v" version
1768 "/bytestructures-" version ".tar.gz"))
1771 "1lnfcy65mqj823lamy2n2vaghdz0g7mj011bgnhmd6hwpnaidnh2"))))
1772 (build-system gnu-build-system)
1774 `(("pkg-config" ,pkg-config)))
1776 `(("guile" ,guile-2.2)))
1777 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1778 (synopsis "Structured access to bytevector contents for Guile")
1780 "Guile bytestructures offers a system imitating the type system
1781 of the C programming language, to be used on bytevectors. C's type
1782 system works on raw memory, and Guile works on bytevectors which are
1783 an abstraction over raw memory. It's also more powerful than the C
1784 type system, elevating types to first-class status.")
1785 (license license:gpl3+)))
1787 (define-public guile2.0-bytestructures
1788 (package-for-guile-2.0 guile-bytestructures))
1790 (define-public guile-aspell
1792 (name "guile-aspell")
1797 "http://lonelycactus.com/tarball/guile_aspell-"
1801 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1802 (build-system gnu-build-system)
1804 '(#:phases (modify-phases %standard-phases
1805 (add-before 'configure 'set-guilesitedir
1807 (substitute* "Makefile.in"
1808 (("^guilesitedir =.*$")
1810 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1812 (add-before 'build 'set-libaspell-file-name
1813 (lambda* (#:key inputs #:allow-other-keys)
1814 (let ((aspell (assoc-ref inputs "aspell")))
1815 (substitute* "aspell.scm"
1816 (("\"libaspell\\.so\"")
1817 (string-append "\"" aspell
1818 "/lib/libaspell\"")))
1820 (native-inputs `(("pkg-config" ,pkg-config)))
1821 (inputs `(("guile" ,guile-2.2)
1822 ("aspell" ,aspell)))
1823 (home-page "https://github.com/spk121/guile-aspell")
1824 (synopsis "Spell-checking from Guile")
1826 "guile-aspell is a Guile Scheme library for comparing a string against a
1827 dictionary and suggesting spelling corrections.")
1828 (license license:gpl3+)))
1830 (define-public guile-bash
1831 ;; This project is currently retired. It was initially announced here:
1832 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1833 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1837 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1839 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1847 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1848 (file-name (string-append name "-" version "-checkout"))))
1849 (build-system gnu-build-system)
1852 ;; Add -I to match 'bash.pc' of Bash 4.4.
1853 (list (string-append "CPPFLAGS=-I"
1854 (assoc-ref %build-inputs "bash:include")
1855 "/include/bash/include")
1857 ;; The '.a' file is useless.
1860 ;; Install 'lib/bash' as Bash 4.4 expects.
1861 (string-append "--libdir=" (assoc-ref %outputs "out")
1863 (native-inputs `(("pkg-config" ,pkg-config)
1864 ("autoconf" ,autoconf-wrapper)
1865 ("automake" ,automake)
1866 ("libtool" ,libtool)
1867 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1868 ("gettext" ,gettext-minimal)
1870 ;; Bash with loadable module support, for the test
1872 ("bash-full" ,bash)))
1873 (inputs `(("guile" ,guile-2.0)
1874 ("bash:include" ,bash "include")))
1875 (synopsis "Extend Bash using Guile")
1877 "Guile-Bash provides a shared library and set of Guile modules,
1878 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1879 the following aspects of Bash:
1883 @item setting and getting Bash variables;
1884 @item creating dynamic variables;
1885 @item creating Bash functions with a Scheme implementation;
1886 @item reader macro for output capturing;
1887 @item reader macro for evaluating raw Bash commands.
1893 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1896 and then run @command{scm example.scm}.")
1897 (license license:gpl3+))))
1899 (define-public guile-8sync
1901 (name "guile-8sync")
1905 (uri (string-append "mirror://gnu/8sync/8sync-" version
1909 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1910 (build-system gnu-build-system)
1911 (native-inputs `(("autoconf" ,autoconf)
1912 ("automake" ,automake)
1913 ("guile" ,guile-2.2)
1914 ("pkg-config" ,pkg-config)
1915 ("texinfo" ,texinfo)))
1917 `(#:phases (modify-phases %standard-phases
1918 (add-before 'configure 'setenv
1921 (setenv "GUILE_AUTO_COMPILE" "0")
1923 (home-page "https://gnu.org/s/8sync/")
1924 (synopsis "Asynchronous actor model library for Guile")
1926 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1927 library for GNU Guile based on the actor model.
1929 Note that 8sync is only available for Guile 2.2.")
1930 (license license:lgpl3+)))
1932 (define-public guile-fibers
1934 (name "guile-fibers")
1938 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1942 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1943 (build-system gnu-build-system)
1945 `(("texinfo" ,texinfo)
1946 ("pkg-config" ,pkg-config)))
1948 `(("guile" ,guile-2.2)))
1949 (synopsis "Lightweight concurrency facility for Guile")
1951 "Fibers is a Guile library that implements a a lightweight concurrency
1952 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1953 like a \"goroutine\" from the Go language: a lightweight thread-like
1954 abstraction. Systems built with Fibers can scale up to millions of concurrent
1955 fibers, tens of thousands of concurrent socket connections, and many parallel
1956 cores. The Fibers library also provides Concurrent ML-like channels for
1957 communication between fibers.
1959 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1960 is not available for Guile 2.0.")
1961 (home-page "https://github.com/wingo/fibers")
1962 (license license:lgpl3+)))
1964 (define-public guile-git
1965 (let ((revision "4")
1966 (commit "951a32c56cc4d80f8836e3c7394783e69c1fcbad"))
1969 (version (string-append "0.0-" revision "." (string-take commit 7)))
1970 (home-page "https://gitlab.com/guile-git/guile-git.git")
1973 (uri (git-reference (url home-page) (commit commit)))
1976 "0qri9x73ij6g40ijs4hyhj8knxw39ydgghiafq74dp99bc8hh0qc"))
1977 (file-name (git-file-name name version))))
1978 (build-system gnu-build-system)
1980 `(#:phases (modify-phases %standard-phases
1981 ;; FIXME: On i686, bytestructures miscalculates the offset
1982 ;; of the 'old-file' and 'new-file' fields within the
1983 ;; '%diff-delta' structure.
1984 ,@(if (string=? (%current-system) "x86_64-linux")
1986 '((add-before 'check 'skip-tests
1988 (substitute* "Makefile"
1989 (("tests/status\\.scm")
1993 `(("autoconf" ,autoconf)
1994 ("automake" ,automake)
1995 ("texinfo" ,texinfo)
1996 ("pkg-config" ,pkg-config)))
1998 `(("guile" ,guile-2.2)
1999 ("libgit2" ,libgit2)))
2001 `(("guile-bytestructures" ,guile-bytestructures)))
2002 (synopsis "Guile bindings for libgit2")
2004 "This package provides Guile bindings to libgit2, a library to
2005 manipulate repositories of the Git version control system.")
2006 (license license:gpl3+))))
2008 (define-public guile2.0-git
2009 (package-for-guile-2.0 guile-git))
2011 (define-public guile-syntax-highlight
2013 (name "guile-syntax-highlight")
2017 (uri (string-append "https://files.dthompson.us/"
2018 "guile-syntax-highlight/"
2019 "guile-syntax-highlight-"
2023 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))))
2024 (build-system gnu-build-system)
2026 `(("pkg-config" ,pkg-config)))
2028 `(("guile" ,guile-2.2)))
2029 (synopsis "General-purpose syntax highlighter for GNU Guile")
2030 (description "Guile-syntax-highlight is a general-purpose syntax
2031 highlighting library for GNU Guile. It can parse code written in various
2032 programming languages into a simple s-expression that can be converted to
2033 HTML (via SXML) or any other format for rendering.")
2034 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
2035 (license license:lgpl3+)))
2037 (define-public guile-sjson
2039 (name "guile-sjson")
2043 (uri (string-append "https://dustycloud.org/misc/sjson-" version
2047 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
2048 (build-system gnu-build-system)
2050 `(("autoconf" ,autoconf)
2051 ("automake" ,automake)
2052 ("pkg-config" ,pkg-config)))
2054 `(("guile" ,guile-2.2)))
2055 (home-page "https://gitlab.com/dustyweb/guile-sjson")
2056 (synopsis "S-expression based json reader/writer for Guile")
2057 (description "guile-sjson is a json reader/writer for Guile.
2058 It has a nice, simple s-expression based syntax.")
2059 (license license:lgpl3+)))
2061 (define-public guile-colorized
2063 (name "guile-colorized")
2067 (uri (string-append "https://github.com/NalaGinrut/guile-colorized/"
2068 "archive/v" version ".tar.gz"))
2069 (file-name (string-append name "-" version ".tar.gz"))
2072 "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
2073 (build-system gnu-build-system)
2075 `(#:modules ((system base compile)
2076 ,@%gnu-build-system-modules)
2077 #:tests? #f ;No tests included
2079 (modify-phases %standard-phases
2080 (delete 'configure) ;No configure script
2082 (lambda* (#:key outputs inputs #:allow-other-keys)
2083 (let* ((out (assoc-ref outputs "out"))
2084 (module-dir (string-append out "/share/guile/site/2.2"))
2085 (language-dir (string-append module-dir "/ice-9"))
2086 (guild (string-append (assoc-ref inputs "guile")
2088 ;; The original 'make install' is too primitive.
2091 (install-file "ice-9/colorized.scm" language-dir)
2093 ;; compile to the destination
2094 (compile-file "ice-9/colorized.scm"
2095 #:output-file (string-append
2096 language-dir "/colorized.go"))
2099 `(("guile" ,guile-2.2)))
2100 (home-page "https://github.com/NalaGinrut/guile-colorized")
2101 (synopsis "Colorized REPL for Guile")
2103 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
2104 (license license:gpl3+)))
2106 ;;; guile.scm ends here