1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
8 ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10 ;;; Copyright © 2016 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>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages guile)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages aspell)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages bdw-gc)
37 #:use-module (gnu packages gawk)
38 #:use-module (gnu packages gperf)
39 #:use-module (gnu packages libffi)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages flex)
42 #:use-module (gnu packages libunistring)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages m4)
45 #:use-module (gnu packages multiprecision)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages readline)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages ed)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages texinfo)
52 #:use-module (gnu packages man)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages databases)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages sdl)
58 #:use-module (gnu packages maths)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages version-control)
61 #:use-module (gnu packages xdisorg)
62 #:use-module (gnu packages xorg)
63 #:use-module (gnu packages zip)
64 #:use-module (guix packages)
65 #:use-module (guix download)
66 #:use-module (guix git-download)
67 #:use-module (guix build-system gnu)
68 #:use-module (guix build-system trivial)
69 #:use-module (guix utils)
70 #:use-module (ice-9 match))
74 ;;; GNU Guile, and modules and extensions.
78 (define-public guile-1.8
84 (uri (string-append "mirror://gnu/guile/guile-" version
88 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
89 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
90 (build-system gnu-build-system)
91 (arguments '(#:configure-flags '("--disable-error-on-warning")
93 ;; Insert a phase before `configure' to patch things up.
94 #:phases (alist-cons-before
97 (lambda* (#:key outputs #:allow-other-keys)
98 ;; Add a call to `lt_dladdsearchdir' so that
99 ;; `libguile-readline.so' & co. are in the
100 ;; loader's search path.
101 (substitute* "libguile/dynl.c"
102 (("lt_dlinit.*$" match)
104 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
106 (assoc-ref outputs "out"))))
108 ;; The usual /bin/sh...
109 (substitute* "ice-9/popen.scm"
110 (("/bin/sh") (which "sh"))))
112 (inputs `(("gawk" ,gawk)
113 ("readline" ,readline)))
115 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
117 (propagated-inputs `(("gmp" ,gmp)
118 ("libltdl" ,libltdl)))
120 ;; When cross-compiling, a native version of Guile itself is needed.
121 (self-native-input? #t)
124 (list (search-path-specification
125 (variable "GUILE_LOAD_PATH")
126 (files '("share/guile/site")))))
128 (synopsis "Scheme implementation intended especially for extensions")
130 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
131 official extension language of the GNU system. It is an implementation of
132 the Scheme language which can be easily embedded in other applications to
133 provide a convenient means of extending the functionality of the application
134 without requiring the source code to be rewritten.")
135 (home-page "https://www.gnu.org/software/guile/")
136 (license license:lgpl2.0+)))
138 (define-public guile-2.0
144 (uri (string-append "mirror://gnu/guile/guile-" version
148 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
149 (build-system gnu-build-system)
150 (native-inputs `(("pkgconfig" ,pkg-config)))
151 (inputs `(("libffi" ,libffi)
152 ("readline" ,readline)
153 ,@(libiconv-if-needed)
154 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
156 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
157 ;; reads `-lltdl -lunistring', adding them here will add the needed
158 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
159 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
160 ("libunistring" ,libunistring)
162 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
163 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
166 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
167 ;; must be propagated.
171 (self-native-input? #t)
173 (outputs '("out" "debug"))
176 `(#:configure-flags '("--disable-static") ;saves 3MiB
177 #:phases (alist-cons-before
178 'configure 'pre-configure
179 (lambda* (#:key inputs #:allow-other-keys)
180 ;; Tell (ice-9 popen) the file name of Bash.
181 (let ((bash (assoc-ref inputs "bash")))
182 (substitute* "module/ice-9/popen.scm"
183 ;; If bash is #f allow fallback for user to provide
184 ;; "bash" in PATH. This happens when cross-building to
185 ;; MinGW for which we do not have Bash yet.
187 ,@(if (target-mingw?)
189 (string-append bash "/bin/bash")
191 '((string-append bash "/bin/bash")))))))
195 (list (search-path-specification
196 (variable "GUILE_LOAD_PATH")
197 (files '("share/guile/site/2.0")))
198 (search-path-specification
199 (variable "GUILE_LOAD_COMPILED_PATH")
200 (files '("lib/guile/2.0/site-ccache"
201 "share/guile/site/2.0")))))
203 (synopsis "Scheme implementation intended especially for extensions")
205 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
206 official extension language of the GNU system. It is an implementation of
207 the Scheme language which can be easily embedded in other applications to
208 provide a convenient means of extending the functionality of the application
209 without requiring the source code to be rewritten.")
210 (home-page "https://www.gnu.org/software/guile/")
211 (license license:lgpl3+)))
213 (define-public guile-2.0/fixed
214 ;; A package of Guile 2.0 that's rarely changed. It is the one used
215 ;; in the `base' module, and thus changing it entails a full rebuild.
218 (properties '((hidden? . #t))) ;people should install 'guile-2.0'
221 (define-public guile-2.2
222 (package (inherit guile-2.0)
228 (uri (string-append "mirror://gnu/guile/guile-" version
232 "0dlwkpqs0b17mmjbf53891acs16ppxxmfwhx2vl5x2946pzrm3c7"))
233 (modules '((guix build utils)))
235 ;; Remove the pre-built object files. Instead, build everything
236 ;; from source, at the expense of significantly longer build
237 ;; times (almost 3 hours on a 4-core Intel i5).
238 (snippet '(for-each delete-file
239 (find-files "prebuilt" "\\.go$")))))
240 (properties '((timeout . 72000) ;20 hours
241 (max-silent-time . 10800))) ;3 hours (needed on ARM)
243 (list (search-path-specification
244 (variable "GUILE_LOAD_PATH")
245 (files '("share/guile/site/2.2")))
246 (search-path-specification
247 (variable "GUILE_LOAD_COMPILED_PATH")
248 (files '("lib/guile/2.2/site-ccache"
249 "share/guile/site/2.2")))))))
251 (define-public guile-next
252 (deprecated-package "guile-next" guile-2.2))
254 (define (guile-variant-package-name prefix)
256 "Return NAME with PREFIX instead of \"guile-\", when applicable."
257 (if (string-prefix? "guile-" name)
258 (string-append prefix "-"
260 (string-length "guile-")))
263 (define package-for-guile-2.2
264 ;; A procedure that rewrites the dependency tree of the given package to use
265 ;; GUILE-2.2 instead of GUILE-2.0.
266 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
267 (guile-variant-package-name "guile2.2")))
269 (define package-for-guile-2.0
270 ;; Likewise, but the other way around. :-)
271 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
272 (guile-variant-package-name "guile2.0")))
274 (define-public guile-for-guile-emacs
275 (package (inherit guile-2.2)
276 (name "guile-for-guile-emacs")
277 (version "20150510.d8d9a8d")
281 (url "git://git.hcoop.net/git/bpt/guile.git")
282 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
285 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
287 (substitute-keyword-arguments `(;; Tests aren't passing for now.
288 ;; Obviously we should re-enable this!
290 ,@(package-arguments guile-2.2))
292 `(modify-phases ,phases
293 (add-after 'unpack 'autogen
295 (zero? (system* "sh" "autogen.sh"))))
296 (add-before 'autogen 'patch-/bin/sh
298 (substitute* "build-aux/git-version-gen"
299 (("#!/bin/sh") (string-append "#!" (which "sh"))))
302 `(("autoconf" ,autoconf)
303 ("automake" ,automake)
307 ("gettext" ,gettext-minimal)
308 ,@(package-native-inputs guile-2.2)))
309 ;; Same as in guile-2.0
311 (list (search-path-specification
312 (variable "GUILE_LOAD_PATH")
313 (files '("share/guile/site/2.0")))
314 (search-path-specification
315 (variable "GUILE_LOAD_COMPILED_PATH")
316 (files '("lib/guile/2.0/site-ccache"
317 "share/guile/site/2.0")))))))
319 ;; There has not been any release yet.
320 (define-public guildhall
321 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
325 (version (string-append "0-" revision "." (string-take commit 9)))
329 (url "https://github.com/ijp/guildhall.git")
331 (file-name (string-append name "-" version "-checkout"))
334 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
335 (build-system gnu-build-system)
338 (modify-phases %standard-phases
339 ;; Tests fail without this fix because they try to load the bash
340 ;; executable as a Scheme file. See bug report at
341 ;; https://github.com/ijp/guildhall/issues/22
342 (add-after 'unpack 'fix-bug-22
344 (substitute* "Makefile.am"
345 (("TESTS_ENVIRONMENT=.*")
346 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
347 TEST_EXTENSIONS = .scm
348 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
349 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
350 ;; FIXME: one of the database tests fails for unknown
351 ;; reasons. It does not fail when run outside of Guix.
352 (("tests/database.scm") ""))
354 (add-before 'configure 'autogen
356 (zero? (system* "sh" "autogen.sh")))))))
358 `(("guile" ,guile-2.0)))
360 `(("zip" ,zip) ; for tests
361 ("autoconf" ,autoconf)
362 ("automake" ,automake)
363 ("texinfo" ,texinfo)))
364 (synopsis "Package manager for Guile")
366 "Guildhall is a package manager written for Guile Scheme. A guild is
367 an association of independent craftspeople. A guildhall is where they meet.
368 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
371 On a practical level, Guildhall lets you share Scheme modules and programs
372 over the internet, and install code that has been shared by others. Guildhall
373 can handle dependencies, so when a program requires several libraries, and
374 each of those has further dependencies, all of the prerequisites for the
375 program can be installed in one go.")
376 (home-page "https://github.com/ijp/guildhall")
377 (license license:gpl3+))))
384 (define-public artanis
390 (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
394 "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
395 (patches (search-patches "artanis-fix-Makefile.in.patch"))))
396 (build-system gnu-build-system)
397 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
398 (inputs `(("guile" ,guile-2.0)))
399 (native-inputs `(("bash" ,bash) ;for the `source' builtin
400 ("pkgconfig" ,pkg-config)
401 ("util-linux" ,util-linux))) ;for the `script' command
404 ;; TODO: The documentation must be built with the `docs' target.
405 (let* ((out (assoc-ref %outputs "out"))
406 (dir (string-append out "/share/guile/site/2.0")))
407 ;; Don't use (%site-dir) for site paths.
408 (list (string-append "MOD_PATH=" dir)
409 (string-append "MOD_COMPILED_PATH=" dir)))
412 (modify-phases %standard-phases
414 'install 'substitute-root-dir
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let ((out (assoc-ref outputs "out")))
417 (substitute* "Makefile" ;ignore the execution of bash.bashrc
418 ((" /etc/bash.bashrc") " /dev/null"))
419 (substitute* "Makefile" ;set the root of config files to OUT
420 ((" /etc") (string-append " " out "/etc")))
421 (mkdir-p (string-append out "/bin")) ;for the `art' executable
423 (synopsis "Web application framework written in Guile")
424 (description "GNU Artanis is a web application framework written in Guile
425 Scheme. A web application framework (WAF) is a software framework that is
426 designed to support the development of dynamic websites, web applications, web
427 services and web resources. The framework aims to alleviate the overhead
428 associated with common activities performed in web development. Artanis
429 provides several tools for web development: database access, templating
430 frameworks, session management, URL-remapping for RESTful, page caching, and
432 (home-page "https://www.gnu.org/software/artanis/")
433 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
435 (define-public guile-reader
437 (name "guile-reader")
441 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
445 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
446 (build-system gnu-build-system)
447 (native-inputs `(("pkgconfig" ,pkg-config)
448 ("gperf" ,gperf-3.0)))
449 (inputs `(("guile" ,guile-2.2)))
450 (synopsis "Framework for building readers for GNU Guile")
452 "Guile-Reader is a simple framework for building readers for GNU Guile.
454 The idea is to make it easy to build procedures that extend Guile’s read
455 procedure. Readers supporting various syntax variants can easily be written,
456 possibly by re-using existing “token readers” of a standard Scheme
457 readers. For example, it is used to implement Skribilo’s R5RS-derived
460 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
461 hopefully more powerful and flexible (for instance, one may instantiate as
462 many readers as needed).")
463 (home-page "http://www.nongnu.org/guile-reader/")
464 (license license:gpl3+)))
466 (define-public guile2.0-reader
467 (package-for-guile-2.0 guile-reader))
468 (define-public guile2.2-reader
469 (deprecated-package "guile2.2-reader" guile-reader))
471 (define-public guile-ncurses
473 (name "guile-ncurses")
477 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
481 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
482 (build-system gnu-build-system)
483 (inputs `(("ncurses" ,ncurses)
484 ("guile" ,guile-2.2)))
485 (native-inputs `(("pkg-config" ,pkg-config)))
487 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
488 "--with-gnu-filesystem-hierarchy")
490 (modify-phases %standard-phases
491 (add-before 'build 'fix-libguile-ncurses-file-name
492 (lambda* (#:key outputs #:allow-other-keys)
493 (and (zero? (system* "make" "install"
496 (parallel-job-count))))
497 (let* ((out (assoc-ref outputs "out"))
499 (files (find-files dir ".scm")))
501 (("\"libguile-ncurses\"")
502 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
505 (home-page "https://www.gnu.org/software/guile-ncurses/")
506 (synopsis "Guile bindings to ncurses")
508 "guile-ncurses provides Guile language bindings for the ncurses
510 (license license:lgpl3+)))
518 (uri (string-append "mirror://gnu/mcron/mcron-"
522 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
523 (patches (search-patches "mcron-install.patch"))))
524 (build-system gnu-build-system)
525 (native-inputs `(("pkg-config" ,pkg-config)))
526 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
527 (home-page "https://www.gnu.org/software/mcron/")
528 (synopsis "Run jobs at scheduled times")
530 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
531 tasks on a schedule, such as every hour or every Monday. Mcron is written in
532 Guile, so its configuration can be written in Scheme; the original cron
533 format is also supported.")
534 (license license:gpl3+)))
536 (define-public mcron2
537 ;; This is mthl's mcron development branch, not yet merged in mcron.
538 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
542 (version (string-append (package-version mcron) "-0."
543 (string-take commit 7)))
547 (url "https://notabug.org/mthl/mcron/")
551 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
552 (file-name (string-append name "-" version "-checkout"))))
554 `(("autoconf" ,autoconf)
555 ("automake" ,automake)
556 ("pkg-config" ,pkg-config)
558 ("help2man" ,help2man)))
560 `(#:modules ((ice-9 match) (ice-9 ftw)
561 ,@%gnu-build-system-modules)
563 #:phases (modify-phases %standard-phases
564 (add-after 'unpack 'bootstrap
566 (zero? (system* "autoreconf" "-vfi"))))
567 (add-after 'install 'wrap-mcron
568 (lambda* (#:key outputs #:allow-other-keys)
569 ;; Wrap the 'mcron' command to refer to the right
571 (let* ((out (assoc-ref outputs "out"))
572 (bin (string-append out "/bin"))
574 out "/share/guile/site")))
575 (match (scandir site)
577 (let ((modules (string-append site "/" version)))
578 (wrap-program (string-append bin "/mcron")
579 `("GUILE_LOAD_PATH" ":" prefix
581 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
585 (define-public guile-ics
592 (url "https://github.com/artyom-poptsov/guile-ics")
594 (file-name (string-append name "-" version "-checkout"))
597 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
598 (build-system gnu-build-system)
600 '(#:phases (modify-phases %standard-phases
601 (add-before 'configure 'autoreconf
603 ;; Repository comes with a broken symlink
604 (delete-file "README")
605 (symlink "README.org" "README")
606 (zero? (system* "autoreconf" "-fi")))))))
608 `(("autoconf" ,(autoconf-wrapper))
609 ("automake" ,automake)
611 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
612 ("gettext" ,gettext-minimal)
613 ("pkg-config" ,pkg-config)))
614 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
615 (propagated-inputs `(("guile-lib" ,guile-lib)))
616 (home-page "https://github.com/artyom-poptsov/guile-ics")
617 (synopsis "Guile parser library for the iCalendar format")
619 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
620 pure Scheme. The library can be used to read and write iCalendar data.
622 The library is shipped with documentation in Info format and usage examples.")
623 (license license:gpl3+)))
625 (define-public guile-lib
631 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
635 "1qbk485djgxqrbfjvk4b7w7y4x9xygf2qb8dqnl7885kajasx8qg"))))
636 (build-system gnu-build-system)
639 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
641 (modify-phases %standard-phases
642 (add-before 'configure 'patch-module-dir
644 (substitute* "src/Makefile.in"
645 (("^moddir = ([[:graph:]]+)")
646 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
647 (("^godir = ([[:graph:]]+)")
649 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
651 (native-inputs `(("pkg-config" ,pkg-config)))
652 (inputs `(("guile" ,guile-2.0)))
653 (home-page "http://www.nongnu.org/guile-lib/")
654 (synopsis "Collection of useful Guile Scheme modules")
656 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
657 modules, allowing for people to cooperate integrating their generic Guile
658 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
661 ;; The whole is under GPLv3+, but some modules are under laxer
662 ;; distribution terms such as LGPL and public domain. See `COPYING' for
664 (license license:gpl3+)))
666 (define-public guile2.2-lib
667 (package-for-guile-2.2 guile-lib))
669 (define-public guile-json
675 (uri (string-append "mirror://savannah/guile-json/guile-json-"
679 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
680 (modules '((guix build utils)))
682 ;; Make sure everything goes under .../site/X.Y, like Guile's
683 ;; search paths expects.
685 (substitute* "configure"
687 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
688 (substitute* '("Makefile.in" "json/Makefile.in")
689 (("moddir =.*/share/guile/site" all)
690 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
691 (build-system gnu-build-system)
692 (native-inputs `(("guile" ,guile-2.0)))
693 (home-page "http://savannah.nongnu.org/projects/guile-json/")
694 (synopsis "JSON module for Guile")
696 "Guile-JSON supports parsing and building JSON documents according to the
697 specification. These are the main features:
700 @item Strictly complies to @uref{http://json.org, specification}.
701 @item Build JSON documents programmatically via macros.
702 @item Unicode support for strings.
703 @item Allows JSON pretty printing.
705 (license license:lgpl3+)))
707 (define-public guile2.2-json
708 (package-for-guile-2.2 guile-json))
710 (define-public guile-minikanren
712 (name "guile-minikanren")
713 (version "20150424.e844d85")
717 (url "https://github.com/ijp/minikanren.git")
718 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
719 (file-name (string-append name "-" version "-checkout"))
722 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
723 (build-system trivial-build-system)
725 `(#:modules ((guix build utils))
728 (use-modules (guix build utils)
733 (let* ((out (assoc-ref %outputs "out"))
734 (guile (assoc-ref %build-inputs "guile"))
735 (effective (read-line
736 (open-pipe* OPEN_READ
737 (string-append guile "/bin/guile")
738 "-c" "(display (effective-version))")))
739 (module-dir (string-append out "/share/guile/site/"
741 (source (assoc-ref %build-inputs "source"))
742 (doc (string-append out "/share/doc/guile-minikanren"))
743 (scm-files '("minikanren.scm"
744 "minikanren/mkextraforms.scm"
745 "minikanren/mkprelude.scm"
746 "minikanren/mk.scm"))
747 (guild (string-append (assoc-ref %build-inputs "guile")
749 ;; Make installation directories.
750 (mkdir-p (string-append module-dir "/minikanren"))
753 ;; Compile .scm files and install.
755 (setenv "GUILE_AUTO_COMPILE" "0")
756 (for-each (lambda (file)
757 (let* ((dest-file (string-append module-dir "/"
759 (go-file (match (string-split file #\.)
761 (string-append module-dir "/"
763 ;; Install source module.
764 (copy-file file dest-file)
765 ;; Install compiled module.
766 (unless (zero? (system* guild "compile"
770 (error (format #f "Failed to compile ~s to ~s!"
774 ;; Also copy over the README.
775 (install-file "README.org" doc)
778 `(("guile" ,guile-2.0)))
779 (home-page "https://github.com/ijp/minikanren")
780 (synopsis "MiniKanren declarative logic system, packaged for Guile")
782 "MiniKanren is a relational programming extension to the Scheme
783 programming Language, written as a smaller version of Kanren suitable for
784 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
785 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
787 This is Ian Price's r6rs packaged version of miniKanren, which deviates
788 slightly from miniKanren mainline.
790 See http://minikanren.org/ for more on miniKanren generally.")
791 (license license:expat)))
793 (define-public guile2.2-minikanren
794 (package-for-guile-2.2 guile-minikanren))
796 (define-public guile-irregex
798 (name "guile-irregex")
803 "http://synthcode.com/scheme/irregex/irregex-"
807 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
808 (build-system gnu-build-system)
810 `(#:modules ((guix build utils)
814 (guix build gnu-build-system))
816 (modify-phases %standard-phases
821 (lambda* (#:key inputs outputs #:allow-other-keys)
822 (let* ((out (assoc-ref outputs "out"))
823 (effective (read-line
824 (open-pipe* OPEN_READ
826 "(display (effective-version))")))
827 (module-dir (string-append out "/share/guile/site/"
829 (source (assoc-ref inputs "source"))
830 (doc (string-append out "/share/doc/guile-irregex/"))
831 (guild (string-append (assoc-ref %build-inputs "guile")
833 ;; Make installation directories.
834 (mkdir-p (string-append module-dir "/rx/source"))
837 ;; Compile .scm files and install.
838 (setenv "GUILE_AUTO_COMPILE" "0")
840 (for-each (lambda (copy-info)
842 ((src-file dest-file-basis)
843 (let* ((dest-file (string-append
844 module-dir dest-file-basis
846 (go-file (string-append
847 module-dir dest-file-basis
849 ;; Install source module.
852 ;; Install compiled module.
853 (unless (zero? (system* guild "compile"
857 (error (format #f "Failed to compile ~s to ~s!"
858 src-file dest-file)))))))
859 '(("irregex-guile.scm" "/rx/irregex")
860 ("irregex.scm" "/rx/source/irregex")
861 ;; Not really reachable via guile's packaging system,
862 ;; but nice to have around
863 ("irregex-utils.scm" "/rx/source/irregex-utils")))
865 ;; Also copy over the README.
866 (install-file "irregex.html" doc)
869 `(("guile" ,guile-2.0)))
870 (home-page "http://synthcode.com/scheme/irregex")
871 (synopsis "S-expression based regular expressions")
873 "Irregex is an s-expression based alternative to your classic
874 string-based regular expressions. It implements SRFI 115 and is deeply
875 inspired by the SCSH regular expression system.")
876 (license license:bsd-3)))
878 (define-public guile2.2-irregex
879 (package-for-guile-2.2 guile-irregex))
881 ;; There are two guile-gdbm packages, one using the FFI and one with
882 ;; direct C bindings, hence the verbose name.
884 (define-public guile-gdbm-ffi
886 (name "guile-gdbm-ffi")
887 (version "20120209.fa1d5b6")
891 (url "https://github.com/ijp/guile-gdbm.git")
892 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
893 (file-name (string-append name "-" version "-checkout"))
896 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
897 (build-system trivial-build-system)
903 (use-modules (guix build utils)
907 ;; Avoid warnings we can safely ignore
908 (setenv "GUILE_AUTO_COMPILE" "0")
910 (let* ((out (assoc-ref %outputs "out"))
913 (open-pipe* OPEN_READ
915 (assoc-ref %build-inputs "guile")
917 "-c" "(display (effective-version))")))
918 (module-dir (string-append out "/share/guile/site/"
920 (source (assoc-ref %build-inputs "source"))
921 (doc (string-append out "/share/doc"))
922 (guild (string-append (assoc-ref %build-inputs "guile")
925 (string-append module-dir "/gdbm.scm"))
927 (string-append module-dir "/gdbm.go"))
929 (lambda (in-file out-file)
930 (system* guild "compile" "-o" out-file in-file))))
931 ;; Make installation directories.
935 ;; Switch directory for compiling and installing
939 (copy-file "gdbm.scm" gdbm.scm-dest)
942 (substitute* gdbm.scm-dest
943 (("\\(dynamic-link \"libgdbm\"\\)")
944 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
945 (assoc-ref %build-inputs "gdbm"))))
947 ;; compile to the destination
948 (compile-file gdbm.scm-dest gdbm.go-dest)))))
950 `(("guile" ,guile-2.0)))
953 (home-page "https://github.com/ijp/guile-gdbm")
954 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
956 "Guile bindings to the GDBM key-value storage system, using
957 Guile's foreign function interface.")
958 (license license:gpl3+)))
960 (define-public guile2.2-gdbm-ffi
961 (package-for-guile-2.2 guile-gdbm-ffi))
963 (define-public guile-sqlite3
964 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
966 (name "guile-sqlite3")
967 (version (string-append "0.0-0." (string-take commit 7)))
969 ;; XXX: This used to be available read-only at
970 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
971 ;; eventually disappeared, so we have our own copy here.
972 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
980 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
981 (file-name (string-append name "-" version "-checkout"))
982 (modules '((guix build utils)))
984 ;; Upgrade 'Makefile.am' to the current way of doing things.
985 '(substitute* "Makefile.am"
986 (("TESTS_ENVIRONMENT")
987 "TEST_LOG_COMPILER")))))
989 (build-system gnu-build-system)
991 `(("autoconf" ,autoconf)
992 ("automake" ,automake)
993 ("pkg-config" ,pkg-config)))
995 `(("guile" ,guile-2.0)
998 '(#:phases (modify-phases %standard-phases
999 (add-before 'configure 'autoreconf
1001 (zero? (system* "autoreconf" "-vfi"))))
1002 (add-before 'build 'set-sqlite3-file-name
1003 (lambda* (#:key inputs #:allow-other-keys)
1004 (substitute* "sqlite3.scm"
1006 (string-append "\"" (assoc-ref inputs "sqlite")
1007 "/lib/libsqlite3\"")))
1009 (synopsis "Access SQLite databases from Guile")
1011 "This package provides Guile bindings to the SQLite database system.")
1012 (license license:gpl3+))))
1014 (define-public haunt
1020 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1024 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1025 (build-system gnu-build-system)
1027 `(#:modules ((ice-9 match) (ice-9 ftw)
1028 ,@%gnu-build-system-modules)
1029 #:tests? #f ; test suite is non-deterministic :(
1030 #:phases (modify-phases %standard-phases
1031 (add-after 'install 'wrap-haunt
1032 (lambda* (#:key outputs #:allow-other-keys)
1033 ;; Wrap the 'haunt' command to refer to the right
1035 (let* ((out (assoc-ref outputs "out"))
1036 (bin (string-append out "/bin"))
1037 (site (string-append
1038 out "/share/guile/site")))
1039 (match (scandir site)
1041 (let ((modules (string-append site "/" version)))
1042 (wrap-program (string-append bin "/haunt")
1043 `("GUILE_LOAD_PATH" ":" prefix
1045 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1049 `(("pkg-config" ,pkg-config)
1050 ("texinfo" ,texinfo)))
1052 `(("guile" ,guile-2.2)))
1054 `(("guile-reader" ,guile-reader)
1055 ("guile-commonmark" ,guile-commonmark)))
1056 (synopsis "Functional static site generator")
1057 (description "Haunt is a static site generator written in Guile
1058 Scheme. Haunt features a functional build system and an extensible
1059 interface for reading articles in any format.")
1060 (home-page "http://haunt.dthompson.us")
1061 (license license:gpl3+)))
1063 (define-public guile2.0-haunt
1064 (package-for-guile-2.0
1065 (package (inherit haunt) (name "guile2.0-haunt"))))
1066 (define-public guile2.2-haunt
1067 (deprecated-package "guile2.2-haunt" haunt))
1069 (define-public guile-config
1071 (name "guile-config")
1076 "http://alex.pompo.co/software/" name "-" version
1080 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1081 (build-system gnu-build-system)
1083 `(("guile" ,guile-2.0)))
1084 (synopsis "Guile application configuration parsing library")
1086 "Guile Config is a library providing a declarative approach to
1087 application configuration specification. The library provides clean
1088 configuration declaration forms, and processors that take care of:
1089 configuration file creation; configuration file parsing; command-line
1090 parameter parsing using getopt-long; basic GNU command-line parameter
1091 generation (--help, --usage, --version); automatic output generation for the
1092 above command-line parameters.")
1093 (home-page "https://github.com/a-sassmannshausen/guile-config")
1094 (license license:agpl3+)))
1096 (define-public guile-redis
1098 (name "guile-redis")
1102 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1106 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1107 (modules '((guix build utils)))
1109 ;; Make sure everything goes under .../site/X.Y, like Guile's
1110 ;; search paths expects.
1112 (substitute* "configure"
1113 (("ac_subst_vars='")
1114 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1115 (substitute* '("Makefile.in"
1117 "redis/commands/Makefile.in")
1118 (("moddir =.*/share/guile/site" all)
1119 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1120 (build-system gnu-build-system)
1122 `(("guile" ,guile-2.0)))
1123 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1124 (synopsis "Redis client library for Guile")
1125 (description "Guile-redis provides a Scheme interface to the Redis
1126 key-value cache and store.")
1127 (license license:lgpl3+)))
1129 (define-public guile2.2-redis
1130 (package-for-guile-2.2 guile-redis))
1132 (define-public guile-wisp
1138 (uri (string-append "https://bitbucket.org/ArneBab/"
1139 "wisp/downloads/wisp-"
1143 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1144 (build-system gnu-build-system)
1146 `(#:modules ((system base compile)
1147 ,@%gnu-build-system-modules)
1149 (modify-phases %standard-phases
1151 'configure 'substitute-before-config
1153 (lambda* (#:key inputs #:allow-other-keys)
1154 (let ((bash (assoc-ref inputs "bash")))
1155 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1156 (substitute* "configure"
1157 (("guile-2.0") "guile"))
1158 ;; Puts together some test files with /bin/bash hardcoded
1159 (substitute* "Makefile.in"
1161 (string-append bash "/bin/bash") ))
1164 ;; auto compilation breaks, but if we set HOME to /tmp,
1167 'check 'auto-compile-hacky-workaround
1169 (setenv "HOME" "/tmp")
1173 (lambda* (#:key outputs inputs #:allow-other-keys)
1174 (let* ((out (assoc-ref outputs "out"))
1175 (module-dir (string-append out "/share/guile/site/2.0"))
1177 (string-append module-dir "/language/wisp"))
1178 (guild (string-append (assoc-ref inputs "guile")
1180 ;; Make installation directories.
1181 (mkdir-p module-dir)
1182 (mkdir-p language-dir)
1185 (copy-file "wisp-scheme.scm"
1186 (string-append module-dir "/wisp-scheme.scm"))
1187 (copy-file "language/wisp/spec.scm"
1188 (string-append language-dir "/spec.scm"))
1190 ;; compile to the destination
1191 (compile-file "wisp-scheme.scm"
1192 #:output-file (string-append
1193 module-dir "/wisp-scheme.go"))
1194 (compile-file "language/wisp/spec.scm"
1195 #:output-file (string-append
1196 language-dir "/spec.go"))
1198 (home-page "http://draketo.de/english/wisp")
1200 `(("guile" ,guile-2.0)
1201 ("python" ,python)))
1202 (synopsis "Whitespace to lisp syntax for Guile")
1203 (description "Wisp is a syntax for Guile which provides a Python-like
1204 whitespace-significant language. It may be easier on the eyes for some
1205 users and in some situations.")
1206 (license license:gpl3+)))
1208 (define-public guile-sly
1214 (uri (string-append "https://files.dthompson.us/sly/sly-"
1218 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1219 (build-system gnu-build-system)
1222 (list (string-append "--with-libfreeimage-prefix="
1223 (assoc-ref %build-inputs "freeimage"))
1224 (string-append "--with-libgslcblas-prefix="
1225 (assoc-ref %build-inputs "gsl")))))
1227 `(("pkg-config" ,pkg-config)))
1229 `(("guile" ,guile-2.0)
1230 ("guile-sdl" ,guile-sdl)
1231 ("guile-opengl" ,guile-opengl)))
1234 ("freeimage" ,freeimage)
1236 (synopsis "2D/3D game engine for GNU Guile")
1237 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1238 features a functional reactive programming interface and live coding
1240 (home-page "http://dthompson.us/pages/software/sly.html")
1241 (license license:gpl3+)))
1243 (define-public g-wrap
1249 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1253 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1254 (build-system gnu-build-system)
1256 `(("pkg-config" ,pkg-config)))
1258 `(("guile" ,guile-2.0)
1259 ("guile-lib" ,guile-lib)))
1261 `(("libffi" ,libffi)))
1264 (modify-phases %standard-phases
1265 (add-before 'configure 'pre-configure
1266 (lambda* (#:key outputs #:allow-other-keys)
1267 (let ((out (assoc-ref outputs "out")))
1268 (substitute* (find-files "." "^Makefile.in$")
1269 (("guilemoduledir =.*guile/site" all)
1270 (string-append all "/2.0")))
1272 (synopsis "Generate C bindings for Guile")
1273 (description "G-Wrap is a tool and Guile library for generating function
1274 wrappers for inter-language calls. It currently only supports generating Guile
1275 wrappers for C functions. Given a definition of the types and prototypes for
1276 a given C interface, G-Wrap will automatically generate the C code that
1277 provides access to that interface and its types from the Scheme level.")
1278 (home-page "http://www.nongnu.org/g-wrap/index.html")
1279 (license license:lgpl2.1+)))
1281 (define-public guile-dbi
1288 "http://download.gna.org/guile-dbi/guile-dbi-"
1292 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1293 (build-system gnu-build-system)
1296 (list (string-append
1297 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1299 (modify-phases %standard-phases
1300 (add-after 'install 'patch-extension-path
1301 (lambda* (#:key outputs #:allow-other-keys)
1302 (let* ((out (assoc-ref outputs "out"))
1303 (dbi.scm (string-append
1304 out "/share/guile/site/2.0/dbi/dbi.scm"))
1305 (ext (string-append out "/lib/libguile-dbi")))
1306 (substitute* dbi.scm (("libguile-dbi") ext))
1309 `(("guile" ,guile-2.0)))
1310 (synopsis "Guile database abstraction layer")
1311 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1313 "guile-dbi is a library for Guile that provides a convenient interface to
1314 SQL databases. Database programming with guile-dbi is generic in that the same
1315 programming interface is presented regardless of which database system is used.
1316 It currently supports MySQL, Postgres and SQLite3.")
1317 (license license:gpl2+)))
1319 (define-public guile-dbd-sqlite3
1321 (name "guile-dbd-sqlite3")
1326 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1330 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1331 (build-system gnu-build-system)
1333 `(("pkg-config" ,pkg-config)))
1335 `(("sqlite" ,sqlite)
1336 ("zlib" ,(@ (gnu packages compression) zlib))))
1338 `(("guile-dbi" ,guile-dbi)))
1339 (synopsis "Guile DBI driver for SQLite")
1340 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1342 "guile-dbi is a library for Guile that provides a convenient interface to
1343 SQL databases. This package implements the interface for SQLite.")
1344 (license license:gpl2+)))
1346 (define-public guile-xosd
1352 (uri (string-append "https://github.com/alezost/" name
1353 "/releases/download/v" version
1354 "/" name "-" version ".tar.gz"))
1357 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1358 (build-system gnu-build-system)
1360 `(("pkg-config" ,pkg-config)))
1362 `(("guile" ,guile-2.2)
1364 ("libxext" ,libxext)
1365 ("libxinerama" ,libxinerama)
1367 (home-page "https://github.com/alezost/guile-xosd")
1368 (synopsis "XOSD bindings for Guile")
1370 "Guile-XOSD provides Guile bindings for @code{libxosd},
1371 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1373 (license license:gpl3+)))
1375 (define-public guile-daemon
1377 (name "guile-daemon")
1381 (uri (string-append "https://github.com/alezost/" name
1382 "/releases/download/v" version
1383 "/" name "-" version ".tar.gz"))
1386 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1387 (build-system gnu-build-system)
1389 `(("pkg-config" ,pkg-config)))
1391 `(("guile" ,guile-2.2)))
1392 (home-page "https://github.com/alezost/guile-daemon")
1393 (synopsis "Evaluate code in a running Guile process")
1395 "Guile-Daemon is a small Guile program that loads your initial
1396 configuration file, and then reads and evaluates Guile expressions that
1397 you send to a FIFO file.")
1398 (license license:gpl3+)))
1400 (define-public guile-commonmark
1402 (name "guile-commonmark")
1406 (uri (string-append "https://github.com/OrangeShark/" name
1407 "/releases/download/v" version
1408 "/" name "-" version ".tar.gz"))
1411 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1412 (modules '((guix build utils)))
1414 ;; Use the real effective version of Guile in directory names
1415 ;; instead of a hard-coded "/2.0".
1417 (substitute* "configure"
1418 (("ac_subst_vars='")
1419 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1420 (substitute* "Makefile.in"
1422 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1423 (build-system gnu-build-system)
1425 `(("guile" ,guile-2.2)))
1426 (synopsis "CommonMark parser for Guile")
1428 "guile-commonmark is a library for parsing CommonMark, a fully specified
1429 variant of Markdown. The library is written in Guile Scheme and is designed
1430 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1431 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1432 is no support for parsing block and inline level HTML.")
1433 (home-page "https://github.com/OrangeShark/guile-commonmark")
1434 (license license:lgpl3+)))
1436 (define-public guile2.0-commonmark
1437 (package-for-guile-2.0 guile-commonmark))
1438 (define-public guile2.2-commonmark
1439 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1441 (define-public guile-bytestructures
1443 (name "guile-bytestructures")
1444 (version "20160726.53127f6")
1448 (url "https://github.com/TaylanUB/scheme-bytestructures")
1449 (commit "53127f608caf64b34fa41c389b2743b546fbe9da")))
1450 (file-name (string-append name "-" version "-checkout"))
1453 "0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq"))))
1454 (build-system trivial-build-system)
1456 `(#:modules ((guix build utils))
1459 (use-modules (guix build utils)
1463 (let* ((out (assoc-ref %outputs "out"))
1464 (guile (assoc-ref %build-inputs "guile"))
1465 (effective (read-line
1466 (open-pipe* OPEN_READ
1467 (string-append guile "/bin/guile")
1468 "-c" "(display (effective-version))")))
1469 (module-dir (string-append out "/share/guile/site/"
1471 (source (assoc-ref %build-inputs "source"))
1472 (doc (string-append out "/share/doc/scheme-bytestructures"))
1473 (scm-files (filter (lambda (path)
1474 (not (string-prefix? "bytestructures/r7" path)))
1475 (with-directory-excursion source
1476 (find-files "bytestructures" "\\.scm$"))))
1477 (guild (string-append (assoc-ref %build-inputs "guile")
1479 ;; Make installation directories.
1482 ;; Compile .scm files and install.
1484 (setenv "GUILE_AUTO_COMPILE" "0")
1485 (for-each (lambda (file)
1486 (let* ((dest-file (string-append module-dir "/"
1488 (go-file (string-append module-dir "/"
1490 (string-rindex file #\.))
1492 ;; Install source module.
1493 (mkdir-p (dirname dest-file))
1494 (copy-file file dest-file)
1496 ;; Install compiled module.
1497 (mkdir-p (dirname go-file))
1498 (unless (zero? (system* guild "compile"
1502 (error (format #f "Failed to compile ~s to ~s!"
1506 ;; Also copy over the README.
1507 (install-file "README.md" doc)
1510 `(("guile" ,guile-2.2)))
1511 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1512 (synopsis "Structured access to bytevector contents for Guile")
1514 "Guile bytestructures offers a system imitating the type system
1515 of the C programming language, to be used on bytevectors. C's type
1516 system works on raw memory, and Guile works on bytevectors which are
1517 an abstraction over raw memory. It's also more powerful than the C
1518 type system, elevating types to first-class status.")
1519 (license license:gpl3+)))
1521 (define-public guile-aspell
1523 (name "guile-aspell")
1528 "http://lonelycactus.com/tarball/guile_aspell-"
1532 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1533 (build-system gnu-build-system)
1535 '(#:phases (modify-phases %standard-phases
1536 (add-before 'configure 'set-guilesitedir
1538 (substitute* "Makefile.in"
1539 (("^guilesitedir =.*$")
1541 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1543 (add-before 'build 'set-libaspell-file-name
1544 (lambda* (#:key inputs #:allow-other-keys)
1545 (let ((aspell (assoc-ref inputs "aspell")))
1546 (substitute* "aspell.scm"
1547 (("\"libaspell\\.so\"")
1548 (string-append "\"" aspell
1549 "/lib/libaspell\"")))
1551 (native-inputs `(("pkg-config" ,pkg-config)))
1552 (inputs `(("guile" ,guile-2.2)
1553 ("aspell" ,aspell)))
1554 (home-page "https://github.com/spk121/guile-aspell")
1555 (synopsis "Spell-checking from Guile")
1557 "guile-aspell is a Guile Scheme library for comparing a string against a
1558 dictionary and suggesting spelling corrections.")
1559 (license license:gpl3+)))
1561 (define-public guile-bash
1562 ;; This project is currently retired. It was initially announced here:
1563 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1564 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1568 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1570 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1578 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1579 (file-name (string-append name "-" version "-checkout"))))
1580 (build-system gnu-build-system)
1582 '(#:phases (modify-phases %standard-phases
1583 (add-after 'unpack 'bootstrap
1585 (zero? (system* "sh" "bootstrap")))))
1588 ;; Add -I to match 'bash.pc' of Bash 4.4.
1589 (list (string-append "CPPFLAGS=-I"
1590 (assoc-ref %build-inputs "bash:include")
1591 "/include/bash/include")
1593 ;; The '.a' file is useless.
1596 ;; Install 'lib/bash' as Bash 4.4 expects.
1597 (string-append "--libdir=" (assoc-ref %outputs "out")
1599 (native-inputs `(("pkg-config" ,pkg-config)
1600 ("autoconf" ,(autoconf-wrapper))
1601 ("automake" ,automake)
1602 ("libtool" ,libtool)
1603 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1604 ("gettext" ,gettext-minimal)))
1605 (inputs `(("guile" ,guile-2.0)
1606 ("bash:include" ,bash "include")))
1607 (synopsis "Extend Bash using Guile")
1609 "Guile-Bash provides a shared library and set of Guile modules,
1610 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1611 the following aspects of Bash:
1615 @item setting and getting Bash variables;
1616 @item creating dynamic variables;
1617 @item creating Bash functions with a Scheme implementation;
1618 @item reader macro for output capturing;
1619 @item reader macro for evaluating raw Bash commands.
1625 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1628 and then run @command{scm example.scm}.")
1629 (license license:gpl3+))))
1631 (define-public guile-8sync
1633 (name "guile-8sync")
1637 (uri (string-append "mirror://gnu/8sync/8sync-" version
1641 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1642 (build-system gnu-build-system)
1643 (native-inputs `(("autoconf" ,autoconf)
1644 ("automake" ,automake)
1645 ("guile" ,guile-2.2)
1646 ("pkg-config" ,pkg-config)
1647 ("texinfo" ,texinfo)))
1649 `(#:phases (modify-phases %standard-phases
1650 (add-before 'configure 'setenv
1653 (setenv "GUILE_AUTO_COMPILE" "0")
1655 (home-page "https://gnu.org/s/8sync/")
1656 (synopsis "Asynchronous actor model library for Guile")
1658 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1659 library for GNU Guile based on the actor model.
1661 Note that 8sync is only available for Guile 2.2.")
1662 (license license:lgpl3+)))
1664 (define-public guile-fibers
1666 (name "guile-fibers")
1670 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1674 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1675 (build-system gnu-build-system)
1677 `(("texinfo" ,texinfo)
1678 ("pkg-config" ,pkg-config)))
1680 `(("guile" ,guile-2.2)))
1681 (synopsis "Lightweight concurrency facility for Guile")
1683 "Fibers is a Guile library that implements a a lightweight concurrency
1684 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1685 like a \"goroutine\" from the Go language: a lightweight thread-like
1686 abstraction. Systems built with Fibers can scale up to millions of concurrent
1687 fibers, tens of thousands of concurrent socket connections, and many parallel
1688 cores. The Fibers library also provides Concurrent ML-like channels for
1689 communication between fibers.
1691 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1692 is not available for Guile 2.0.")
1693 (home-page "https://github.com/wingo/fibers")
1694 (license license:lgpl3+)))
1696 (define-public guile-git
1697 (let ((revision "1")
1698 (commit "96dfb3bdba39a37cf6aefb18e335118a6115f963"))
1701 (version (string-append "0.0-" revision "." (string-take commit 7)))
1702 (home-page "https://gitlab.com/amirouche/guile-git")
1705 (uri (git-reference (url home-page) (commit commit)))
1708 "0v73251kmh1vs7gp3jh4pk4rikl4d8illwi0gnhwa55ij1mn9apl"))
1709 (file-name (git-file-name name version))))
1710 (build-system gnu-build-system)
1712 '(#:phases (modify-phases %standard-phases
1713 (add-after 'unpack 'bootstrap
1715 ;; Install .go files to "site-ccache", not "ccache".
1716 (substitute* "Makefile.am"
1720 (zero? (system* "autoreconf" "-vfi")))))))
1722 `(("autoconf" ,autoconf)
1723 ("automake" ,automake)
1724 ("pkg-config" ,pkg-config)))
1726 `(("guile" ,guile-2.2)
1727 ("libgit2" ,libgit2)))
1729 `(("guile-bytestructures" ,guile-bytestructures)))
1730 (synopsis "Guile bindings for libgit2")
1732 "This package provides Guile bindings to libgit2, a library to
1733 manipulate repositories of the Git version control system.")
1734 (license license:gpl3+))))
1736 (define-public guile-syntax-highlight
1737 (let ((commit "a047675e66861b647426372aa2ba7820f749616d")
1740 (name "guile-syntax-highlight")
1741 (version (string-append "0.0." revision "."
1742 (string-take commit 7)))
1746 (url "git://dthompson.us/guile-syntax-highlight.git")
1750 "1zjr6sg3n7xbdsliy45i39dqanxvcms58ayx36wxrz72zpq58vq3"))))
1751 (build-system gnu-build-system)
1753 '(#:phases (modify-phases %standard-phases
1754 (add-after 'unpack 'bootstrap
1756 (zero? (system* "sh" "bootstrap")))))))
1758 `(("autoconf" ,autoconf)
1759 ("automake" ,automake)
1760 ("pkg-config" ,pkg-config)))
1762 `(("guile" ,guile-2.2)))
1763 (synopsis "General-purpose syntax highlighter for GNU Guile")
1764 (description "Guile-syntax-highlight is a general-purpose syntax
1765 highlighting library for GNU Guile. It can parse code written in various
1766 programming languages into a simple s-expression that can be converted to
1767 HTML (via SXML) or any other format for rendering.")
1768 (home-page "http://dthompson.us/software/guile-syntax-highlight")
1769 (license license:lgpl3+))))
1771 ;;; guile.scm ends here