1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
5 ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
6 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
8 ;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
10 ;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
11 ;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
12 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
13 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
14 ;;; Copyright © 2017 David Thompson <davet@gnu.org>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages guile)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages admin) ;;for tree
37 #:use-module (gnu packages aspell)
38 #:use-module (gnu packages bash)
39 #:use-module (gnu packages bdw-gc)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages gawk)
42 #:use-module (gnu packages gperf)
43 #:use-module (gnu packages libffi)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages libunistring)
47 #:use-module (gnu packages linux)
48 #:use-module (gnu packages m4)
49 #:use-module (gnu packages multiprecision)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages readline)
52 #:use-module (gnu packages ncurses)
53 #:use-module (gnu packages ed)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages texinfo)
56 #:use-module (gnu packages man)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages databases)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages gl)
61 #:use-module (gnu packages sdl)
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages image)
64 #:use-module (gnu packages version-control)
65 #:use-module (gnu packages xdisorg)
66 #:use-module (gnu packages xorg)
67 #:use-module (guix packages)
68 #:use-module (guix download)
69 #:use-module (guix git-download)
70 #:use-module (guix build-system gnu)
71 #:use-module (guix build-system trivial)
72 #:use-module (guix utils)
73 #:use-module (ice-9 match))
77 ;;; GNU Guile, and modules and extensions.
81 (define-public guile-1.8
87 (uri (string-append "mirror://gnu/guile/guile-" version
91 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
92 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
93 (build-system gnu-build-system)
94 (arguments '(#:configure-flags '("--disable-error-on-warning")
96 ;; Insert a phase before `configure' to patch things up.
97 #:phases (alist-cons-before
100 (lambda* (#:key outputs #:allow-other-keys)
101 ;; Add a call to `lt_dladdsearchdir' so that
102 ;; `libguile-readline.so' & co. are in the
103 ;; loader's search path.
104 (substitute* "libguile/dynl.c"
105 (("lt_dlinit.*$" match)
107 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
109 (assoc-ref outputs "out"))))
111 ;; The usual /bin/sh...
112 (substitute* "ice-9/popen.scm"
113 (("/bin/sh") (which "sh"))))
115 (inputs `(("gawk" ,gawk)
116 ("readline" ,readline)))
118 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
120 (propagated-inputs `(("gmp" ,gmp)
121 ("libltdl" ,libltdl)))
123 ;; When cross-compiling, a native version of Guile itself is needed.
124 (self-native-input? #t)
127 (list (search-path-specification
128 (variable "GUILE_LOAD_PATH")
129 (files '("share/guile/site")))))
131 (synopsis "Scheme implementation intended especially for extensions")
133 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
134 official extension language of the GNU system. It is an implementation of
135 the Scheme language which can be easily embedded in other applications to
136 provide a convenient means of extending the functionality of the application
137 without requiring the source code to be rewritten.")
138 (home-page "https://www.gnu.org/software/guile/")
139 (license license:lgpl2.0+)))
141 (define-public guile-2.0
147 (uri (string-append "mirror://gnu/guile/guile-" version
151 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
152 (build-system gnu-build-system)
153 (native-inputs `(("pkgconfig" ,pkg-config)))
154 (inputs `(("libffi" ,libffi)
155 ("readline" ,readline)
156 ,@(libiconv-if-needed)
157 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
159 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
160 ;; reads `-lltdl -lunistring', adding them here will add the needed
161 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
162 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
163 ("libunistring" ,libunistring)
165 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
166 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
169 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
170 ;; must be propagated.
174 (self-native-input? #t)
176 (outputs '("out" "debug"))
179 `(#:configure-flags '("--disable-static") ;saves 3MiB
180 #:phases (alist-cons-before
181 'configure 'pre-configure
182 (lambda* (#:key inputs #:allow-other-keys)
183 ;; Tell (ice-9 popen) the file name of Bash.
184 (let ((bash (assoc-ref inputs "bash")))
185 (substitute* "module/ice-9/popen.scm"
186 ;; If bash is #f allow fallback for user to provide
187 ;; "bash" in PATH. This happens when cross-building to
188 ;; MinGW for which we do not have Bash yet.
190 ,@(if (target-mingw?)
192 (string-append bash "/bin/bash")
194 '((string-append bash "/bin/bash")))))))
198 (list (search-path-specification
199 (variable "GUILE_LOAD_PATH")
200 (files '("share/guile/site/2.0")))
201 (search-path-specification
202 (variable "GUILE_LOAD_COMPILED_PATH")
203 (files '("lib/guile/2.0/site-ccache"
204 "share/guile/site/2.0")))))
206 (synopsis "Scheme implementation intended especially for extensions")
208 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
209 official extension language of the GNU system. It is an implementation of
210 the Scheme language which can be easily embedded in other applications to
211 provide a convenient means of extending the functionality of the application
212 without requiring the source code to be rewritten.")
213 (home-page "https://www.gnu.org/software/guile/")
214 (license license:lgpl3+)))
216 (define-public guile-2.0/fixed
217 ;; A package of Guile 2.0 that's rarely changed. It is the one used
218 ;; in the `base' module, and thus changing it entails a full rebuild.
221 (properties '((hidden? . #t))))) ;people should install 'guile-2.0'
223 (define-public guile-2.2
224 (package (inherit guile-2.0)
229 (uri (string-append "mirror://gnu/guile/guile-" version
233 "1dnh75h4rkx1zflpsngznkwcd6afn6zrc5x3xq7n946pm5bnx5bq"))
234 (modules '((guix build utils)))
236 ;; Remove the pre-built object files. Instead, build everything
237 ;; from source, at the expense of significantly longer build
238 ;; times (almost 3 hours on a 4-core Intel i5).
239 (snippet '(for-each delete-file
240 (find-files "prebuilt" "\\.go$")))))
241 (properties '((timeout . 72000) ;20 hours
242 (max-silent-time . 36000))) ;10 hours (needed on ARM
243 ; when heavily loaded)
245 (list (search-path-specification
246 (variable "GUILE_LOAD_PATH")
247 (files '("share/guile/site/2.2")))
248 (search-path-specification
249 (variable "GUILE_LOAD_COMPILED_PATH")
250 (files '("lib/guile/2.2/site-ccache"
251 "share/guile/site/2.2")))))))
253 (define-public guile-next
254 (deprecated-package "guile-next" guile-2.2))
256 (define (guile-variant-package-name prefix)
258 "Return NAME with PREFIX instead of \"guile-\", when applicable."
259 (if (string-prefix? "guile-" name)
260 (string-append prefix "-"
262 (string-length "guile-")))
265 (define package-for-guile-2.2
266 ;; A procedure that rewrites the dependency tree of the given package to use
267 ;; GUILE-2.2 instead of GUILE-2.0.
268 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
269 (guile-variant-package-name "guile2.2")))
271 (define package-for-guile-2.0
272 ;; Likewise, but the other way around. :-)
273 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
274 (guile-variant-package-name "guile2.0")))
276 (define-public guile-for-guile-emacs
277 (package (inherit guile-2.2)
278 (name "guile-for-guile-emacs")
279 (version "20150510.d8d9a8d")
283 (url "git://git.hcoop.net/git/bpt/guile.git")
284 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
287 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
289 (substitute-keyword-arguments `(;; Tests aren't passing for now.
290 ;; Obviously we should re-enable this!
292 ,@(package-arguments guile-2.2))
294 `(modify-phases ,phases
295 (add-after 'unpack 'autogen
297 (zero? (system* "sh" "autogen.sh"))))
298 (add-before 'autogen 'patch-/bin/sh
300 (substitute* "build-aux/git-version-gen"
301 (("#!/bin/sh") (string-append "#!" (which "sh"))))
304 `(("autoconf" ,autoconf)
305 ("automake" ,automake)
309 ("gettext" ,gettext-minimal)
310 ,@(package-native-inputs guile-2.2)))
311 ;; Same as in guile-2.0
313 (list (search-path-specification
314 (variable "GUILE_LOAD_PATH")
315 (files '("share/guile/site/2.0")))
316 (search-path-specification
317 (variable "GUILE_LOAD_COMPILED_PATH")
318 (files '("lib/guile/2.0/site-ccache"
319 "share/guile/site/2.0")))))))
321 ;; There has not been any release yet.
322 (define-public guildhall
323 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
327 (version (string-append "0-" revision "." (string-take commit 9)))
331 (url "https://github.com/ijp/guildhall.git")
333 (file-name (string-append name "-" version "-checkout"))
336 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
337 (build-system gnu-build-system)
340 (modify-phases %standard-phases
341 ;; Tests fail without this fix because they try to load the bash
342 ;; executable as a Scheme file. See bug report at
343 ;; https://github.com/ijp/guildhall/issues/22
344 (add-after 'unpack 'fix-bug-22
346 (substitute* "Makefile.am"
347 (("TESTS_ENVIRONMENT=.*")
348 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
349 TEST_EXTENSIONS = .scm
350 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
351 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
352 ;; FIXME: one of the database tests fails for unknown
353 ;; reasons. It does not fail when run outside of Guix.
354 (("tests/database.scm") ""))
356 (add-before 'configure 'autogen
358 (zero? (system* "sh" "autogen.sh")))))))
360 `(("guile" ,guile-2.0)))
362 `(("zip" ,zip) ; for tests
363 ("autoconf" ,autoconf)
364 ("automake" ,automake)
365 ("texinfo" ,texinfo)))
366 (synopsis "Package manager for Guile")
368 "Guildhall is a package manager written for Guile Scheme. A guild is
369 an association of independent craftspeople. A guildhall is where they meet.
370 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
373 On a practical level, Guildhall lets you share Scheme modules and programs
374 over the internet, and install code that has been shared by others. Guildhall
375 can handle dependencies, so when a program requires several libraries, and
376 each of those has further dependencies, all of the prerequisites for the
377 program can be installed in one go.")
378 (home-page "https://github.com/ijp/guildhall")
379 (license license:gpl3+))))
386 (define-public artanis
387 (let ((release "0.2.1")
391 (version (if (zero? revision)
393 (string-append release "-"
394 (number->string revision))))
397 (uri (string-append "mirror://gnu/artanis/artanis-"
399 (file-name (string-append name "-" version ".tar.gz"))
402 "041ajcg2pz918kd9iqcj4inpzddc3impvz3r2nhlpbv8zrz011hn"))
403 (modules '((guix build utils)))
406 (delete-file-recursively "artanis/third-party/json.scm")
407 (delete-file-recursively "artanis/third-party/json")
408 (substitute* '("artanis/artanis.scm"
410 (("(#:use-module \\()artanis third-party (json\\))" _
412 (string-append use-module json)))
413 (substitute* "artanis/oht.scm"
414 (("([[:punct:][:space:]]+)(->json-string)([[:punct:][:space:]]+)"
415 _ pre json-string post)
419 (substitute* "artanis/artanis.scm"
420 (("[[:punct:][:space:]]+->json-string[[:punct:][:space:]]+")
422 (build-system gnu-build-system)
423 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
424 (inputs `(("guile" ,guile-2.2)
425 ("guile-json" ,guile-json)))
426 (native-inputs `(("bash" ,bash) ;for the `source' builtin
427 ("pkgconfig" ,pkg-config)
428 ("util-linux" ,util-linux))) ;for the `script' command
431 ;; TODO: The documentation must be built with the `docs' target.
432 (let* ((out (assoc-ref %outputs "out"))
433 (scm (string-append out "/share/guile/site/2.2"))
434 (go (string-append out "/lib/guile/2.2/site-ccache")))
435 ;; Don't use (%site-dir) for site paths.
436 (list (string-append "MOD_PATH=" scm)
437 (string-append "MOD_COMPILED_PATH=" go)))
440 (modify-phases %standard-phases
441 (add-before 'install 'substitute-root-dir
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let ((out (assoc-ref outputs "out")))
444 (substitute* "Makefile" ;ignore the execution of bash.bashrc
445 ((" /etc/bash.bashrc") " /dev/null"))
446 (substitute* "Makefile" ;set the root of config files to OUT
447 ((" /etc") (string-append " " out "/etc")))
448 (mkdir-p (string-append out "/bin")) ;for the `art' executable
450 (add-after 'install 'wrap-art
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let* ((out (assoc-ref outputs "out"))
453 (bin (string-append out "/bin"))
454 (scm (string-append out "/share/guile/site/2.2"))
455 (go (string-append out "/lib/guile/2.2/site-ccache")))
456 (wrap-program (string-append bin "/art")
457 `("GUILE_LOAD_PATH" ":" prefix (,scm))
458 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,go)))
460 (synopsis "Web application framework written in Guile")
461 (description "GNU Artanis is a web application framework written in Guile
462 Scheme. A web application framework (WAF) is a software framework that is
463 designed to support the development of dynamic websites, web applications, web
464 services and web resources. The framework aims to alleviate the overhead
465 associated with common activities performed in web development. Artanis
466 provides several tools for web development: database access, templating
467 frameworks, session management, URL-remapping for RESTful, page caching, and
469 (home-page "https://www.gnu.org/software/artanis/")
470 (license (list license:gpl3+ license:lgpl3+))))) ;dual license
472 (define-public guile-reader
474 (name "guile-reader")
478 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
482 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
483 (build-system gnu-build-system)
484 (native-inputs `(("pkgconfig" ,pkg-config)
485 ("gperf" ,gperf-3.0)))
486 (inputs `(("guile" ,guile-2.2)))
487 (synopsis "Framework for building readers for GNU Guile")
489 "Guile-Reader is a simple framework for building readers for GNU Guile.
491 The idea is to make it easy to build procedures that extend Guile’s read
492 procedure. Readers supporting various syntax variants can easily be written,
493 possibly by re-using existing “token readers” of a standard Scheme
494 readers. For example, it is used to implement Skribilo’s R5RS-derived
497 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
498 hopefully more powerful and flexible (for instance, one may instantiate as
499 many readers as needed).")
500 (home-page "http://www.nongnu.org/guile-reader/")
501 (license license:gpl3+)))
503 (define-public guile2.0-reader
504 (package-for-guile-2.0 guile-reader))
505 (define-public guile2.2-reader
506 (deprecated-package "guile2.2-reader" guile-reader))
508 (define-public guile-ncurses
510 (name "guile-ncurses")
514 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
518 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
519 (build-system gnu-build-system)
520 (inputs `(("ncurses" ,ncurses)
521 ("guile" ,guile-2.2)))
522 (native-inputs `(("pkg-config" ,pkg-config)))
524 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
525 "--with-gnu-filesystem-hierarchy")
527 (modify-phases %standard-phases
528 (add-before 'build 'fix-libguile-ncurses-file-name
529 (lambda* (#:key outputs #:allow-other-keys)
530 (and (zero? (system* "make" "install"
533 (parallel-job-count))))
534 (let* ((out (assoc-ref outputs "out"))
536 (files (find-files dir ".scm")))
538 (("\"libguile-ncurses\"")
539 (format #f "\"~a/lib/guile/2.2/libguile-ncurses\""
542 (home-page "https://www.gnu.org/software/guile-ncurses/")
543 (synopsis "Guile bindings to ncurses")
545 "guile-ncurses provides Guile language bindings for the ncurses
547 (license license:lgpl3+)))
549 (define-public guile-ncurses/gpm
551 (inherit guile-ncurses)
552 (name "guile-ncurses-with-gpm")
553 (inputs `(("ncurses" ,ncurses/gpm)
554 ("guile" ,guile-2.2)))))
562 (uri (string-append "mirror://gnu/mcron/mcron-"
566 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
567 (patches (search-patches "mcron-install.patch"))))
568 (build-system gnu-build-system)
569 (native-inputs `(("pkg-config" ,pkg-config)))
570 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
571 (home-page "https://www.gnu.org/software/mcron/")
572 (synopsis "Run jobs at scheduled times")
574 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
575 tasks on a schedule, such as every hour or every Monday. Mcron is written in
576 Guile, so its configuration can be written in Scheme; the original cron
577 format is also supported.")
578 (license license:gpl3+)))
580 (define-public mcron2
581 ;; This is mthl's mcron development branch, not yet merged in mcron.
582 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
586 (version (string-append (package-version mcron) "-0."
587 (string-take commit 7)))
591 (url "https://notabug.org/mthl/mcron/")
595 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
596 (file-name (string-append name "-" version "-checkout"))))
598 `(("autoconf" ,autoconf)
599 ("automake" ,automake)
600 ("pkg-config" ,pkg-config)
602 ("help2man" ,help2man)))
604 `(#:modules ((ice-9 match) (ice-9 ftw)
605 ,@%gnu-build-system-modules)
607 #:phases (modify-phases %standard-phases
608 (add-after 'unpack 'bootstrap
610 (zero? (system* "autoreconf" "-vfi"))))
611 (add-after 'install 'wrap-mcron
612 (lambda* (#:key outputs #:allow-other-keys)
613 ;; Wrap the 'mcron' command to refer to the right
615 (let* ((out (assoc-ref outputs "out"))
616 (bin (string-append out "/bin"))
618 out "/share/guile/site")))
619 (match (scandir site)
621 (let ((modules (string-append site "/" version)))
622 (wrap-program (string-append bin "/mcron")
623 `("GUILE_LOAD_PATH" ":" prefix
625 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
629 (define-public guile-ics
636 (url "https://github.com/artyom-poptsov/guile-ics")
638 (file-name (string-append name "-" version "-checkout"))
641 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
642 (build-system gnu-build-system)
644 '(#:phases (modify-phases %standard-phases
645 (add-before 'configure 'autoreconf
647 ;; Repository comes with a broken symlink
648 (delete-file "README")
649 (symlink "README.org" "README")
650 (zero? (system* "autoreconf" "-fi")))))))
652 `(("autoconf" ,(autoconf-wrapper))
653 ("automake" ,automake)
655 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
656 ("gettext" ,gettext-minimal)
657 ("pkg-config" ,pkg-config)))
658 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
659 (propagated-inputs `(("guile-lib" ,guile2.0-lib)))
660 (home-page "https://github.com/artyom-poptsov/guile-ics")
661 (synopsis "Guile parser library for the iCalendar format")
663 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
664 pure Scheme. The library can be used to read and write iCalendar data.
666 The library is shipped with documentation in Info format and usage examples.")
667 (license license:gpl3+)))
669 (define-public guile-lib
675 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
679 "19q420i3is3d4jmkdqs5y7ir7ipp4s795saflqgwf6617cx2zpj4"))))
680 (build-system gnu-build-system)
683 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
685 (modify-phases %standard-phases
686 (add-before 'configure 'patch-module-dir
688 (substitute* "src/Makefile.in"
689 (("^moddir = ([[:graph:]]+)")
690 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
691 (("^godir = ([[:graph:]]+)")
693 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
695 (native-inputs `(("pkg-config" ,pkg-config)))
696 (inputs `(("guile" ,guile-2.2)))
697 (home-page "http://www.nongnu.org/guile-lib/")
698 (synopsis "Collection of useful Guile Scheme modules")
700 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
701 modules, allowing for people to cooperate integrating their generic Guile
702 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
705 ;; The whole is under GPLv3+, but some modules are under laxer
706 ;; distribution terms such as LGPL and public domain. See `COPYING' for
708 (license license:gpl3+)))
710 (define-public guile2.0-lib
711 (package-for-guile-2.0 guile-lib))
713 (define-public guile2.2-lib
714 (deprecated-package "guile2.2-lib" guile-lib))
716 (define-public guile-json
722 (uri (string-append "mirror://savannah/guile-json/guile-json-"
726 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
727 (modules '((guix build utils)))
729 ;; Make sure everything goes under .../site/X.Y, like Guile's
730 ;; search paths expects.
732 (substitute* "configure"
734 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
735 (substitute* '("Makefile.in" "json/Makefile.in")
736 (("moddir =.*/share/guile/site" all)
737 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
738 (build-system gnu-build-system)
739 (native-inputs `(("guile" ,guile-2.2)))
740 (home-page "http://savannah.nongnu.org/projects/guile-json/")
741 (synopsis "JSON module for Guile")
743 "Guile-JSON supports parsing and building JSON documents according to the
744 specification. These are the main features:
747 @item Strictly complies to @uref{http://json.org, specification}.
748 @item Build JSON documents programmatically via macros.
749 @item Unicode support for strings.
750 @item Allows JSON pretty printing.
752 (license license:lgpl3+)))
754 (define-public guile2.2-json
755 (deprecated-package "guile2.2-json" guile-json))
757 (define-public guile2.0-json
758 (package-for-guile-2.0 guile-json))
760 (define-public guile-minikanren
762 (name "guile-minikanren")
763 (version "20150424.e844d85")
767 (url "https://github.com/ijp/minikanren.git")
768 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
769 (file-name (string-append name "-" version "-checkout"))
772 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
773 (build-system trivial-build-system)
775 `(#:modules ((guix build utils))
778 (use-modules (guix build utils)
783 (let* ((out (assoc-ref %outputs "out"))
784 (guile (assoc-ref %build-inputs "guile"))
785 (effective (read-line
786 (open-pipe* OPEN_READ
787 (string-append guile "/bin/guile")
788 "-c" "(display (effective-version))")))
789 (module-dir (string-append out "/share/guile/site/"
791 (source (assoc-ref %build-inputs "source"))
792 (doc (string-append out "/share/doc/guile-minikanren"))
793 (scm-files '("minikanren.scm"
794 "minikanren/mkextraforms.scm"
795 "minikanren/mkprelude.scm"
796 "minikanren/mk.scm"))
797 (guild (string-append (assoc-ref %build-inputs "guile")
799 ;; Make installation directories.
800 (mkdir-p (string-append module-dir "/minikanren"))
803 ;; Compile .scm files and install.
805 (setenv "GUILE_AUTO_COMPILE" "0")
806 (for-each (lambda (file)
807 (let* ((dest-file (string-append module-dir "/"
809 (go-file (match (string-split file #\.)
811 (string-append module-dir "/"
813 ;; Install source module.
814 (copy-file file dest-file)
815 ;; Install compiled module.
816 (unless (zero? (system* guild "compile"
820 (error (format #f "Failed to compile ~s to ~s!"
824 ;; Also copy over the README.
825 (install-file "README.org" doc)
828 `(("guile" ,guile-2.0)))
829 (home-page "https://github.com/ijp/minikanren")
830 (synopsis "MiniKanren declarative logic system, packaged for Guile")
832 "MiniKanren is a relational programming extension to the Scheme
833 programming Language, written as a smaller version of Kanren suitable for
834 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
835 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
837 This is Ian Price's r6rs packaged version of miniKanren, which deviates
838 slightly from miniKanren mainline.
840 See http://minikanren.org/ for more on miniKanren generally.")
841 (license license:expat)))
843 (define-public guile2.2-minikanren
844 (package-for-guile-2.2 guile-minikanren))
846 (define-public guile-miniadapton
847 (let ((commit "1b5749422304567c96ac5367f2221dda9eff5880")
850 (name "guile-miniadapton")
851 (version (string-append "0-" revision "." (string-take commit 9)))
855 (url "https://github.com/fisherdj/miniAdapton.git")
857 (file-name (string-append name "-" version "-checkout"))
860 "09q51zkw2fypad5xixskfzw2cjhjgs5cswdp3i7cpp651rb3zndh"))))
861 (build-system gnu-build-system)
863 `(#:modules ((guix build utils)
867 (guix build gnu-build-system))
868 #:tests? #f ; there is no test target
870 (modify-phases %standard-phases
874 (lambda* (#:key outputs #:allow-other-keys)
875 (let* ((cwd (getcwd))
876 (scm-files (find-files "." "\\.scm$"))
877 (effective (read-line
878 (open-pipe* OPEN_READ
880 "(display (effective-version))")))
881 (module-dir (string-append (assoc-ref outputs "out")
885 ;; Make installation directories.
888 (setenv "GUILE_AUTO_COMPILE" "0")
890 ;; Compile .scm files and install.
891 (every (lambda (file)
892 (let ((go-file (string-append module-dir "/"
893 (basename file ".scm") ".go")))
894 ;; Install source module.
895 (install-file file module-dir)
896 ;; Compile and install module.
897 (zero? (system* "guild" "compile" "-L" cwd
898 "-o" go-file file))))
901 `(("guile" ,guile-2.2)))
902 (home-page "https://github.com/fisherdj/miniAdapton")
903 (synopsis "Minimal implementation of incremental computation in Guile
905 (description "This package provides a complete Scheme implementation of
906 miniAdapton, which implements the core functionality of the Adapton system for
907 incremental computation (also known as self-adjusting computation). Like
908 Adapton, miniAdapton allows programmers to safely combine mutation and
909 memoization. miniAdapton is built on top of an even simpler system,
910 microAdapton. Both miniAdapton and microAdapton are designed to be easy to
911 understand, extend, and port to host languages other than Scheme.")
912 (license license:expat))))
914 (define-public guile-irregex
916 (name "guile-irregex")
921 "http://synthcode.com/scheme/irregex/irregex-"
925 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
926 (build-system gnu-build-system)
928 `(#:modules ((guix build utils)
932 (guix build gnu-build-system))
934 (modify-phases %standard-phases
939 (lambda* (#:key inputs outputs #:allow-other-keys)
940 (let* ((out (assoc-ref outputs "out"))
941 (effective (read-line
942 (open-pipe* OPEN_READ
944 "(display (effective-version))")))
945 (module-dir (string-append out "/share/guile/site/"
947 (source (assoc-ref inputs "source"))
948 (doc (string-append out "/share/doc/guile-irregex/"))
949 (guild (string-append (assoc-ref %build-inputs "guile")
951 ;; Make installation directories.
952 (mkdir-p (string-append module-dir "/rx/source"))
955 ;; Compile .scm files and install.
956 (setenv "GUILE_AUTO_COMPILE" "0")
958 (for-each (lambda (copy-info)
960 ((src-file dest-file-basis)
961 (let* ((dest-file (string-append
962 module-dir dest-file-basis
964 (go-file (string-append
965 module-dir dest-file-basis
967 ;; Install source module.
970 ;; Install compiled module.
971 (unless (zero? (system* guild "compile"
975 (error (format #f "Failed to compile ~s to ~s!"
976 src-file dest-file)))))))
977 '(("irregex-guile.scm" "/rx/irregex")
978 ("irregex.scm" "/rx/source/irregex")
979 ;; Not really reachable via guile's packaging system,
980 ;; but nice to have around
981 ("irregex-utils.scm" "/rx/source/irregex-utils")))
983 ;; Also copy over the README.
984 (install-file "irregex.html" doc)
987 `(("guile" ,guile-2.0)))
988 (home-page "http://synthcode.com/scheme/irregex")
989 (synopsis "S-expression based regular expressions")
991 "Irregex is an s-expression based alternative to your classic
992 string-based regular expressions. It implements SRFI 115 and is deeply
993 inspired by the SCSH regular expression system.")
994 (license license:bsd-3)))
996 (define-public guile2.2-irregex
997 (package-for-guile-2.2 guile-irregex))
999 ;; There are two guile-gdbm packages, one using the FFI and one with
1000 ;; direct C bindings, hence the verbose name.
1002 (define-public guile-gdbm-ffi
1004 (name "guile-gdbm-ffi")
1005 (version "20120209.fa1d5b6")
1009 (url "https://github.com/ijp/guile-gdbm.git")
1010 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
1011 (file-name (string-append name "-" version "-checkout"))
1014 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
1015 (build-system trivial-build-system)
1018 ((guix build utils))
1021 (use-modules (guix build utils)
1025 ;; Avoid warnings we can safely ignore
1026 (setenv "GUILE_AUTO_COMPILE" "0")
1028 (let* ((out (assoc-ref %outputs "out"))
1031 (open-pipe* OPEN_READ
1033 (assoc-ref %build-inputs "guile")
1035 "-c" "(display (effective-version))")))
1036 (module-dir (string-append out "/share/guile/site/"
1038 (source (assoc-ref %build-inputs "source"))
1039 (doc (string-append out "/share/doc"))
1040 (guild (string-append (assoc-ref %build-inputs "guile")
1043 (string-append module-dir "/gdbm.scm"))
1045 (string-append module-dir "/gdbm.go"))
1047 (lambda (in-file out-file)
1048 (system* guild "compile" "-o" out-file in-file))))
1049 ;; Make installation directories.
1050 (mkdir-p module-dir)
1053 ;; Switch directory for compiling and installing
1057 (copy-file "gdbm.scm" gdbm.scm-dest)
1060 (substitute* gdbm.scm-dest
1061 (("\\(dynamic-link \"libgdbm\"\\)")
1062 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
1063 (assoc-ref %build-inputs "gdbm"))))
1065 ;; compile to the destination
1066 (compile-file gdbm.scm-dest gdbm.go-dest)))))
1068 `(("guile" ,guile-2.0)))
1071 (home-page "https://github.com/ijp/guile-gdbm")
1072 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
1074 "Guile bindings to the GDBM key-value storage system, using
1075 Guile's foreign function interface.")
1076 (license license:gpl3+)))
1078 (define-public guile2.2-gdbm-ffi
1079 (package-for-guile-2.2 guile-gdbm-ffi))
1081 (define-public guile-sqlite3
1082 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
1084 (name "guile-sqlite3")
1085 (version (string-append "0.0-1." (string-take commit 7)))
1087 ;; XXX: This used to be available read-only at
1088 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
1089 ;; eventually disappeared, so we have our own copy here.
1090 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
1098 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
1099 (file-name (string-append name "-" version "-checkout"))
1100 (modules '((guix build utils)))
1102 ;; Upgrade 'Makefile.am' to the current way of doing things.
1103 '(substitute* "Makefile.am"
1104 (("TESTS_ENVIRONMENT")
1105 "TEST_LOG_COMPILER")))))
1107 (build-system gnu-build-system)
1109 `(("autoconf" ,autoconf)
1110 ("automake" ,automake)
1111 ("pkg-config" ,pkg-config)))
1113 `(("guile" ,guile-2.2)
1114 ("sqlite" ,sqlite)))
1116 '(#:phases (modify-phases %standard-phases
1117 (add-before 'configure 'autoreconf
1119 (zero? (system* "autoreconf" "-vfi"))))
1120 (add-before 'build 'set-sqlite3-file-name
1121 (lambda* (#:key inputs #:allow-other-keys)
1122 (substitute* "sqlite3.scm"
1124 (string-append "\"" (assoc-ref inputs "sqlite")
1125 "/lib/libsqlite3\"")))
1127 (synopsis "Access SQLite databases from Guile")
1129 "This package provides Guile bindings to the SQLite database system.")
1130 (license license:gpl3+))))
1132 (define-public haunt
1138 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1142 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1143 (build-system gnu-build-system)
1145 `(#:modules ((ice-9 match) (ice-9 ftw)
1146 ,@%gnu-build-system-modules)
1147 #:tests? #f ; test suite is non-deterministic :(
1148 #:phases (modify-phases %standard-phases
1149 (add-after 'install 'wrap-haunt
1150 (lambda* (#:key outputs #:allow-other-keys)
1151 ;; Wrap the 'haunt' command to refer to the right
1153 (let* ((out (assoc-ref outputs "out"))
1154 (bin (string-append out "/bin"))
1155 (site (string-append
1156 out "/share/guile/site")))
1157 (match (scandir site)
1159 (let ((modules (string-append site "/" version)))
1160 (wrap-program (string-append bin "/haunt")
1161 `("GUILE_LOAD_PATH" ":" prefix
1163 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1167 `(("pkg-config" ,pkg-config)
1168 ("texinfo" ,texinfo)))
1170 `(("guile" ,guile-2.2)))
1172 `(("guile-reader" ,guile-reader)
1173 ("guile-commonmark" ,guile-commonmark)))
1174 (synopsis "Functional static site generator")
1175 (description "Haunt is a static site generator written in Guile
1176 Scheme. Haunt features a functional build system and an extensible
1177 interface for reading articles in any format.")
1178 (home-page "http://haunt.dthompson.us")
1179 (license license:gpl3+)))
1181 (define-public guile2.0-haunt
1182 (package-for-guile-2.0
1183 (package (inherit haunt) (name "guile2.0-haunt"))))
1184 (define-public guile2.2-haunt
1185 (deprecated-package "guile2.2-haunt" haunt))
1187 (define-public guile-config
1189 (name "guile-config")
1194 "http://alex.pompo.co/software/" name "-" version
1198 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1199 (build-system gnu-build-system)
1201 `(("guile" ,guile-2.0)))
1202 (synopsis "Guile application configuration parsing library")
1204 "Guile Config is a library providing a declarative approach to
1205 application configuration specification. The library provides clean
1206 configuration declaration forms, and processors that take care of:
1207 configuration file creation; configuration file parsing; command-line
1208 parameter parsing using getopt-long; basic GNU command-line parameter
1209 generation (--help, --usage, --version); automatic output generation for the
1210 above command-line parameters.")
1211 (home-page "https://github.com/a-sassmannshausen/guile-config")
1212 (license license:agpl3+)))
1214 (define-public guile-redis
1216 (name "guile-redis")
1220 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1224 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1225 (modules '((guix build utils)))
1227 ;; Make sure everything goes under .../site/X.Y, like Guile's
1228 ;; search paths expects.
1230 (substitute* "configure"
1231 (("ac_subst_vars='")
1232 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1233 (substitute* '("Makefile.in"
1235 "redis/commands/Makefile.in")
1236 (("moddir =.*/share/guile/site" all)
1237 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1238 (build-system gnu-build-system)
1240 `(("guile" ,guile-2.0)))
1241 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1242 (synopsis "Redis client library for Guile")
1243 (description "Guile-redis provides a Scheme interface to the Redis
1244 key-value cache and store.")
1245 (license license:lgpl3+)))
1247 (define-public guile2.2-redis
1248 (package-for-guile-2.2 guile-redis))
1250 (define-public guile-wisp
1256 (uri (string-append "https://bitbucket.org/ArneBab/"
1257 "wisp/downloads/wisp-"
1261 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1262 (build-system gnu-build-system)
1264 `(#:modules ((system base compile)
1265 ,@%gnu-build-system-modules)
1267 (modify-phases %standard-phases
1269 'configure 'substitute-before-config
1271 (lambda* (#:key inputs #:allow-other-keys)
1272 (let ((bash (assoc-ref inputs "bash")))
1273 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1274 (substitute* "configure"
1275 (("guile-2.0") "guile"))
1276 ;; Puts together some test files with /bin/bash hardcoded
1277 (substitute* "Makefile.in"
1279 (string-append bash "/bin/bash") ))
1282 ;; auto compilation breaks, but if we set HOME to /tmp,
1285 'check 'auto-compile-hacky-workaround
1287 (setenv "HOME" "/tmp")
1291 (lambda* (#:key outputs inputs #:allow-other-keys)
1292 (let* ((out (assoc-ref outputs "out"))
1293 (module-dir (string-append out "/share/guile/site/2.0"))
1295 (string-append module-dir "/language/wisp"))
1296 (guild (string-append (assoc-ref inputs "guile")
1298 ;; Make installation directories.
1299 (mkdir-p module-dir)
1300 (mkdir-p language-dir)
1303 (copy-file "wisp-scheme.scm"
1304 (string-append module-dir "/wisp-scheme.scm"))
1305 (copy-file "language/wisp/spec.scm"
1306 (string-append language-dir "/spec.scm"))
1308 ;; compile to the destination
1309 (compile-file "wisp-scheme.scm"
1310 #:output-file (string-append
1311 module-dir "/wisp-scheme.go"))
1312 (compile-file "language/wisp/spec.scm"
1313 #:output-file (string-append
1314 language-dir "/spec.go"))
1316 (home-page "http://draketo.de/english/wisp")
1318 `(("guile" ,guile-2.0)
1319 ("python" ,python)))
1320 (synopsis "Whitespace to lisp syntax for Guile")
1321 (description "Wisp is a syntax for Guile which provides a Python-like
1322 whitespace-significant language. It may be easier on the eyes for some
1323 users and in some situations.")
1324 (license license:gpl3+)))
1326 (define-public guile-sly
1332 (uri (string-append "https://files.dthompson.us/sly/sly-"
1336 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1337 (build-system gnu-build-system)
1340 (list (string-append "--with-libfreeimage-prefix="
1341 (assoc-ref %build-inputs "freeimage"))
1342 (string-append "--with-libgslcblas-prefix="
1343 (assoc-ref %build-inputs "gsl")))))
1345 `(("pkg-config" ,pkg-config)))
1347 `(("guile" ,guile-2.0)
1348 ("guile-sdl" ,guile-sdl)
1349 ("guile-opengl" ,guile-opengl)))
1352 ("freeimage" ,freeimage)
1354 (synopsis "2D/3D game engine for GNU Guile")
1355 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1356 features a functional reactive programming interface and live coding
1358 (home-page "http://dthompson.us/pages/software/sly.html")
1359 (license license:gpl3+)))
1361 (define-public g-wrap
1367 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1371 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1372 (build-system gnu-build-system)
1374 `(("pkg-config" ,pkg-config)))
1376 `(("guile" ,guile-2.2)
1377 ("guile-lib" ,guile-lib)))
1379 `(("libffi" ,libffi)))
1381 `(#:configure-flags '("--disable-Werror")
1383 (modify-phases %standard-phases
1384 (add-before 'configure 'pre-configure
1385 (lambda* (#:key outputs #:allow-other-keys)
1386 (let ((out (assoc-ref outputs "out")))
1387 (substitute* (find-files "." "^Makefile.in$")
1388 (("guilemoduledir =.*guile/site" all)
1389 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
1391 (synopsis "Generate C bindings for Guile")
1392 (description "G-Wrap is a tool and Guile library for generating function
1393 wrappers for inter-language calls. It currently only supports generating Guile
1394 wrappers for C functions. Given a definition of the types and prototypes for
1395 a given C interface, G-Wrap will automatically generate the C code that
1396 provides access to that interface and its types from the Scheme level.")
1397 (home-page "http://www.nongnu.org/g-wrap/index.html")
1398 (license license:lgpl2.1+)))
1400 (define-public guile-dbi
1407 "http://download.gna.org/guile-dbi/guile-dbi-"
1411 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1412 (build-system gnu-build-system)
1415 (list (string-append
1416 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1418 (modify-phases %standard-phases
1419 (add-after 'install 'patch-extension-path
1420 (lambda* (#:key outputs #:allow-other-keys)
1421 (let* ((out (assoc-ref outputs "out"))
1422 (dbi.scm (string-append
1423 out "/share/guile/site/2.0/dbi/dbi.scm"))
1424 (ext (string-append out "/lib/libguile-dbi")))
1425 (substitute* dbi.scm (("libguile-dbi") ext))
1428 `(("guile" ,guile-2.0)))
1429 (synopsis "Guile database abstraction layer")
1430 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1432 "guile-dbi is a library for Guile that provides a convenient interface to
1433 SQL databases. Database programming with guile-dbi is generic in that the same
1434 programming interface is presented regardless of which database system is used.
1435 It currently supports MySQL, Postgres and SQLite3.")
1436 (license license:gpl2+)))
1438 (define-public guile-dbd-sqlite3
1440 (name "guile-dbd-sqlite3")
1445 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1449 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1450 (build-system gnu-build-system)
1452 `(("pkg-config" ,pkg-config)))
1454 `(("sqlite" ,sqlite)
1455 ("zlib" ,(@ (gnu packages compression) zlib))))
1457 `(("guile-dbi" ,guile-dbi)))
1458 (synopsis "Guile DBI driver for SQLite")
1459 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1461 "guile-dbi is a library for Guile that provides a convenient interface to
1462 SQL databases. This package implements the interface for SQLite.")
1463 (license license:gpl2+)))
1465 (define-public guile-xosd
1471 (uri (string-append "https://github.com/alezost/" name
1472 "/releases/download/v" version
1473 "/" name "-" version ".tar.gz"))
1476 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1477 (build-system gnu-build-system)
1479 `(("pkg-config" ,pkg-config)))
1481 `(("guile" ,guile-2.2)
1483 ("libxext" ,libxext)
1484 ("libxinerama" ,libxinerama)
1486 (home-page "https://github.com/alezost/guile-xosd")
1487 (synopsis "XOSD bindings for Guile")
1489 "Guile-XOSD provides Guile bindings for @code{libxosd},
1490 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1492 (license license:gpl3+)))
1494 (define-public guile-daemon
1496 (name "guile-daemon")
1500 (uri (string-append "https://github.com/alezost/" name
1501 "/releases/download/v" version
1502 "/" name "-" version ".tar.gz"))
1505 "0hh6gq6b6phpxm0b1dkxyzj3f4sxdf7dji63609lzypa5v1ad2gv"))))
1506 (build-system gnu-build-system)
1508 `(("pkg-config" ,pkg-config)))
1510 `(("guile" ,guile-2.2)))
1511 (home-page "https://github.com/alezost/guile-daemon")
1512 (synopsis "Evaluate code in a running Guile process")
1514 "Guile-Daemon is a small Guile program that loads your initial
1515 configuration file, and then reads and evaluates Guile expressions that
1516 you send to a FIFO file.")
1517 (license license:gpl3+)))
1519 (define-public guile-commonmark
1521 (name "guile-commonmark")
1525 (uri (string-append "https://github.com/OrangeShark/" name
1526 "/releases/download/v" version
1527 "/" name "-" version ".tar.gz"))
1530 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1531 (modules '((guix build utils)))
1533 ;; Use the real effective version of Guile in directory names
1534 ;; instead of a hard-coded "/2.0".
1536 (substitute* "configure"
1537 (("ac_subst_vars='")
1538 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1539 (substitute* "Makefile.in"
1541 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1542 (build-system gnu-build-system)
1544 `(("guile" ,guile-2.2)))
1545 (synopsis "CommonMark parser for Guile")
1547 "guile-commonmark is a library for parsing CommonMark, a fully specified
1548 variant of Markdown. The library is written in Guile Scheme and is designed
1549 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1550 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1551 is no support for parsing block and inline level HTML.")
1552 (home-page "https://github.com/OrangeShark/guile-commonmark")
1553 (license license:lgpl3+)))
1555 (define-public guile2.0-commonmark
1556 (package-for-guile-2.0 guile-commonmark))
1557 (define-public guile2.2-commonmark
1558 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1560 (define-public guile-bytestructures
1562 (name "guile-bytestructures")
1563 (version "20170402.91d042e")
1567 (url "https://github.com/TaylanUB/scheme-bytestructures")
1568 (commit "91d042e3427e1d7740b604b6296c616cf2eec13d")))
1569 (file-name (string-append name "-" version "-checkout"))
1572 "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb"))
1573 (patches (search-patches "guile-bytestructures-name-clash.patch"))))
1574 (build-system trivial-build-system)
1576 `(#:modules ((guix build utils))
1579 (use-modules (guix build utils)
1586 (string-join (list (assoc-ref %build-inputs "tar")
1587 (assoc-ref %build-inputs "xz"))
1589 (system* "tar" "xf" (assoc-ref %build-inputs "source"))
1590 (match (scandir ".")
1591 (("." ".." directory)
1594 (let* ((out (assoc-ref %outputs "out"))
1595 (guile (assoc-ref %build-inputs "guile"))
1596 (effective (read-line
1597 (open-pipe* OPEN_READ
1598 (string-append guile "/bin/guile")
1599 "-c" "(display (effective-version))")))
1600 (module-dir (string-append out "/share/guile/site/"
1602 (object-dir (string-append out "/lib/guile/" effective
1605 (doc (string-append out "/share/doc/scheme-bytestructures"))
1606 (sld-files (with-directory-excursion source
1607 (find-files "bytestructures/r7" "\\.exports.sld$")))
1608 (scm-files (filter (lambda (path)
1609 (not (string-prefix? "bytestructures/r7" path)))
1610 (with-directory-excursion source
1611 (find-files "bytestructures" "\\.scm$"))))
1612 (guild (string-append (assoc-ref %build-inputs "guile")
1614 ;; Make installation directories.
1617 ;; Compile .scm files and install.
1619 (setenv "GUILE_AUTO_COMPILE" "0")
1620 (for-each (lambda (file)
1621 (let* ((dest-file (string-append module-dir "/"
1623 (go-file (string-append object-dir "/"
1625 (string-rindex file #\.))
1627 ;; Install source module.
1628 (mkdir-p (dirname dest-file))
1629 (copy-file file dest-file)
1631 ;; Install compiled module.
1632 (mkdir-p (dirname go-file))
1633 (unless (zero? (system* guild "compile"
1637 (error (format #f "Failed to compile ~s to ~s!"
1639 (append sld-files scm-files))
1641 ;; Also copy over the README.
1642 (install-file "README.md" doc)
1648 `(("guile" ,guile-2.2)))
1649 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1650 (synopsis "Structured access to bytevector contents for Guile")
1652 "Guile bytestructures offers a system imitating the type system
1653 of the C programming language, to be used on bytevectors. C's type
1654 system works on raw memory, and Guile works on bytevectors which are
1655 an abstraction over raw memory. It's also more powerful than the C
1656 type system, elevating types to first-class status.")
1657 (license license:gpl3+)))
1659 (define-public guile2.0-bytestructures
1660 (package-for-guile-2.0 guile-bytestructures))
1662 (define-public guile-aspell
1664 (name "guile-aspell")
1669 "http://lonelycactus.com/tarball/guile_aspell-"
1673 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1674 (build-system gnu-build-system)
1676 '(#:phases (modify-phases %standard-phases
1677 (add-before 'configure 'set-guilesitedir
1679 (substitute* "Makefile.in"
1680 (("^guilesitedir =.*$")
1682 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1684 (add-before 'build 'set-libaspell-file-name
1685 (lambda* (#:key inputs #:allow-other-keys)
1686 (let ((aspell (assoc-ref inputs "aspell")))
1687 (substitute* "aspell.scm"
1688 (("\"libaspell\\.so\"")
1689 (string-append "\"" aspell
1690 "/lib/libaspell\"")))
1692 (native-inputs `(("pkg-config" ,pkg-config)))
1693 (inputs `(("guile" ,guile-2.2)
1694 ("aspell" ,aspell)))
1695 (home-page "https://github.com/spk121/guile-aspell")
1696 (synopsis "Spell-checking from Guile")
1698 "guile-aspell is a Guile Scheme library for comparing a string against a
1699 dictionary and suggesting spelling corrections.")
1700 (license license:gpl3+)))
1702 (define-public guile-bash
1703 ;; This project is currently retired. It was initially announced here:
1704 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1705 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1709 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1711 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1719 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1720 (file-name (string-append name "-" version "-checkout"))))
1721 (build-system gnu-build-system)
1723 '(#:phases (modify-phases %standard-phases
1724 (add-after 'unpack 'bootstrap
1726 (zero? (system* "sh" "bootstrap")))))
1729 ;; Add -I to match 'bash.pc' of Bash 4.4.
1730 (list (string-append "CPPFLAGS=-I"
1731 (assoc-ref %build-inputs "bash:include")
1732 "/include/bash/include")
1734 ;; The '.a' file is useless.
1737 ;; Install 'lib/bash' as Bash 4.4 expects.
1738 (string-append "--libdir=" (assoc-ref %outputs "out")
1740 (native-inputs `(("pkg-config" ,pkg-config)
1741 ("autoconf" ,(autoconf-wrapper))
1742 ("automake" ,automake)
1743 ("libtool" ,libtool)
1744 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1745 ("gettext" ,gettext-minimal)))
1746 (inputs `(("guile" ,guile-2.0)
1747 ("bash:include" ,bash "include")))
1748 (synopsis "Extend Bash using Guile")
1750 "Guile-Bash provides a shared library and set of Guile modules,
1751 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1752 the following aspects of Bash:
1756 @item setting and getting Bash variables;
1757 @item creating dynamic variables;
1758 @item creating Bash functions with a Scheme implementation;
1759 @item reader macro for output capturing;
1760 @item reader macro for evaluating raw Bash commands.
1766 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1769 and then run @command{scm example.scm}.")
1770 (license license:gpl3+))))
1772 (define-public guile-8sync
1774 (name "guile-8sync")
1778 (uri (string-append "mirror://gnu/8sync/8sync-" version
1782 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1783 (build-system gnu-build-system)
1784 (native-inputs `(("autoconf" ,autoconf)
1785 ("automake" ,automake)
1786 ("guile" ,guile-2.2)
1787 ("pkg-config" ,pkg-config)
1788 ("texinfo" ,texinfo)))
1790 `(#:phases (modify-phases %standard-phases
1791 (add-before 'configure 'setenv
1794 (setenv "GUILE_AUTO_COMPILE" "0")
1796 (home-page "https://gnu.org/s/8sync/")
1797 (synopsis "Asynchronous actor model library for Guile")
1799 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1800 library for GNU Guile based on the actor model.
1802 Note that 8sync is only available for Guile 2.2.")
1803 (license license:lgpl3+)))
1805 (define-public guile-fibers
1807 (name "guile-fibers")
1811 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1815 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1816 (build-system gnu-build-system)
1818 `(("texinfo" ,texinfo)
1819 ("pkg-config" ,pkg-config)))
1821 `(("guile" ,guile-2.2)))
1822 (synopsis "Lightweight concurrency facility for Guile")
1824 "Fibers is a Guile library that implements a a lightweight concurrency
1825 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1826 like a \"goroutine\" from the Go language: a lightweight thread-like
1827 abstraction. Systems built with Fibers can scale up to millions of concurrent
1828 fibers, tens of thousands of concurrent socket connections, and many parallel
1829 cores. The Fibers library also provides Concurrent ML-like channels for
1830 communication between fibers.
1832 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1833 is not available for Guile 2.0.")
1834 (home-page "https://github.com/wingo/fibers")
1835 (license license:lgpl3+)))
1837 (define-public guile-git
1838 (let ((revision "3")
1839 (commit "e156a1054cc1d9e58d9be82e36e8acf5c9f9ee8d"))
1842 (version (string-append "0.0-" revision "." (string-take commit 7)))
1843 (home-page "https://gitlab.com/guile-git/guile-git.git")
1846 (uri (git-reference (url home-page) (commit commit)))
1849 "1vhr2bqkljy1zzdy02dky2nk1w9bd46afj5wd4gp4kr333pz4ch6"))
1850 (file-name (git-file-name name version))))
1851 (build-system gnu-build-system)
1853 `(#:phases (modify-phases %standard-phases
1854 (add-after 'unpack 'bootstrap
1856 (zero? (system* "autoreconf" "-vfi"))))
1858 ;; FIXME: On i686, bytestructures miscalculates the offset
1859 ;; of the 'old-file' and 'new-file' fields within the
1860 ;; '%diff-delta' structure.
1861 ,@(if (string=? (%current-system) "x86_64-linux")
1863 '((add-before 'check 'skip-tests
1865 (substitute* "Makefile"
1866 (("tests/status\\.scm")
1870 `(("autoconf" ,autoconf)
1871 ("automake" ,automake)
1872 ("texinfo" ,texinfo)
1873 ("pkg-config" ,pkg-config)))
1875 `(("guile" ,guile-2.2)
1876 ("libgit2" ,libgit2)))
1878 `(("guile-bytestructures" ,guile-bytestructures)))
1879 (synopsis "Guile bindings for libgit2")
1881 "This package provides Guile bindings to libgit2, a library to
1882 manipulate repositories of the Git version control system.")
1883 (license license:gpl3+))))
1885 (define-public guile2.0-git
1886 (package-for-guile-2.0 guile-git))
1888 (define-public guile-syntax-highlight
1889 (let ((commit "a047675e66861b647426372aa2ba7820f749616d")
1892 (name "guile-syntax-highlight")
1893 (version (string-append "0.0." revision "."
1894 (string-take commit 7)))
1898 (url "git://dthompson.us/guile-syntax-highlight.git")
1902 "1zjr6sg3n7xbdsliy45i39dqanxvcms58ayx36wxrz72zpq58vq3"))))
1903 (build-system gnu-build-system)
1905 '(#:phases (modify-phases %standard-phases
1906 (add-after 'unpack 'bootstrap
1908 (zero? (system* "sh" "bootstrap")))))))
1910 `(("autoconf" ,autoconf)
1911 ("automake" ,automake)
1912 ("pkg-config" ,pkg-config)))
1914 `(("guile" ,guile-2.2)))
1915 (synopsis "General-purpose syntax highlighter for GNU Guile")
1916 (description "Guile-syntax-highlight is a general-purpose syntax
1917 highlighting library for GNU Guile. It can parse code written in various
1918 programming languages into a simple s-expression that can be converted to
1919 HTML (via SXML) or any other format for rendering.")
1920 (home-page "http://dthompson.us/software/guile-syntax-highlight")
1921 (license license:lgpl3+))))
1923 (define-public guile-sjson
1925 (name "guile-sjson")
1929 (uri (string-append "https://dustycloud.org/misc/sjson-" version
1933 "1mzmapln79vv10qxaggz9qwcdbag3jnrj19xx8bgkmxss8h03sv3"))))
1934 (build-system gnu-build-system)
1937 (modify-phases %standard-phases
1938 (add-after 'unpack 'bootstrap
1939 (lambda _ (zero? (system* "sh" "bootstrap.sh")))))))
1941 `(("autoconf" ,autoconf)
1942 ("automake" ,automake)
1943 ("pkg-config" ,pkg-config)))
1945 `(("guile" ,guile-2.2)))
1946 (home-page "https://gitlab.com/dustyweb/guile-sjson")
1947 (synopsis "S-expression based json reader/writer for Guile")
1948 (description "guile-sjson is a json reader/writer for Guile.
1949 It has a nice, simple s-expression based syntax.")
1950 (license license:lgpl3+)))
1952 ;;; guile.scm ends here