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)
286 (define-public guile-2.2.2
287 ;; Keep it so that, when 'guix' runs on 2.2.2, 'guix pull' compiles objects
288 ;; with 2.2.2, thereby avoiding the ABI incompatibility issues described in
289 ;; <https://bugs.gnu.org/29570>.
294 (inherit (package-source guile-2.2))
295 (uri (string-append "mirror://gnu/guile/guile-" version
299 "1azm25zcmxif0skxfrp11d2wc89nrzpjaann9yxdw6pvjxhs948w"))))))
301 (define-public guile-next
302 (deprecated-package "guile-next" guile-2.2))
304 (define (make-guile-readline guile)
306 (name "guile-readline")
307 (version (package-version guile))
308 (source (package-source guile))
309 (build-system gnu-build-system)
311 '(#:configure-flags '("--disable-silent-rules")
312 #:phases (modify-phases %standard-phases
313 (add-before 'build 'chdir
314 (lambda* (#:key outputs #:allow-other-keys)
315 (invoke "make" "-C" "libguile" "scmconfig.h")
316 (invoke "make" "-C" "lib")
317 (chdir "guile-readline")
319 (substitute* "Makefile"
320 (("../libguile/libguile-[[:graph:]]+\\.la")
321 ;; Remove dependency on libguile-X.Y.la.
323 (("^READLINE_LIBS = (.*)$" _ libs)
324 ;; Link against the provided libguile.
325 (string-append "READLINE_LIBS = "
326 "-lguile-$(GUILE_EFFECTIVE_VERSION) "
328 (("\\$\\(top_builddir\\)/meta/build-env")
329 ;; Use the provided Guile, not the one from
333 ;; Install modules to the 'site' directories.
335 "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
336 (("^ccachedir = .*$")
337 "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
339 ;; Load 'guile-readline.so' from the right place.
340 (substitute* "ice-9/readline.scm"
341 (("load-extension \"guile-readline\"")
342 (format #f "load-extension \
343 (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
344 (assoc-ref outputs "out"))))
346 (home-page (package-home-page guile))
347 (native-inputs (package-native-inputs guile))
349 `(,@(package-inputs guile) ;to placate 'configure'
350 ,@(package-propagated-inputs guile)
352 ("readline" ,readline)))
353 (synopsis "Line editing support for GNU Guile")
355 "This module provides line editing support via the Readline library for
356 GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
357 @code{activate-readline} procedure to enable it.")
358 (license license:gpl3+)))
360 (define-public guile-readline
361 (make-guile-readline guile-2.2))
363 (define (guile-variant-package-name prefix)
365 "Return NAME with PREFIX instead of \"guile-\", when applicable."
366 (if (string-prefix? "guile-" name)
367 (string-append prefix "-"
369 (string-length "guile-")))
372 (define package-for-guile-2.2
373 ;; A procedure that rewrites the dependency tree of the given package to use
374 ;; GUILE-2.2 instead of GUILE-2.0.
375 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
376 (guile-variant-package-name "guile2.2")))
378 (define package-for-guile-2.0
379 ;; Likewise, but the other way around. :-)
380 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
381 (guile-variant-package-name "guile2.0")))
383 (define-public guile-for-guile-emacs
384 (package (inherit guile-2.2)
385 (name "guile-for-guile-emacs")
386 (version "20150510.d8d9a8d")
390 (url "git://git.hcoop.net/git/bpt/guile.git")
391 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
392 (file-name (string-append name "-" version "-checkout"))
395 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
397 (substitute-keyword-arguments `(;; Tests aren't passing for now.
398 ;; Obviously we should re-enable this!
400 ,@(package-arguments guile-2.2))
402 `(modify-phases ,phases
403 (add-after 'unpack 'autogen
405 (zero? (system* "sh" "autogen.sh"))))
406 (add-before 'autogen 'patch-/bin/sh
408 (substitute* "build-aux/git-version-gen"
409 (("#!/bin/sh") (string-append "#!" (which "sh"))))
412 `(("autoconf" ,autoconf)
413 ("automake" ,automake)
417 ("gettext" ,gettext-minimal)
418 ,@(package-native-inputs guile-2.2)))
419 ;; Same as in guile-2.0
421 (list (search-path-specification
422 (variable "GUILE_LOAD_PATH")
423 (files '("share/guile/site/2.0")))
424 (search-path-specification
425 (variable "GUILE_LOAD_COMPILED_PATH")
426 (files '("lib/guile/2.0/site-ccache"
427 "share/guile/site/2.0")))))))
429 ;; There has not been any release yet.
430 (define-public guildhall
431 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
435 (version (string-append "0-" revision "." (string-take commit 9)))
439 (url "https://github.com/ijp/guildhall.git")
441 (file-name (string-append name "-" version "-checkout"))
444 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
445 (build-system gnu-build-system)
448 (modify-phases %standard-phases
449 ;; Tests fail without this fix because they try to load the bash
450 ;; executable as a Scheme file. See bug report at
451 ;; https://github.com/ijp/guildhall/issues/22
452 (add-after 'unpack 'fix-bug-22
454 (substitute* "Makefile.am"
455 (("TESTS_ENVIRONMENT=.*")
456 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
457 TEST_EXTENSIONS = .scm
458 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
459 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
460 ;; FIXME: one of the database tests fails for unknown
461 ;; reasons. It does not fail when run outside of Guix.
462 (("tests/database.scm") ""))
464 (add-after 'fix-bug-22 'autogen
466 (zero? (system* "sh" "autogen.sh")))))))
468 `(("guile" ,guile-2.0)))
470 `(("zip" ,zip) ; for tests
471 ("autoconf" ,autoconf)
472 ("automake" ,automake)
473 ("texinfo" ,texinfo)))
474 (synopsis "Package manager for Guile")
476 "Guildhall is a package manager written for Guile Scheme. A guild is
477 an association of independent craftspeople. A guildhall is where they meet.
478 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
481 On a practical level, Guildhall lets you share Scheme modules and programs
482 over the internet, and install code that has been shared by others. Guildhall
483 can handle dependencies, so when a program requires several libraries, and
484 each of those has further dependencies, all of the prerequisites for the
485 program can be installed in one go.")
486 (home-page "https://github.com/ijp/guildhall")
487 (license license:gpl3+))))
494 (define-public artanis
495 (let ((release "0.2.1")
499 (version (if (zero? revision)
501 (string-append release "-"
502 (number->string revision))))
505 (uri (string-append "mirror://gnu/artanis/artanis-"
507 (file-name (string-append name "-" version ".tar.gz"))
510 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
511 (modules '((guix build utils)))
514 (delete-file-recursively "artanis/third-party/json.scm")
515 (delete-file-recursively "artanis/third-party/json")
516 (substitute* '("artanis/artanis.scm"
518 (("(#:use-module \\()artanis third-party (json\\))" _
520 (string-append use-module json)))
521 (substitute* "artanis/oht.scm"
522 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
523 _ pre json-string post)
527 (substitute* "artanis/artanis.scm"
528 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
531 (build-system gnu-build-system)
532 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
533 (inputs `(("guile" ,guile-2.2)
534 ("guile-json" ,guile-json)))
535 (native-inputs `(("bash" ,bash) ;for the `source' builtin
536 ("pkgconfig" ,pkg-config)
537 ("util-linux" ,util-linux))) ;for the `script' command
540 ;; TODO: The documentation must be built with the `docs' target.
541 (let* ((out (assoc-ref %outputs "out"))
542 (scm (string-append out "/share/guile/site/2.2"))
543 (go (string-append out "/lib/guile/2.2/site-ccache")))
544 ;; Don't use (%site-dir) for site paths.
545 (list (string-append "MOD_PATH=" scm)
546 (string-append "MOD_COMPILED_PATH=" go)))
549 (modify-phases %standard-phases
550 (add-before 'install 'substitute-root-dir
551 (lambda* (#:key outputs #:allow-other-keys)
552 (let ((out (assoc-ref outputs "out")))
553 (substitute* "Makefile" ;ignore the execution of bash.bashrc
554 ((" /etc/bash.bashrc") " /dev/null"))
555 (substitute* "Makefile" ;set the root of config files to OUT
556 ((" /etc") (string-append " " out "/etc")))
557 (mkdir-p (string-append out "/bin")) ;for the `art' executable
559 (add-after 'install 'wrap-art
560 (lambda* (#:key outputs #:allow-other-keys)
561 (let* ((out (assoc-ref outputs "out"))
562 (bin (string-append out "/bin"))
563 (scm (string-append out "/share/guile/site/2.2"))
564 (go (string-append out "/lib/guile/2.2/site-ccache")))
565 (wrap-program (string-append bin "/art")
566 `("GUILE_LOAD_PATH" ":" prefix (,scm))
567 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
569 (synopsis "Web application framework written in Guile")
570 (description "GNU Artanis is a web application framework written in Guile
571 Scheme. A web application framework (WAF) is a software framework that is
572 designed to support the development of dynamic websites, web applications, web
573 services and web resources. The framework aims to alleviate the overhead
574 associated with common activities performed in web development. Artanis
575 provides several tools for web development: database access, templating
576 frameworks, session management, URL-remapping for RESTful, page caching, and
578 (home-page "https://www.gnu.org/software/artanis/")
579 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
581 (define-public guile-reader
583 (name "guile-reader")
587 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
591 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
592 (build-system gnu-build-system)
593 (native-inputs `(("pkgconfig" ,pkg-config)
594 ("gperf" ,gperf-3.0)))
595 (inputs `(("guile" ,guile-2.2)))
596 (synopsis "Framework for building readers for GNU Guile")
598 "Guile-Reader is a simple framework for building readers for GNU Guile.
600 The idea is to make it easy to build procedures that extend Guile’s read
601 procedure. Readers supporting various syntax variants can easily be written,
602 possibly by re-using existing “token readers” of a standard Scheme
603 readers. For example, it is used to implement Skribilo’s R5RS-derived
606 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
607 hopefully more powerful and flexible (for instance, one may instantiate as
608 many readers as needed).")
609 (home-page "https://www.nongnu.org/guile-reader/")
610 (license license:gpl3+)))
612 (define-public guile2.0-reader
613 (package-for-guile-2.0 guile-reader))
614 (define-public guile2.2-reader
615 (deprecated-package "guile2.2-reader" guile-reader))
617 (define-public guile-ncurses
619 (name "guile-ncurses")
623 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
627 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
628 (build-system gnu-build-system)
629 (inputs `(("ncurses" ,ncurses)
630 ("guile" ,guile-2.2)))
631 (native-inputs `(("pkg-config" ,pkg-config)))
633 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
634 "--with-gnu-filesystem-hierarchy")
636 (modify-phases %standard-phases
637 (add-before 'build 'fix-libguile-ncurses-file-name
638 (lambda* (#:key outputs #:allow-other-keys)
639 (and (zero? (system* "make" "install"
642 (parallel-job-count))))
643 (let* ((out (assoc-ref outputs "out"))
645 (files (find-files dir ".scm")))
647 (("\"libguile-ncurses\"")
648 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
651 (home-page "https://www.gnu.org/software/guile-ncurses/")
652 (synopsis "Guile bindings to ncurses")
654 "guile-ncurses provides Guile language bindings for the ncurses
656 (license license:lgpl3+)))
658 (define-public guile-ncurses/gpm
660 (inherit guile-ncurses)
661 (name "guile-ncurses-with-gpm")
662 (inputs `(("ncurses" ,ncurses/gpm)
663 ("guile" ,guile-2.2)))))
671 (uri (string-append "mirror://gnu/mcron/mcron-"
675 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
676 (patches (search-patches "mcron-install.patch"))))
677 (build-system gnu-build-system)
678 (native-inputs `(("pkg-config" ,pkg-config)))
679 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
680 (home-page "https://www.gnu.org/software/mcron/")
681 (synopsis "Run jobs at scheduled times")
683 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
684 tasks on a schedule, such as every hour or every Monday. Mcron is written in
685 Guile, so its configuration can be written in Scheme; the original cron
686 format is also supported.")
687 (license license:gpl3+)))
689 (define-public mcron2
690 ;; This is mthl's mcron development branch, not yet merged in mcron.
691 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
695 (version (string-append (package-version mcron) "-0."
696 (string-take commit 7)))
700 (url "https://notabug.org/mthl/mcron/")
704 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
705 (file-name (string-append name "-" version "-checkout"))))
707 `(("autoconf" ,autoconf)
708 ("automake" ,automake)
709 ("pkg-config" ,pkg-config)
711 ("help2man" ,help2man)))
713 `(("guile-2.2" ,guile-2.2)
714 ,@(srfi-1:alist-delete "guile" (package-inputs mcron))))
716 `(#:modules ((ice-9 match) (ice-9 ftw)
717 ,@%gnu-build-system-modules)
718 ;; When building the targets in parallel, help2man tries to generate
719 ;; the manpage from ./cron --help before it is built, which fails.
722 (modify-phases %standard-phases
723 (add-after 'unpack 'use-guile-2.2
725 (substitute* "configure.ac"
726 (("PKG_CHECK_MODULES\\(\\[GUILE\\],.*$")
727 "PKG_CHECK_MODULES([GUILE], [guile-2.2])\n")
731 (add-after 'install 'wrap-mcron
732 (lambda* (#:key outputs #:allow-other-keys)
733 ;; Wrap the 'mcron' command to refer to the right
735 (let* ((out (assoc-ref outputs "out"))
736 (bin (string-append out "/bin"))
738 out "/share/guile/site")))
739 (match (scandir site)
741 (let ((modules (string-append site "/" version)))
742 (wrap-program (string-append bin "/mcron")
743 `("GUILE_LOAD_PATH" ":" prefix
745 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
749 (define-public guile-ics
756 (url "https://github.com/artyom-poptsov/guile-ics")
758 (file-name (string-append name "-" version "-checkout"))
761 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
762 (build-system gnu-build-system)
764 '(#:phases (modify-phases %standard-phases
765 (add-after 'unpack 'autoreconf
767 ;; Repository comes with a broken symlink
768 (delete-file "README")
769 (symlink "README.org" "README")
770 (zero? (system* "autoreconf" "-fi")))))))
772 `(("autoconf" ,autoconf-wrapper)
773 ("automake" ,automake)
775 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
776 ("gettext" ,gettext-minimal)
777 ("pkg-config" ,pkg-config)))
778 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
779 (propagated-inputs `(("guile-lib" ,guile2.0-lib)))
780 (home-page "https://github.com/artyom-poptsov/guile-ics")
781 (synopsis "Guile parser library for the iCalendar format")
783 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
784 pure Scheme. The library can be used to read and write iCalendar data.
786 The library is shipped with documentation in Info format and usage examples.")
787 (license license:gpl3+)))
789 (define-public guile-lib
795 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
799 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
800 (build-system gnu-build-system)
803 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
805 (modify-phases %standard-phases
806 (add-before 'configure 'patch-module-dir
808 (substitute* "src/Makefile.in"
809 (("^moddir = ([[:graph:]]+)")
810 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
811 (("^godir = ([[:graph:]]+)")
813 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
815 (native-inputs `(("pkg-config" ,pkg-config)))
816 (inputs `(("guile" ,guile-2.2)))
817 (home-page "https://www.nongnu.org/guile-lib/")
818 (synopsis "Collection of useful Guile Scheme modules")
820 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
821 modules, allowing for people to cooperate integrating their generic Guile
822 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
825 ;; The whole is under GPLv3+, but some modules are under laxer
826 ;; distribution terms such as LGPL and public domain. See `COPYING' for
828 (license license:gpl3+)))
830 (define-public guile2.0-lib
831 (package-for-guile-2.0 guile-lib))
833 (define-public guile2.2-lib
834 (deprecated-package "guile2.2-lib" guile-lib))
836 (define-public guile-json
842 (uri (string-append "mirror://savannah/guile-json/guile-json-"
846 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
847 (modules '((guix build utils)))
849 ;; Make sure everything goes under .../site/X.Y, like Guile's
850 ;; search paths expects.
852 (substitute* "configure"
854 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
855 (substitute* '("Makefile.in" "json/Makefile.in")
856 (("moddir =.*/share/guile/site" all)
857 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
859 (build-system gnu-build-system)
860 (native-inputs `(("guile" ,guile-2.2)))
861 (home-page "https://savannah.nongnu.org/projects/guile-json/")
862 (synopsis "JSON module for Guile")
864 "Guile-JSON supports parsing and building JSON documents according to the
865 specification. These are the main features:
868 @item Strictly complies to @uref{http://json.org, specification}.
869 @item Build JSON documents programmatically via macros.
870 @item Unicode support for strings.
871 @item Allows JSON pretty printing.
873 (license license:lgpl3+)))
875 (define-public guile2.2-json
876 (deprecated-package "guile2.2-json" guile-json))
878 (define-public guile2.0-json
879 (package-for-guile-2.0 guile-json))
881 (define-public guile-minikanren
883 (name "guile-minikanren")
884 (version "20150424.e844d85")
888 (url "https://github.com/ijp/minikanren.git")
889 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
890 (file-name (string-append name "-" version "-checkout"))
893 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
894 (build-system trivial-build-system)
896 `(#:modules ((guix build utils))
899 (use-modules (guix build utils)
904 (let* ((out (assoc-ref %outputs "out"))
905 (guile (assoc-ref %build-inputs "guile"))
906 (effective (read-line
907 (open-pipe* OPEN_READ
908 (string-append guile "/bin/guile")
909 "-c" "(display (effective-version))")))
910 (module-dir (string-append out "/share/guile/site/"
912 (source (assoc-ref %build-inputs "source"))
913 (doc (string-append out "/share/doc/guile-minikanren"))
914 (scm-files '("minikanren.scm"
915 "minikanren/mkextraforms.scm"
916 "minikanren/mkprelude.scm"
917 "minikanren/mk.scm"))
918 (guild (string-append (assoc-ref %build-inputs "guile")
920 ;; Make installation directories.
921 (mkdir-p (string-append module-dir "/minikanren"))
924 ;; Compile .scm files and install.
926 (setenv "GUILE_AUTO_COMPILE" "0")
927 (for-each (lambda (file)
928 (let* ((dest-file (string-append module-dir "/"
930 (go-file (match (string-split file #\.)
932 (string-append module-dir "/"
934 ;; Install source module.
935 (copy-file file dest-file)
936 ;; Install compiled module.
937 (unless (zero? (system* guild "compile"
941 (error (format #f "Failed to compile ~s to ~s!"
945 ;; Also copy over the README.
946 (install-file "README.org" doc)
949 `(("guile" ,guile-2.0)))
950 (home-page "https://github.com/ijp/minikanren")
951 (synopsis "MiniKanren declarative logic system, packaged for Guile")
953 "MiniKanren is a relational programming extension to the Scheme
954 programming Language, written as a smaller version of Kanren suitable for
955 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
956 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
958 This is Ian Price's r6rs packaged version of miniKanren, which deviates
959 slightly from miniKanren mainline.
961 See http://minikanren.org/ for more on miniKanren generally.")
962 (license license:expat)))
964 (define-public guile2.2-minikanren
965 (package-for-guile-2.2 guile-minikanren))
967 (define-public guile-miniadapton
968 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
971 (name "guile-miniadapton")
972 (version (string-append "0-" revision "." (string-take commit 9)))
976 (url "https://github.com/fisherdj/miniAdapton.git")
978 (file-name (string-append name "-" version "-checkout"))
981 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
982 (build-system gnu-build-system)
984 `(#:modules ((guix build utils)
988 (guix build gnu-build-system))
989 #:tests? #f ; there is no test target
991 (modify-phases %standard-phases
995 (lambda* (#:key outputs #:allow-other-keys)
996 (let* ((cwd (getcwd))
997 (scm-files (find-files "." "\\.scm$"))
998 (effective (read-line
999 (open-pipe* OPEN_READ
1001 "(display (effective-version))")))
1002 (module-dir (string-append (assoc-ref outputs "out")
1003 "/share/guile/site/"
1006 ;; Make installation directories.
1007 (mkdir-p module-dir)
1009 (setenv "GUILE_AUTO_COMPILE" "0")
1011 ;; Compile .scm files and install.
1012 (every (lambda (file)
1013 (let ((go-file (string-append module-dir "/"
1014 (basename file ".scm") ".go")))
1015 ;; Install source module.
1016 (install-file file module-dir)
1017 ;; Compile and install module.
1018 (zero? (system* "guild" "compile" "-L" cwd
1019 "-o" go-file file))))
1022 `(("guile" ,guile-2.2)))
1023 (home-page "https://github.com/fisherdj/miniAdapton")
1024 (synopsis "Minimal implementation of incremental computation in Guile
1026 (description "This package provides a complete Scheme implementation of
1027 miniAdapton, which implements the core functionality of the Adapton system for
1028 incremental computation (also known as self-adjusting computation). Like
1029 Adapton, miniAdapton allows programmers to safely combine mutation and
1030 memoization. miniAdapton is built on top of an even simpler system,
1031 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
1032 understand, extend, and port to host languages other than Scheme.")
1033 (license license:expat))))
1035 (define-public guile-irregex
1037 (name "guile-irregex")
1042 "http://synthcode.com/scheme/irregex/irregex-"
1046 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
1047 (build-system gnu-build-system)
1049 `(#:modules ((guix build utils)
1053 (guix build gnu-build-system))
1055 (modify-phases %standard-phases
1060 (lambda* (#:key inputs outputs #:allow-other-keys)
1061 (let* ((out (assoc-ref outputs "out"))
1062 (effective (read-line
1063 (open-pipe* OPEN_READ
1065 "(display (effective-version))")))
1066 (module-dir (string-append out "/share/guile/site/"
1068 (source (assoc-ref inputs "source"))
1069 (doc (string-append out "/share/doc/guile-irregex/"))
1070 (guild (string-append (assoc-ref %build-inputs "guile")
1072 ;; Make installation directories.
1073 (mkdir-p (string-append module-dir "/rx/source"))
1076 ;; Compile .scm files and install.
1077 (setenv "GUILE_AUTO_COMPILE" "0")
1079 (for-each (lambda (copy-info)
1081 ((src-file dest-file-basis)
1082 (let* ((dest-file (string-append
1083 module-dir dest-file-basis
1085 (go-file (string-append
1086 module-dir dest-file-basis
1088 ;; Install source module.
1091 ;; Install compiled module.
1092 (unless (zero? (system* guild "compile"
1096 (error (format #f "Failed to compile ~s to ~s!"
1097 src-file dest-file)))))))
1098 '(("irregex-guile.scm" "/rx/irregex")
1099 ("irregex.scm" "/rx/source/irregex")
1100 ;; Not really reachable via guile's packaging system,
1101 ;; but nice to have around
1102 ("irregex-utils.scm" "/rx/source/irregex-utils")))
1104 ;; Also copy over the README.
1105 (install-file "irregex.html" doc)
1108 `(("guile" ,guile-2.0)))
1109 (home-page "http://synthcode.com/scheme/irregex")
1110 (synopsis "S-expression based regular expressions")
1112 "Irregex is an s-expression based alternative to your classic
1113 string-based regular expressions. It implements SRFI 115 and is deeply
1114 inspired by the SCSH regular expression system.")
1115 (license license:bsd-3)))
1117 (define-public guile2.2-irregex
1118 (package-for-guile-2.2 guile-irregex))
1120 ;; There are two guile-gdbm packages, one using the FFI and one with
1121 ;; direct C bindings, hence the verbose name.
1123 (define-public guile-gdbm-ffi
1125 (name "guile-gdbm-ffi")
1126 (version "20120209.fa1d5b6")
1130 (url "https://github.com/ijp/guile-gdbm.git")
1131 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1132 (file-name (string-append name "-" version "-checkout"))
1135 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1136 (build-system trivial-build-system)
1138 `(("guile" ,guile-2.2)
1139 ;; patch-and-repack doesn't work for git checkouts,
1140 ;; so we must apply the patch manually.
1142 ("patch-file" ,(search-patch
1143 "guile-gdbm-ffi-support-gdbm-1.14.patch"))))
1148 ((guix build utils))
1151 (use-modules (guix build utils)
1155 ;; Avoid warnings we can safely ignore
1156 (setenv "GUILE_AUTO_COMPILE" "0")
1158 (let* ((out (assoc-ref %outputs "out"))
1161 (open-pipe* OPEN_READ
1163 (assoc-ref %build-inputs "guile")
1165 "-c" "(display (effective-version))")))
1166 (module-dir (string-append out "/share/guile/site/"
1168 (source (assoc-ref %build-inputs "source"))
1169 (doc (string-append out "/share/doc"))
1170 (guild (string-append (assoc-ref %build-inputs "guile")
1173 (string-append module-dir "/gdbm.scm"))
1175 (string-append module-dir "/gdbm.go"))
1177 (lambda (in-file out-file)
1178 (invoke guild "compile" "-o" out-file in-file))))
1179 ;; Switch directory for compiling and installing
1182 ;; Install the documentation.
1183 (install-file "README.md" doc)
1184 (copy-recursively "examples" (string-append doc "/examples"))
1186 ;; Make installation directories.
1187 (mkdir-p module-dir)
1190 (copy-file "gdbm.scm" gdbm.scm-dest)
1193 (substitute* gdbm.scm-dest
1194 (("\\(dynamic-link \"libgdbm\"\\)")
1195 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1196 (assoc-ref %build-inputs "gdbm"))))
1198 ;; Apply the patch to add support for gdbm-1.14.
1199 (let ((patch-command (string-append (assoc-ref %build-inputs "patch")
1201 (patch-file (assoc-ref %build-inputs "patch-file")))
1202 (with-directory-excursion (dirname gdbm.scm-dest)
1203 (format #t "applying '~a'...~%" patch-file)
1204 (invoke patch-command "--force" "--input" patch-file)))
1206 ;; compile to the destination
1207 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1208 (home-page "https://github.com/ijp/guile-gdbm")
1209 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1211 "Guile bindings to the GDBM key-value storage system, using
1212 Guile's foreign function interface.")
1213 (license license:gpl3+)))
1215 (define-public guile2.0-gdbm-ffi
1216 (package-for-guile-2.0 guile-gdbm-ffi))
1218 (define-public guile2.2-gdbm-ffi
1219 (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
1221 (define-public guile-sqlite3
1222 (let ((commit "10c13a7e02ab1655c8a758e560cafc9d6eff26f4")
1225 (name "guile-sqlite3")
1226 (version (git-version "0.0" revision commit))
1228 ;; XXX: This used to be available read-only at
1229 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1230 ;; eventually disappeared, so we have our own copy here.
1231 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1239 "0nhhswpd7nb2f0gfr55fzcc2xm3l2xx4rbljsd1clrm8fj2d7q9d"))
1240 (file-name (string-append name "-" version "-checkout"))
1241 (modules '((guix build utils)))
1243 ;; Upgrade 'Makefile.am' to the current way of doing things.
1245 (substitute* "Makefile.am"
1246 (("TESTS_ENVIRONMENT")
1247 "TEST_LOG_COMPILER"))
1250 (build-system gnu-build-system)
1252 `(("autoconf" ,autoconf)
1253 ("automake" ,automake)
1254 ("pkg-config" ,pkg-config)))
1256 `(("guile" ,guile-2.2)
1257 ("sqlite" ,sqlite)))
1259 '(#:phases (modify-phases %standard-phases
1260 (add-after 'unpack 'autoreconf
1262 (zero? (system* "autoreconf" "-vfi"))))
1263 (add-before 'build 'set-sqlite3-file-name
1264 (lambda* (#:key inputs #:allow-other-keys)
1265 (substitute* "sqlite3.scm"
1267 (string-append "\"" (assoc-ref inputs "sqlite")
1268 "/lib/libsqlite3\"")))
1270 (synopsis "Access SQLite databases from Guile")
1272 "This package provides Guile bindings to the SQLite database system.")
1273 (license license:gpl3+))))
1275 (define-public haunt
1281 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1285 "0nm00krmqq4zmqi2irh35dbf2cn6al58s620hijmhfvhgvdqznlp"))))
1286 (build-system gnu-build-system)
1288 `(#:modules ((ice-9 match) (ice-9 ftw)
1289 ,@%gnu-build-system-modules)
1290 #:tests? #f ; test suite is non-deterministic :(
1291 #:phases (modify-phases %standard-phases
1292 (add-after 'install 'wrap-haunt
1293 (lambda* (#:key outputs #:allow-other-keys)
1294 ;; Wrap the 'haunt' command to refer to the right
1296 (let* ((out (assoc-ref outputs "out"))
1297 (bin (string-append out "/bin"))
1298 (site (string-append
1299 out "/share/guile/site")))
1300 (match (scandir site)
1302 (let ((modules (string-append site "/" version))
1303 (compiled-modules (string-append
1304 out "/lib/guile/" version
1306 (wrap-program (string-append bin "/haunt")
1307 `("GUILE_LOAD_PATH" ":" prefix
1309 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1310 (,compiled-modules)))
1313 `(("pkg-config" ,pkg-config)
1314 ("texinfo" ,texinfo)))
1316 `(("guile" ,guile-2.2)))
1318 `(("guile-reader" ,guile-reader)
1319 ("guile-commonmark" ,guile-commonmark)))
1320 (synopsis "Functional static site generator")
1321 (description "Haunt is a static site generator written in Guile
1322 Scheme. Haunt features a functional build system and an extensible
1323 interface for reading articles in any format.")
1324 (home-page "http://haunt.dthompson.us")
1325 (license license:gpl3+)))
1327 (define-public guile2.0-haunt
1328 (package-for-guile-2.0
1329 (package (inherit haunt) (name "guile2.0-haunt"))))
1330 (define-public guile2.2-haunt
1331 (deprecated-package "guile2.2-haunt" haunt))
1333 (define-public guile-config
1335 (name "guile-config")
1340 "http://alex.pompo.co/software/" name "-" version
1344 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1345 (build-system gnu-build-system)
1347 `(("guile" ,guile-2.0)))
1348 (synopsis "Guile application configuration parsing library")
1350 "Guile Config is a library providing a declarative approach to
1351 application configuration specification. The library provides clean
1352 configuration declaration forms, and processors that take care of:
1353 configuration file creation; configuration file parsing; command-line
1354 parameter parsing using getopt-long; basic GNU command-line parameter
1355 generation (--help, --usage, --version); automatic output generation for the
1356 above command-line parameters.")
1357 (home-page "https://github.com/a-sassmannshausen/guile-config")
1358 (license license:agpl3+)))
1360 (define-public guile-redis
1362 (name "guile-redis")
1366 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1370 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1371 (modules '((guix build utils)))
1373 ;; Make sure everything goes under .../site/X.Y, like Guile's
1374 ;; search paths expects.
1376 (substitute* "configure"
1377 (("ac_subst_vars='")
1378 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1379 (substitute* '("Makefile.in"
1381 "redis/commands/Makefile.in")
1382 (("moddir =.*/share/guile/site" all)
1383 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1385 (build-system gnu-build-system)
1387 `(("guile" ,guile-2.0)))
1388 (home-page "https://savannah.nongnu.org/projects/guile-redis/")
1389 (synopsis "Redis client library for Guile")
1390 (description "Guile-redis provides a Scheme interface to the Redis
1391 key-value cache and store.")
1392 (license license:lgpl3+)))
1394 (define-public guile2.2-redis
1395 (package-for-guile-2.2 guile-redis))
1397 (define-public guile-wisp
1403 (uri (string-append "https://bitbucket.org/ArneBab/"
1404 "wisp/downloads/wisp-"
1408 "1f2bbicq1rxnwmiplrm4r75wj06w385mjkyvi7g4k740bgwcrzxr"))))
1409 (build-system gnu-build-system)
1411 `(#:modules ((guix build gnu-build-system)
1417 (modify-phases %standard-phases
1418 (add-before 'configure 'substitute-before-config
1420 (lambda* (#:key inputs #:allow-other-keys)
1421 (let ((bash (assoc-ref inputs "bash")))
1422 ;; Puts together some test files with /bin/bash hardcoded
1423 (substitute* "Makefile.in"
1424 (("/usr/bin/env bash")
1425 (string-append bash "/bin/bash"))
1426 (("\\$\\(GUILE_EFFECTIVE_VERSION\\)/site")
1427 "site/$(GUILE_EFFECTIVE_VERSION)")) ;use the right order
1430 ;; auto compilation breaks, but if we set HOME to /tmp,
1433 'check 'auto-compile-hacky-workaround
1435 (setenv "HOME" "/tmp")
1437 (add-after 'install 'install-go-files
1438 (lambda* (#:key outputs inputs #:allow-other-keys)
1439 (let* ((out (assoc-ref outputs "out"))
1440 (effective (read-line
1441 (open-pipe* OPEN_READ
1443 "(display (effective-version))")))
1444 (module-dir (string-append out "/share/guile/site/"
1446 (object-dir (string-append out "/lib/guile/" effective
1448 (prefix (string-length module-dir)))
1449 ;; compile to the destination
1450 (for-each (lambda (file)
1451 (let* ((base (string-drop (string-drop-right file 4)
1453 (go (string-append object-dir base ".go")))
1454 (invoke "guild" "compile" "-L" module-dir
1456 (find-files module-dir "\\.scm$"))
1458 (home-page "http://draketo.de/english/wisp")
1460 `(("guile" ,guile-2.2)))
1462 `(("python" ,python)
1463 ("pkg-config" ,pkg-config)))
1464 (synopsis "Whitespace to lisp syntax for Guile")
1465 (description "Wisp is a syntax for Guile which provides a Python-like
1466 whitespace-significant language. It may be easier on the eyes for some
1467 users and in some situations.")
1468 (license license:gpl3+)))
1470 (define-public guile-sly
1476 (uri (string-append "https://files.dthompson.us/sly/sly-"
1480 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))
1481 (modules '((guix build utils)))
1484 (substitute* "configure"
1485 (("_guile_required_version=\"2.0.11\"")
1486 "_guile_required_version=\"2\"")
1487 (("ac_subst_vars='")
1488 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1489 (substitute* (find-files "." "Makefile.in")
1493 "$(prefix)/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n"))
1497 "$(prefix)/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")))
1499 (build-system gnu-build-system)
1502 (list (string-append "--with-libfreeimage-prefix="
1503 (assoc-ref %build-inputs "freeimage"))
1504 (string-append "--with-libgslcblas-prefix="
1505 (assoc-ref %build-inputs "gsl")))))
1507 `(("pkg-config" ,pkg-config)))
1509 `(("guile-sdl" ,guile-sdl)
1510 ("guile-opengl" ,guile-opengl)))
1512 `(("guile" ,guile-2.2)
1514 ("freeimage" ,freeimage)
1516 (synopsis "2D/3D game engine for GNU Guile")
1517 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1518 features a functional reactive programming interface and live coding
1520 (home-page "http://dthompson.us/pages/software/sly.html")
1521 (license license:gpl3+)))
1523 (define-public g-wrap
1529 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1533 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1534 (build-system gnu-build-system)
1536 `(("pkg-config" ,pkg-config)))
1538 `(("guile" ,guile-2.2)
1539 ("guile-lib" ,guile-lib)))
1541 `(("libffi" ,libffi)))
1543 `(#:configure-flags '("--disable-Werror")
1545 (modify-phases %standard-phases
1546 (add-before 'configure 'pre-configure
1547 (lambda* (#:key outputs #:allow-other-keys)
1548 (let ((out (assoc-ref outputs "out")))
1549 (substitute* (find-files "." "^Makefile.in$")
1550 (("guilemoduledir =.*guile/site" all)
1551 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1553 (synopsis "Generate C bindings for Guile")
1554 (description "G-Wrap is a tool and Guile library for generating function
1555 wrappers for inter-language calls. It currently only supports generating Guile
1556 wrappers for C functions. Given a definition of the types and prototypes for
1557 a given C interface, G-Wrap will automatically generate the C code that
1558 provides access to that interface and its types from the Scheme level.")
1559 (home-page "https://www.nongnu.org/g-wrap/index.html")
1560 (license license:lgpl2.1+)))
1562 (define-public guile-dbi
1569 "http://download.gna.org/guile-dbi/guile-dbi-"
1573 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1574 (build-system gnu-build-system)
1577 (list (string-append
1578 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1580 (modify-phases %standard-phases
1581 (add-after 'install 'patch-extension-path
1582 (lambda* (#:key outputs #:allow-other-keys)
1583 (let* ((out (assoc-ref outputs "out"))
1584 (dbi.scm (string-append
1585 out "/share/guile/site/2.0/dbi/dbi.scm"))
1586 (ext (string-append out "/lib/libguile-dbi")))
1587 (substitute* dbi.scm (("libguile-dbi") ext))
1590 `(("guile" ,guile-2.0)))
1591 (synopsis "Guile database abstraction layer")
1592 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1594 "guile-dbi is a library for Guile that provides a convenient interface to
1595 SQL databases. Database programming with guile-dbi is generic in that the same
1596 programming interface is presented regardless of which database system is used.
1597 It currently supports MySQL, Postgres and SQLite3.")
1598 (license license:gpl2+)))
1600 (define-public guile-dbd-sqlite3
1602 (name "guile-dbd-sqlite3")
1607 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1611 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1612 (build-system gnu-build-system)
1614 `(("pkg-config" ,pkg-config)))
1616 `(("sqlite" ,sqlite)
1617 ("zlib" ,(@ (gnu packages compression) zlib))))
1619 `(("guile-dbi" ,guile-dbi)))
1620 (synopsis "Guile DBI driver for SQLite")
1621 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1623 "guile-dbi is a library for Guile that provides a convenient interface to
1624 SQL databases. This package implements the interface for SQLite.")
1625 (license license:gpl2+)))
1627 (define-public guile-dsv
1634 (url "https://github.com/artyom-poptsov/guile-dsv")
1635 (commit "bdc5267d007478abc20ea96d7c459b7dd9560b3d")))
1636 (file-name (string-append name "-" version "-checkout"))
1639 "1irw6mz8998nwyhzrw9g94jcz60b9zljgqfmipaz1ybn8579qjx0"))))
1640 (build-system gnu-build-system)
1642 `(("autoconf" ,autoconf)
1643 ("automake" ,automake)
1644 ("pkg-config" ,pkg-config)
1645 ("texinfo" ,texinfo)))
1646 (inputs `(("guile" ,guile-2.2)))
1647 (propagated-inputs `(("guile-lib" ,guile-lib)))
1649 '(#:phases (modify-phases %standard-phases
1650 (add-before 'configure 'set-guilesitedir
1652 (substitute* "Makefile.in"
1653 (("^guilesitedir =.*$")
1655 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1656 (substitute* "modules/Makefile.in"
1657 (("^guilesitedir =.*$")
1659 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1660 (substitute* "modules/dsv/Makefile.in"
1661 (("^guilesitedir =.*$")
1663 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1665 (add-after 'unpack 'autoreconf
1667 (zero? (system* "autoreconf" "-vfi")))))))
1668 (home-page "https://github.com/artyom-poptsov/guile-dsv")
1669 (synopsis "DSV module for Guile")
1671 "Guile-DSV is a GNU Guile module for working with the
1672 delimiter-separated values (DSV) data format. Guile-DSV supports the
1673 Unix-style DSV format and RFC 4180 format.")
1674 (license license:gpl3+)))
1676 (define-public guile-xosd
1682 (uri (string-append "https://github.com/alezost/" name
1683 "/releases/download/v" version
1684 "/" name "-" version ".tar.gz"))
1687 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1688 (build-system gnu-build-system)
1690 `(("pkg-config" ,pkg-config)))
1692 `(("guile" ,guile-2.2)
1694 ("libxext" ,libxext)
1695 ("libxinerama" ,libxinerama)
1697 (home-page "https://github.com/alezost/guile-xosd")
1698 (synopsis "XOSD bindings for Guile")
1700 "Guile-XOSD provides Guile bindings for @code{libxosd},
1701 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1703 (license license:gpl3+)))
1705 (define-public guile-daemon
1707 (name "guile-daemon")
1711 (uri (string-append "https://github.com/alezost/" name
1712 "/releases/download/v" version
1713 "/" name "-" version ".tar.gz"))
1716 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1717 (build-system gnu-build-system)
1719 `(("pkg-config" ,pkg-config)))
1721 `(("guile" ,guile-2.2)))
1722 (home-page "https://github.com/alezost/guile-daemon")
1723 (synopsis "Evaluate code in a running Guile process")
1725 "Guile-Daemon is a small Guile program that loads your initial
1726 configuration file, and then reads and evaluates Guile expressions that
1727 you send to a FIFO file.")
1728 (license license:gpl3+)))
1730 (define-public guile-commonmark
1732 (name "guile-commonmark")
1736 (uri (string-append "https://github.com/OrangeShark/" name
1737 "/releases/download/v" version
1738 "/" name "-" version ".tar.gz"))
1741 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1742 (modules '((guix build utils)))
1744 ;; Use the real effective version of Guile in directory names
1745 ;; instead of a hard-coded "/2.0".
1747 (substitute* "configure"
1748 (("ac_subst_vars='")
1749 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1750 (substitute* "Makefile.in"
1752 "/site/@GUILE_EFFECTIVE_VERSION@"))
1754 (build-system gnu-build-system)
1756 `(("guile" ,guile-2.2)))
1757 (synopsis "CommonMark parser for Guile")
1759 "guile-commonmark is a library for parsing CommonMark, a fully specified
1760 variant of Markdown. The library is written in Guile Scheme and is designed
1761 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1762 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1763 is no support for parsing block and inline level HTML.")
1764 (home-page "https://github.com/OrangeShark/guile-commonmark")
1765 (license license:lgpl3+)))
1767 (define-public guile2.0-commonmark
1768 (package-for-guile-2.0 guile-commonmark))
1769 (define-public guile2.2-commonmark
1770 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1772 (define-public guile-bytestructures
1774 (name "guile-bytestructures")
1778 (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
1779 "/releases/download/v" version
1780 "/bytestructures-" version ".tar.gz"))
1783 "1lnfcy65mqj823lamy2n2vaghdz0g7mj011bgnhmd6hwpnaidnh2"))))
1784 (build-system gnu-build-system)
1786 `(("pkg-config" ,pkg-config)))
1788 `(("guile" ,guile-2.2)))
1789 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1790 (synopsis "Structured access to bytevector contents for Guile")
1792 "Guile bytestructures offers a system imitating the type system
1793 of the C programming language, to be used on bytevectors. C's type
1794 system works on raw memory, and Guile works on bytevectors which are
1795 an abstraction over raw memory. It's also more powerful than the C
1796 type system, elevating types to first-class status.")
1797 (license license:gpl3+)))
1799 (define-public guile2.0-bytestructures
1800 (package-for-guile-2.0 guile-bytestructures))
1802 (define-public guile-aspell
1804 (name "guile-aspell")
1809 "http://lonelycactus.com/tarball/guile_aspell-"
1813 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1814 (build-system gnu-build-system)
1816 '(#:phases (modify-phases %standard-phases
1817 (add-before 'configure 'set-guilesitedir
1819 (substitute* "Makefile.in"
1820 (("^guilesitedir =.*$")
1822 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1824 (add-before 'build 'set-libaspell-file-name
1825 (lambda* (#:key inputs #:allow-other-keys)
1826 (let ((aspell (assoc-ref inputs "aspell")))
1827 (substitute* "aspell.scm"
1828 (("\"libaspell\\.so\"")
1829 (string-append "\"" aspell
1830 "/lib/libaspell\"")))
1832 (native-inputs `(("pkg-config" ,pkg-config)))
1833 (inputs `(("guile" ,guile-2.2)
1834 ("aspell" ,aspell)))
1835 (home-page "https://github.com/spk121/guile-aspell")
1836 (synopsis "Spell-checking from Guile")
1838 "guile-aspell is a Guile Scheme library for comparing a string against a
1839 dictionary and suggesting spelling corrections.")
1840 (license license:gpl3+)))
1842 (define-public guile-bash
1843 ;; This project is currently retired. It was initially announced here:
1844 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1845 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1849 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1851 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1859 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1860 (file-name (string-append name "-" version "-checkout"))))
1861 (build-system gnu-build-system)
1864 ;; Add -I to match 'bash.pc' of Bash 4.4.
1865 (list (string-append "CPPFLAGS=-I"
1866 (assoc-ref %build-inputs "bash:include")
1867 "/include/bash/include")
1869 ;; The '.a' file is useless.
1872 ;; Install 'lib/bash' as Bash 4.4 expects.
1873 (string-append "--libdir=" (assoc-ref %outputs "out")
1875 (native-inputs `(("pkg-config" ,pkg-config)
1876 ("autoconf" ,autoconf-wrapper)
1877 ("automake" ,automake)
1878 ("libtool" ,libtool)
1879 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1880 ("gettext" ,gettext-minimal)
1882 ;; Bash with loadable module support, for the test
1884 ("bash-full" ,bash)))
1885 (inputs `(("guile" ,guile-2.0)
1886 ("bash:include" ,bash "include")))
1887 (synopsis "Extend Bash using Guile")
1889 "Guile-Bash provides a shared library and set of Guile modules,
1890 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1891 the following aspects of Bash:
1895 @item setting and getting Bash variables;
1896 @item creating dynamic variables;
1897 @item creating Bash functions with a Scheme implementation;
1898 @item reader macro for output capturing;
1899 @item reader macro for evaluating raw Bash commands.
1905 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1908 and then run @command{scm example.scm}.")
1909 (license license:gpl3+))))
1911 (define-public guile-8sync
1913 (name "guile-8sync")
1917 (uri (string-append "mirror://gnu/8sync/8sync-" version
1921 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1922 (build-system gnu-build-system)
1923 (native-inputs `(("autoconf" ,autoconf)
1924 ("automake" ,automake)
1925 ("guile" ,guile-2.2)
1926 ("pkg-config" ,pkg-config)
1927 ("texinfo" ,texinfo)))
1929 `(#:phases (modify-phases %standard-phases
1930 (add-before 'configure 'setenv
1933 (setenv "GUILE_AUTO_COMPILE" "0")
1935 (home-page "https://gnu.org/s/8sync/")
1936 (synopsis "Asynchronous actor model library for Guile")
1938 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1939 library for GNU Guile based on the actor model.
1941 Note that 8sync is only available for Guile 2.2.")
1942 (license license:lgpl3+)))
1944 (define-public guile-fibers
1946 (name "guile-fibers")
1950 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1954 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1955 (build-system gnu-build-system)
1957 `(("texinfo" ,texinfo)
1958 ("pkg-config" ,pkg-config)))
1960 `(("guile" ,guile-2.2)))
1961 (synopsis "Lightweight concurrency facility for Guile")
1963 "Fibers is a Guile library that implements a a lightweight concurrency
1964 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1965 like a \"goroutine\" from the Go language: a lightweight thread-like
1966 abstraction. Systems built with Fibers can scale up to millions of concurrent
1967 fibers, tens of thousands of concurrent socket connections, and many parallel
1968 cores. The Fibers library also provides Concurrent ML-like channels for
1969 communication between fibers.
1971 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1972 is not available for Guile 2.0.")
1973 (home-page "https://github.com/wingo/fibers")
1974 (license license:lgpl3+)))
1976 (define-public guile-git
1977 (let ((revision "4")
1978 (commit "951a32c56cc4d80f8836e3c7394783e69c1fcbad"))
1981 (version (string-append "0.0-" revision "." (string-take commit 7)))
1982 (home-page "https://gitlab.com/guile-git/guile-git.git")
1985 (uri (git-reference (url home-page) (commit commit)))
1988 "0qri9x73ij6g40ijs4hyhj8knxw39ydgghiafq74dp99bc8hh0qc"))
1989 (file-name (git-file-name name version))))
1990 (build-system gnu-build-system)
1992 `(#:phases (modify-phases %standard-phases
1993 ;; FIXME: On i686, bytestructures miscalculates the offset
1994 ;; of the 'old-file' and 'new-file' fields within the
1995 ;; '%diff-delta' structure.
1996 ,@(if (string=? (%current-system) "x86_64-linux")
1998 '((add-before 'check 'skip-tests
2000 (substitute* "Makefile"
2001 (("tests/status\\.scm")
2005 `(("autoconf" ,autoconf)
2006 ("automake" ,automake)
2007 ("texinfo" ,texinfo)
2008 ("pkg-config" ,pkg-config)))
2010 `(("guile" ,guile-2.2)
2011 ("libgit2" ,libgit2)))
2013 `(("guile-bytestructures" ,guile-bytestructures)))
2014 (synopsis "Guile bindings for libgit2")
2016 "This package provides Guile bindings to libgit2, a library to
2017 manipulate repositories of the Git version control system.")
2018 (license license:gpl3+))))
2020 (define-public guile2.0-git
2021 (package-for-guile-2.0 guile-git))
2023 (define-public guile-syntax-highlight
2025 (name "guile-syntax-highlight")
2029 (uri (string-append "https://files.dthompson.us/"
2030 "guile-syntax-highlight/"
2031 "guile-syntax-highlight-"
2035 "1p771kq15x83483m23bhah1sz6vkalg3drm7x279f4j1cxligkzi"))))
2036 (build-system gnu-build-system)
2038 `(("pkg-config" ,pkg-config)))
2040 `(("guile" ,guile-2.2)))
2041 (synopsis "General-purpose syntax highlighter for GNU Guile")
2042 (description "Guile-syntax-highlight is a general-purpose syntax
2043 highlighting library for GNU Guile. It can parse code written in various
2044 programming languages into a simple s-expression that can be converted to
2045 HTML (via SXML) or any other format for rendering.")
2046 (home-page "http://dthompson.us/projects/guile-syntax-highlight.html")
2047 (license license:lgpl3+)))
2049 (define-public guile-sjson
2051 (name "guile-sjson")
2055 (uri (string-append "https://dustycloud.org/misc/sjson-" version
2059 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
2060 (build-system gnu-build-system)
2062 `(("autoconf" ,autoconf)
2063 ("automake" ,automake)
2064 ("pkg-config" ,pkg-config)))
2066 `(("guile" ,guile-2.2)))
2067 (home-page "https://gitlab.com/dustyweb/guile-sjson")
2068 (synopsis "S-expression based json reader/writer for Guile")
2069 (description "guile-sjson is a json reader/writer for Guile.
2070 It has a nice, simple s-expression based syntax.")
2071 (license license:lgpl3+)))
2073 (define-public guile-colorized
2075 (name "guile-colorized")
2079 (uri (string-append "https://github.com/NalaGinrut/guile-colorized/"
2080 "archive/v" version ".tar.gz"))
2081 (file-name (string-append name "-" version ".tar.gz"))
2084 "16xhc3an6aglnca8xl3mvgi8hsqzqn68vsl5ga4bz8bvbap5fn4p"))))
2085 (build-system gnu-build-system)
2087 `(#:modules ((system base compile)
2088 ,@%gnu-build-system-modules)
2089 #:tests? #f ;No tests included
2091 (modify-phases %standard-phases
2092 (delete 'configure) ;No configure script
2094 (lambda* (#:key outputs inputs #:allow-other-keys)
2095 (let* ((out (assoc-ref outputs "out"))
2096 (module-dir (string-append out "/share/guile/site/2.2"))
2097 (language-dir (string-append module-dir "/ice-9"))
2098 (guild (string-append (assoc-ref inputs "guile")
2100 ;; The original 'make install' is too primitive.
2103 (install-file "ice-9/colorized.scm" language-dir)
2105 ;; compile to the destination
2106 (compile-file "ice-9/colorized.scm"
2107 #:output-file (string-append
2108 language-dir "/colorized.go"))
2111 `(("guile" ,guile-2.2)))
2112 (home-page "https://github.com/NalaGinrut/guile-colorized")
2113 (synopsis "Colorized REPL for Guile")
2115 "Guile-colorized provides you with a colorized REPL for GNU Guile.")
2116 (license license:gpl3+)))
2118 ;;; guile.scm ends here