gnu: guile-ncurses: Update to 2.2.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
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 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 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages guile)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages aspell)
34 #:use-module (gnu packages bash)
35 #:use-module (gnu packages bdw-gc)
36 #:use-module (gnu packages gawk)
37 #:use-module (gnu packages gperf)
38 #:use-module (gnu packages libffi)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages libunistring)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages m4)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages readline)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages ed)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages texinfo)
51 #:use-module (gnu packages man)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages databases)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages sdl)
57 #:use-module (gnu packages maths)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages version-control)
60 #:use-module (gnu packages xdisorg)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages zip)
63 #:use-module (guix packages)
64 #:use-module (guix download)
65 #:use-module (guix git-download)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system trivial)
68 #:use-module (guix utils)
69 #:use-module (ice-9 match))
70
71 ;;; Commentary:
72 ;;;
73 ;;; GNU Guile, and modules and extensions.
74 ;;;
75 ;;; Code:
76
77 (define-public guile-1.8
78 (package
79 (name "guile")
80 (version "1.8.8")
81 (source (origin
82 (method url-fetch)
83 (uri (string-append "mirror://gnu/guile/guile-" version
84 ".tar.gz"))
85 (sha256
86 (base32
87 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
88 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
89 (build-system gnu-build-system)
90 (arguments '(#:configure-flags '("--disable-error-on-warning")
91
92 ;; Insert a phase before `configure' to patch things up.
93 #:phases (alist-cons-before
94 'configure
95 'patch-stuff
96 (lambda* (#:key outputs #:allow-other-keys)
97 ;; Add a call to `lt_dladdsearchdir' so that
98 ;; `libguile-readline.so' & co. are in the
99 ;; loader's search path.
100 (substitute* "libguile/dynl.c"
101 (("lt_dlinit.*$" match)
102 (format #f
103 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
104 match
105 (assoc-ref outputs "out"))))
106
107 ;; The usual /bin/sh...
108 (substitute* "ice-9/popen.scm"
109 (("/bin/sh") (which "sh"))))
110 %standard-phases)))
111 (inputs `(("gawk" ,gawk)
112 ("readline" ,readline)))
113
114 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
115 ;; propagated.
116 (propagated-inputs `(("gmp" ,gmp)
117 ("libltdl" ,libltdl)))
118
119 ;; When cross-compiling, a native version of Guile itself is needed.
120 (self-native-input? #t)
121
122 (native-search-paths
123 (list (search-path-specification
124 (variable "GUILE_LOAD_PATH")
125 (files '("share/guile/site")))))
126
127 (synopsis "Scheme implementation intended especially for extensions")
128 (description
129 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
130 official extension language of the GNU system. It is an implementation of
131 the Scheme language which can be easily embedded in other applications to
132 provide a convenient means of extending the functionality of the application
133 without requiring the source code to be rewritten.")
134 (home-page "https://www.gnu.org/software/guile/")
135 (license license:lgpl2.0+)))
136
137 (define-public guile-2.0
138 (package
139 (name "guile")
140 (version "2.0.14")
141 (source (origin
142 (method url-fetch)
143 (uri (string-append "mirror://gnu/guile/guile-" version
144 ".tar.xz"))
145 (sha256
146 (base32
147 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
148 (build-system gnu-build-system)
149 (native-inputs `(("pkgconfig" ,pkg-config)))
150 (inputs `(("libffi" ,libffi)
151 ("readline" ,readline)
152 ,@(libiconv-if-needed)
153 ,@(if (target-mingw?) '() `(("bash" ,bash)))))
154 (propagated-inputs
155 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
156 ;; reads `-lltdl -lunistring', adding them here will add the needed
157 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
158 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
159 ("libunistring" ,libunistring)
160
161 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
162 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
163 ("libltdl" ,libltdl)
164
165 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
166 ;; must be propagated.
167 ("bdw-gc" ,libgc)
168 ("gmp" ,gmp)))
169
170 (self-native-input? #t)
171
172 (outputs '("out" "debug"))
173
174 (arguments
175 `(#:configure-flags '("--disable-static") ;saves 3MiB
176 #:phases (alist-cons-before
177 'configure 'pre-configure
178 (lambda* (#:key inputs #:allow-other-keys)
179 ;; Tell (ice-9 popen) the file name of Bash.
180 (let ((bash (assoc-ref inputs "bash")))
181 (substitute* "module/ice-9/popen.scm"
182 ;; If bash is #f allow fallback for user to provide
183 ;; "bash" in PATH. This happens when cross-building to
184 ;; MinGW for which we do not have Bash yet.
185 (("/bin/sh")
186 ,@(if (target-mingw?)
187 '((if bash
188 (string-append bash "/bin/bash")
189 "bash"))
190 '((string-append bash "/bin/bash")))))))
191 %standard-phases)))
192
193 (native-search-paths
194 (list (search-path-specification
195 (variable "GUILE_LOAD_PATH")
196 (files '("share/guile/site/2.0")))
197 (search-path-specification
198 (variable "GUILE_LOAD_COMPILED_PATH")
199 (files '("lib/guile/2.0/site-ccache"
200 "share/guile/site/2.0")))))
201
202 (synopsis "Scheme implementation intended especially for extensions")
203 (description
204 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
205 official extension language of the GNU system. It is an implementation of
206 the Scheme language which can be easily embedded in other applications to
207 provide a convenient means of extending the functionality of the application
208 without requiring the source code to be rewritten.")
209 (home-page "https://www.gnu.org/software/guile/")
210 (license license:lgpl3+)))
211
212 (define-public guile-2.0/fixed
213 ;; A package of Guile 2.0 that's rarely changed. It is the one used
214 ;; in the `base' module, and thus changing it entails a full rebuild.
215 (package
216 (inherit guile-2.0)
217 (properties '((hidden? . #t))) ;people should install 'guile-2.0'
218 (replacement #f)))
219
220 (define-public guile-2.2
221 (package (inherit guile-2.0)
222 (name "guile")
223 (version "2.2.0")
224 (replacement #f)
225 (source (origin
226 (method url-fetch)
227 (uri (string-append "mirror://gnu/guile/guile-" version
228 ".tar.lz"))
229 (sha256
230 (base32
231 "083vp6754dp4d5pvcy4bqvxq60cayf92v5slf5cgij8bnvixgyvr"))
232 (modules '((guix build utils)))
233
234 ;; Remove the pre-built object files. Instead, build everything
235 ;; from source, at the expense of significantly longer build
236 ;; times (almost 3 hours on a 4-core Intel i5).
237 (snippet '(for-each delete-file
238 (find-files "prebuilt" "\\.go$")))))
239 (properties '((timeout . 72000) ;20 hours
240 (max-silent-time . 10800))) ;3 hours (needed on ARM)
241 (native-search-paths
242 (list (search-path-specification
243 (variable "GUILE_LOAD_PATH")
244 (files '("share/guile/site/2.2")))
245 (search-path-specification
246 (variable "GUILE_LOAD_COMPILED_PATH")
247 (files '("lib/guile/2.2/site-ccache"
248 "share/guile/site/2.2")))))))
249
250 (define-public guile-next
251 (deprecated-package "guile-next" guile-2.2))
252
253 (define (guile-variant-package-name prefix)
254 (lambda (name)
255 "Return NAME with PREFIX instead of \"guile-\", when applicable."
256 (if (string-prefix? "guile-" name)
257 (string-append prefix "-"
258 (string-drop name
259 (string-length "guile-")))
260 name)))
261
262 (define package-for-guile-2.2
263 ;; A procedure that rewrites the dependency tree of the given package to use
264 ;; GUILE-2.2 instead of GUILE-2.0.
265 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
266 (guile-variant-package-name "guile2.2")))
267
268 (define package-for-guile-2.0
269 ;; Likewise, but the other way around. :-)
270 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
271 (guile-variant-package-name "guile2.0")))
272
273 (define-public guile-for-guile-emacs
274 (package (inherit guile-2.2)
275 (name "guile-for-guile-emacs")
276 (version "20150510.d8d9a8d")
277 (source (origin
278 (method git-fetch)
279 (uri (git-reference
280 (url "git://git.hcoop.net/git/bpt/guile.git")
281 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
282 (sha256
283 (base32
284 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
285 (arguments
286 (substitute-keyword-arguments `(;; Tests aren't passing for now.
287 ;; Obviously we should re-enable this!
288 #:tests? #f
289 ,@(package-arguments guile-2.2))
290 ((#:phases phases)
291 `(modify-phases ,phases
292 (add-after 'unpack 'autogen
293 (lambda _
294 (zero? (system* "sh" "autogen.sh"))))
295 (add-before 'autogen 'patch-/bin/sh
296 (lambda _
297 (substitute* "build-aux/git-version-gen"
298 (("#!/bin/sh") (string-append "#!" (which "sh"))))
299 #t))))))
300 (native-inputs
301 `(("autoconf" ,autoconf)
302 ("automake" ,automake)
303 ("libtool" ,libtool)
304 ("flex" ,flex)
305 ("texinfo" ,texinfo)
306 ("gettext" ,gettext-minimal)
307 ,@(package-native-inputs guile-2.2)))
308 ;; Same as in guile-2.0
309 (native-search-paths
310 (list (search-path-specification
311 (variable "GUILE_LOAD_PATH")
312 (files '("share/guile/site/2.0")))
313 (search-path-specification
314 (variable "GUILE_LOAD_COMPILED_PATH")
315 (files '("lib/guile/2.0/site-ccache"
316 "share/guile/site/2.0")))))))
317
318 ;; There has not been any release yet.
319 (define-public guildhall
320 (let ((commit "2fe2cc539f4b811bbcd69e58738db03eb5a2b778")
321 (revision "1"))
322 (package
323 (name "guildhall")
324 (version (string-append "0-" revision "." (string-take commit 9)))
325 (source (origin
326 (method git-fetch)
327 (uri (git-reference
328 (url "https://github.com/ijp/guildhall.git")
329 (commit commit)))
330 (file-name (string-append name "-" version "-checkout"))
331 (sha256
332 (base32
333 "115bym7bg66h3gs399yb2vkzc2ygriaqsn4zbrg8f054mgy8wzn1"))))
334 (build-system gnu-build-system)
335 (arguments
336 `(#:phases
337 (modify-phases %standard-phases
338 ;; Tests fail without this fix because they try to load the bash
339 ;; executable as a Scheme file. See bug report at
340 ;; https://github.com/ijp/guildhall/issues/22
341 (add-after 'unpack 'fix-bug-22
342 (lambda _
343 (substitute* "Makefile.am"
344 (("TESTS_ENVIRONMENT=.*")
345 "AM_TESTS_ENVIRONMENT=srcdir=$(abs_top_srcdir)/tests/
346 TEST_EXTENSIONS = .scm
347 SCM_LOG_COMPILER= $(top_builddir)/env $(GUILE)
348 AM_SCM_LOG_FLAGS = --no-auto-compile -s")
349 ;; FIXME: one of the database tests fails for unknown
350 ;; reasons. It does not fail when run outside of Guix.
351 (("tests/database.scm") ""))
352 #t))
353 (add-before 'configure 'autogen
354 (lambda _
355 (zero? (system* "sh" "autogen.sh")))))))
356 (inputs
357 `(("guile" ,guile-2.0)))
358 (native-inputs
359 `(("zip" ,zip) ; for tests
360 ("autoconf" ,autoconf)
361 ("automake" ,automake)
362 ("texinfo" ,texinfo)))
363 (synopsis "Package manager for Guile")
364 (description
365 "Guildhall is a package manager written for Guile Scheme. A guild is
366 an association of independent craftspeople. A guildhall is where they meet.
367 This Guildhall aims to make a virtual space for Guile wizards and journeyfolk
368 to share code.
369
370 On a practical level, Guildhall lets you share Scheme modules and programs
371 over the internet, and install code that has been shared by others. Guildhall
372 can handle dependencies, so when a program requires several libraries, and
373 each of those has further dependencies, all of the prerequisites for the
374 program can be installed in one go.")
375 (home-page "https://github.com/ijp/guildhall")
376 (license license:gpl3+))))
377
378 \f
379 ;;;
380 ;;; Extensions.
381 ;;;
382
383 (define-public artanis
384 (package
385 (name "artanis")
386 (version "0.1.2")
387 (source (origin
388 (method url-fetch)
389 (uri (string-append "ftp://alpha.gnu.org/gnu/artanis/artanis-"
390 version ".tar.gz"))
391 (sha256
392 (base32
393 "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
394 (patches (search-patches "artanis-fix-Makefile.in.patch"))))
395 (build-system gnu-build-system)
396 ;; TODO: Add guile-dbi and guile-dbd optional dependencies.
397 (inputs `(("guile" ,guile-2.0)))
398 (native-inputs `(("bash" ,bash) ;for the `source' builtin
399 ("pkgconfig" ,pkg-config)
400 ("util-linux" ,util-linux))) ;for the `script' command
401 (arguments
402 '(#:make-flags
403 ;; TODO: The documentation must be built with the `docs' target.
404 (let* ((out (assoc-ref %outputs "out"))
405 (dir (string-append out "/share/guile/site/2.0")))
406 ;; Don't use (%site-dir) for site paths.
407 (list (string-append "MOD_PATH=" dir)
408 (string-append "MOD_COMPILED_PATH=" dir)))
409 #:test-target "test"
410 #:phases
411 (modify-phases %standard-phases
412 (add-before
413 'install 'substitute-root-dir
414 (lambda* (#:key outputs #:allow-other-keys)
415 (let ((out (assoc-ref outputs "out")))
416 (substitute* "Makefile" ;ignore the execution of bash.bashrc
417 ((" /etc/bash.bashrc") " /dev/null"))
418 (substitute* "Makefile" ;set the root of config files to OUT
419 ((" /etc") (string-append " " out "/etc")))
420 (mkdir-p (string-append out "/bin")) ;for the `art' executable
421 #t))))))
422 (synopsis "Web application framework written in Guile")
423 (description "GNU Artanis is a web application framework written in Guile
424 Scheme. A web application framework (WAF) is a software framework that is
425 designed to support the development of dynamic websites, web applications, web
426 services and web resources. The framework aims to alleviate the overhead
427 associated with common activities performed in web development. Artanis
428 provides several tools for web development: database access, templating
429 frameworks, session management, URL-remapping for RESTful, page caching, and
430 more.")
431 (home-page "https://www.gnu.org/software/artanis/")
432 (license (list license:gpl3+ license:lgpl3+)))) ;dual license
433
434 (define-public guile-reader
435 (package
436 (name "guile-reader")
437 (version "0.6.2")
438 (source (origin
439 (method url-fetch)
440 (uri (string-append "mirror://savannah/guile-reader/guile-reader-"
441 version ".tar.gz"))
442 (sha256
443 (base32
444 "0592s2s8ampqmqwilc4fvcild6rb9gy79di6vxv5kcdmv23abkgx"))))
445 (build-system gnu-build-system)
446 (native-inputs `(("pkgconfig" ,pkg-config)
447 ("gperf" ,gperf-3.0)))
448 (inputs `(("guile" ,guile-2.2)))
449 (synopsis "Framework for building readers for GNU Guile")
450 (description
451 "Guile-Reader is a simple framework for building readers for GNU Guile.
452
453 The idea is to make it easy to build procedures that extend Guile’s read
454 procedure. Readers supporting various syntax variants can easily be written,
455 possibly by re-using existing “token readers” of a standard Scheme
456 readers. For example, it is used to implement Skribilo’s R5RS-derived
457 document syntax.
458
459 Guile-Reader’s approach is similar to Common Lisp’s “read table”, but
460 hopefully more powerful and flexible (for instance, one may instantiate as
461 many readers as needed).")
462 (home-page "http://www.nongnu.org/guile-reader/")
463 (license license:gpl3+)))
464
465 (define-public guile2.0-reader
466 (package-for-guile-2.0 guile-reader))
467 (define-public guile2.2-reader
468 (deprecated-package "guile2.2-reader" guile-reader))
469
470 (define-public guile-ncurses
471 (package
472 (name "guile-ncurses")
473 (version "2.2")
474 (source (origin
475 (method url-fetch)
476 (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
477 version ".tar.gz"))
478 (sha256
479 (base32
480 "1wvggbr4xv8idh1hzd8caj4xfp4pln78a7w1wqzd4zgzwmnzxr2f"))))
481 (build-system gnu-build-system)
482 (inputs `(("ncurses" ,ncurses)
483 ("guile" ,guile-2.0)))
484 (native-inputs `(("pkg-config" ,pkg-config)))
485 (arguments
486 '(#:configure-flags (list "--with-ncursesw" ; Unicode support
487 "--with-gnu-filesystem-hierarchy")
488 #:phases
489 (modify-phases %standard-phases
490 (add-before 'build 'fix-libguile-ncurses-file-name
491 (lambda* (#:key outputs #:allow-other-keys)
492 (and (zero? (system* "make" "install"
493 "-C" "src/ncurses"
494 "-j" (number->string
495 (parallel-job-count))))
496 (let* ((out (assoc-ref outputs "out"))
497 (dir "src/ncurses")
498 (files (find-files dir ".scm")))
499 (substitute* files
500 (("\"libguile-ncurses\"")
501 (format #f "\"~a/lib/guile/2.0/libguile-ncurses\""
502 out)))
503 #t)))))))
504 (home-page "https://www.gnu.org/software/guile-ncurses/")
505 (synopsis "Guile bindings to ncurses")
506 (description
507 "guile-ncurses provides Guile language bindings for the ncurses
508 library.")
509 (license license:lgpl3+)))
510
511 (define-public mcron
512 (package
513 (name "mcron")
514 (version "1.0.8")
515 (source (origin
516 (method url-fetch)
517 (uri (string-append "mirror://gnu/mcron/mcron-"
518 version ".tar.gz"))
519 (sha256
520 (base32
521 "0zparwgf01jgl1x53ik71ghabldq6zz18ha4dscps1i0qrzgap1b"))
522 (patches (search-patches "mcron-install.patch"))))
523 (build-system gnu-build-system)
524 (native-inputs `(("pkg-config" ,pkg-config)))
525 (inputs `(("ed" ,ed) ("which" ,which) ("guile" ,guile-2.0)))
526 (home-page "https://www.gnu.org/software/mcron/")
527 (synopsis "Run jobs at scheduled times")
528 (description
529 "GNU Mcron is a complete replacement for Vixie cron. It is used to run
530 tasks on a schedule, such as every hour or every Monday. Mcron is written in
531 Guile, so its configuration can be written in Scheme; the original cron
532 format is also supported.")
533 (license license:gpl3+)))
534
535 (define-public mcron2
536 ;; This is mthl's mcron development branch, not yet merged in mcron.
537 (let ((commit "31baff1a5187d8ddc89324cbe42dbeffc309c962"))
538 (package
539 (inherit mcron)
540 (name "mcron2")
541 (version (string-append (package-version mcron) "-0."
542 (string-take commit 7)))
543 (source (origin
544 (method git-fetch)
545 (uri (git-reference
546 (url "https://notabug.org/mthl/mcron/")
547 (commit commit)))
548 (sha256
549 (base32
550 "1h5wxy997hxi718hpx419c23q09939kbxrjbbq54lv0cgw1bb63z"))
551 (file-name (string-append name "-" version "-checkout"))))
552 (native-inputs
553 `(("autoconf" ,autoconf)
554 ("automake" ,automake)
555 ("pkg-config" ,pkg-config)
556 ("texinfo" ,texinfo)
557 ("help2man" ,help2man)))
558 (arguments
559 `(#:modules ((ice-9 match) (ice-9 ftw)
560 ,@%gnu-build-system-modules)
561
562 #:phases (modify-phases %standard-phases
563 (add-after 'unpack 'bootstrap
564 (lambda _
565 (zero? (system* "autoreconf" "-vfi"))))
566 (add-after 'install 'wrap-mcron
567 (lambda* (#:key outputs #:allow-other-keys)
568 ;; Wrap the 'mcron' command to refer to the right
569 ;; modules.
570 (let* ((out (assoc-ref outputs "out"))
571 (bin (string-append out "/bin"))
572 (site (string-append
573 out "/share/guile/site")))
574 (match (scandir site)
575 (("." ".." version)
576 (let ((modules (string-append site "/" version)))
577 (wrap-program (string-append bin "/mcron")
578 `("GUILE_LOAD_PATH" ":" prefix
579 (,modules))
580 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
581 (,modules)))
582 #t))))))))))))
583
584 (define-public guile-ics
585 (package
586 (name "guile-ics")
587 (version "0.1.1")
588 (source (origin
589 (method git-fetch)
590 (uri (git-reference
591 (url "https://github.com/artyom-poptsov/guile-ics")
592 (commit "v0.1.1")))
593 (file-name (string-append name "-" version "-checkout"))
594 (sha256
595 (base32
596 "1pvg6j48inpbq47hq00yh5hhl2qd2srvrx5yjl7w7ky1jsjadp86"))))
597 (build-system gnu-build-system)
598 (arguments
599 '(#:phases (modify-phases %standard-phases
600 (add-before 'configure 'autoreconf
601 (lambda _
602 ;; Repository comes with a broken symlink
603 (delete-file "README")
604 (symlink "README.org" "README")
605 (zero? (system* "autoreconf" "-fi")))))))
606 (native-inputs
607 `(("autoconf" ,(autoconf-wrapper))
608 ("automake" ,automake)
609 ("texinfo" ,texinfo)
610 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
611 ("gettext" ,gettext-minimal)
612 ("pkg-config" ,pkg-config)))
613 (inputs `(("guile" ,guile-2.0) ("which" ,which)))
614 (propagated-inputs `(("guile-lib" ,guile-lib)))
615 (home-page "https://github.com/artyom-poptsov/guile-ics")
616 (synopsis "Guile parser library for the iCalendar format")
617 (description
618 "Guile-ICS is an iCalendar (RFC5545) format parser library written in
619 pure Scheme. The library can be used to read and write iCalendar data.
620
621 The library is shipped with documentation in Info format and usage examples.")
622 (license license:gpl3+)))
623
624 (define-public guile-lib
625 (package
626 (name "guile-lib")
627 (version "0.2.5")
628 (source (origin
629 (method url-fetch)
630 (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
631 version ".tar.gz"))
632 (sha256
633 (base32
634 "1qbk485djgxqrbfjvk4b7w7y4x9xygf2qb8dqnl7885kajasx8qg"))))
635 (build-system gnu-build-system)
636 (arguments
637 '(#:make-flags
638 '("GUILE_AUTO_COMPILE=0") ;to prevent guild errors
639 #:phases
640 (modify-phases %standard-phases
641 (add-before 'configure 'patch-module-dir
642 (lambda _
643 (substitute* "src/Makefile.in"
644 (("^moddir = ([[:graph:]]+)")
645 "moddir = $(datadir)/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
646 (("^godir = ([[:graph:]]+)")
647 "godir = \
648 $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n"))
649 #t)))))
650 (native-inputs `(("pkg-config" ,pkg-config)))
651 (inputs `(("guile" ,guile-2.0)))
652 (home-page "http://www.nongnu.org/guile-lib/")
653 (synopsis "Collection of useful Guile Scheme modules")
654 (description
655 "Guile-Lib is intended as an accumulation place for pure-scheme Guile
656 modules, allowing for people to cooperate integrating their generic Guile
657 modules into a coherent library. Think \"a down-scaled, limited-scope CPAN
658 for Guile\".")
659
660 ;; The whole is under GPLv3+, but some modules are under laxer
661 ;; distribution terms such as LGPL and public domain. See `COPYING' for
662 ;; details.
663 (license license:gpl3+)))
664
665 (define-public guile2.2-lib
666 (package-for-guile-2.2 guile-lib))
667
668 (define-public guile-json
669 (package
670 (name "guile-json")
671 (version "0.6.0")
672 (source (origin
673 (method url-fetch)
674 (uri (string-append "mirror://savannah/guile-json/guile-json-"
675 version ".tar.gz"))
676 (sha256
677 (base32
678 "1qmjg7lbgciw95fkdzvlp9f68vv17kdjky42ywfzd4ffzwww0lgc"))
679 (modules '((guix build utils)))
680 (snippet
681 ;; Make sure everything goes under .../site/X.Y, like Guile's
682 ;; search paths expects.
683 '(begin
684 (substitute* "configure"
685 (("ac_subst_vars='")
686 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
687 (substitute* '("Makefile.in" "json/Makefile.in")
688 (("moddir =.*/share/guile/site" all)
689 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
690 (build-system gnu-build-system)
691 (native-inputs `(("guile" ,guile-2.0)))
692 (home-page "http://savannah.nongnu.org/projects/guile-json/")
693 (synopsis "JSON module for Guile")
694 (description
695 "Guile-JSON supports parsing and building JSON documents according to the
696 specification. These are the main features:
697
698 @itemize
699 @item Strictly complies to @uref{http://json.org, specification}.
700 @item Build JSON documents programmatically via macros.
701 @item Unicode support for strings.
702 @item Allows JSON pretty printing.
703 @end itemize\n")
704 (license license:lgpl3+)))
705
706 (define-public guile2.2-json
707 (package-for-guile-2.2 guile-json))
708
709 (define-public guile-minikanren
710 (package
711 (name "guile-minikanren")
712 (version "20150424.e844d85")
713 (source (origin
714 (method git-fetch)
715 (uri (git-reference
716 (url "https://github.com/ijp/minikanren.git")
717 (commit "e844d85512f8c055d3f96143ee506007389a25e3")))
718 (file-name (string-append name "-" version "-checkout"))
719 (sha256
720 (base32
721 "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6"))))
722 (build-system trivial-build-system)
723 (arguments
724 `(#:modules ((guix build utils))
725 #:builder
726 (begin
727 (use-modules (guix build utils)
728 (ice-9 match)
729 (ice-9 popen)
730 (ice-9 rdelim))
731
732 (let* ((out (assoc-ref %outputs "out"))
733 (guile (assoc-ref %build-inputs "guile"))
734 (effective (read-line
735 (open-pipe* OPEN_READ
736 (string-append guile "/bin/guile")
737 "-c" "(display (effective-version))")))
738 (module-dir (string-append out "/share/guile/site/"
739 effective))
740 (source (assoc-ref %build-inputs "source"))
741 (doc (string-append out "/share/doc/guile-minikanren"))
742 (scm-files '("minikanren.scm"
743 "minikanren/mkextraforms.scm"
744 "minikanren/mkprelude.scm"
745 "minikanren/mk.scm"))
746 (guild (string-append (assoc-ref %build-inputs "guile")
747 "/bin/guild")))
748 ;; Make installation directories.
749 (mkdir-p (string-append module-dir "/minikanren"))
750 (mkdir-p doc)
751
752 ;; Compile .scm files and install.
753 (chdir source)
754 (setenv "GUILE_AUTO_COMPILE" "0")
755 (for-each (lambda (file)
756 (let* ((dest-file (string-append module-dir "/"
757 file))
758 (go-file (match (string-split file #\.)
759 ((base _)
760 (string-append module-dir "/"
761 base ".go")))))
762 ;; Install source module.
763 (copy-file file dest-file)
764 ;; Install compiled module.
765 (unless (zero? (system* guild "compile"
766 "-L" source
767 "-o" go-file
768 file))
769 (error (format #f "Failed to compile ~s to ~s!"
770 file go-file)))))
771 scm-files)
772
773 ;; Also copy over the README.
774 (install-file "README.org" doc)
775 #t))))
776 (inputs
777 `(("guile" ,guile-2.0)))
778 (home-page "https://github.com/ijp/minikanren")
779 (synopsis "MiniKanren declarative logic system, packaged for Guile")
780 (description
781 "MiniKanren is a relational programming extension to the Scheme
782 programming Language, written as a smaller version of Kanren suitable for
783 pedagogical purposes. It is featured in the book, The Reasoned Schemer,
784 written by Dan Friedman, William Byrd, and Oleg Kiselyov.
785
786 This is Ian Price's r6rs packaged version of miniKanren, which deviates
787 slightly from miniKanren mainline.
788
789 See http://minikanren.org/ for more on miniKanren generally.")
790 (license license:expat)))
791
792 (define-public guile2.2-minikanren
793 (package-for-guile-2.2 guile-minikanren))
794
795 (define-public guile-irregex
796 (package
797 (name "guile-irregex")
798 (version "0.9.6")
799 (source (origin
800 (method url-fetch)
801 (uri (string-append
802 "http://synthcode.com/scheme/irregex/irregex-"
803 version ".tar.gz"))
804 (sha256
805 (base32
806 "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq"))))
807 (build-system gnu-build-system)
808 (arguments
809 `(#:modules ((guix build utils)
810 (ice-9 match)
811 (ice-9 rdelim)
812 (ice-9 popen)
813 (guix build gnu-build-system))
814 #:phases
815 (modify-phases %standard-phases
816 (delete 'configure)
817 (delete 'build)
818 (delete 'check)
819 (replace 'install
820 (lambda* (#:key inputs outputs #:allow-other-keys)
821 (let* ((out (assoc-ref outputs "out"))
822 (effective (read-line
823 (open-pipe* OPEN_READ
824 "guile" "-c"
825 "(display (effective-version))")))
826 (module-dir (string-append out "/share/guile/site/"
827 effective))
828 (source (assoc-ref inputs "source"))
829 (doc (string-append out "/share/doc/guile-irregex/"))
830 (guild (string-append (assoc-ref %build-inputs "guile")
831 "/bin/guild")))
832 ;; Make installation directories.
833 (mkdir-p (string-append module-dir "/rx/source"))
834 (mkdir-p doc)
835
836 ;; Compile .scm files and install.
837 (setenv "GUILE_AUTO_COMPILE" "0")
838
839 (for-each (lambda (copy-info)
840 (match copy-info
841 ((src-file dest-file-basis)
842 (let* ((dest-file (string-append
843 module-dir dest-file-basis
844 ".scm"))
845 (go-file (string-append
846 module-dir dest-file-basis
847 ".go")))
848 ;; Install source module.
849 (copy-file src-file
850 dest-file)
851 ;; Install compiled module.
852 (unless (zero? (system* guild "compile"
853 "-L" (getcwd)
854 "-o" go-file
855 src-file))
856 (error (format #f "Failed to compile ~s to ~s!"
857 src-file dest-file)))))))
858 '(("irregex-guile.scm" "/rx/irregex")
859 ("irregex.scm" "/rx/source/irregex")
860 ;; Not really reachable via guile's packaging system,
861 ;; but nice to have around
862 ("irregex-utils.scm" "/rx/source/irregex-utils")))
863
864 ;; Also copy over the README.
865 (install-file "irregex.html" doc)
866 #t))))))
867 (inputs
868 `(("guile" ,guile-2.0)))
869 (home-page "http://synthcode.com/scheme/irregex")
870 (synopsis "S-expression based regular expressions")
871 (description
872 "Irregex is an s-expression based alternative to your classic
873 string-based regular expressions. It implements SRFI 115 and is deeply
874 inspired by the SCSH regular expression system.")
875 (license license:bsd-3)))
876
877 (define-public guile2.2-irregex
878 (package-for-guile-2.2 guile-irregex))
879
880 ;; There are two guile-gdbm packages, one using the FFI and one with
881 ;; direct C bindings, hence the verbose name.
882
883 (define-public guile-gdbm-ffi
884 (package
885 (name "guile-gdbm-ffi")
886 (version "20120209.fa1d5b6")
887 (source (origin
888 (method git-fetch)
889 (uri (git-reference
890 (url "https://github.com/ijp/guile-gdbm.git")
891 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
892 (file-name (string-append name "-" version "-checkout"))
893 (sha256
894 (base32
895 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
896 (build-system trivial-build-system)
897 (arguments
898 `(#:modules
899 ((guix build utils))
900 #:builder
901 (begin
902 (use-modules (guix build utils)
903 (ice-9 rdelim)
904 (ice-9 popen))
905
906 ;; Avoid warnings we can safely ignore
907 (setenv "GUILE_AUTO_COMPILE" "0")
908
909 (let* ((out (assoc-ref %outputs "out"))
910 (effective-version
911 (read-line
912 (open-pipe* OPEN_READ
913 (string-append
914 (assoc-ref %build-inputs "guile")
915 "/bin/guile")
916 "-c" "(display (effective-version))")))
917 (module-dir (string-append out "/share/guile/site/"
918 effective-version))
919 (source (assoc-ref %build-inputs "source"))
920 (doc (string-append out "/share/doc"))
921 (guild (string-append (assoc-ref %build-inputs "guile")
922 "/bin/guild"))
923 (gdbm.scm-dest
924 (string-append module-dir "/gdbm.scm"))
925 (gdbm.go-dest
926 (string-append module-dir "/gdbm.go"))
927 (compile-file
928 (lambda (in-file out-file)
929 (system* guild "compile" "-o" out-file in-file))))
930 ;; Make installation directories.
931 (mkdir-p module-dir)
932 (mkdir-p doc)
933
934 ;; Switch directory for compiling and installing
935 (chdir source)
936
937 ;; copy the source
938 (copy-file "gdbm.scm" gdbm.scm-dest)
939
940 ;; Patch the FFI
941 (substitute* gdbm.scm-dest
942 (("\\(dynamic-link \"libgdbm\"\\)")
943 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
944 (assoc-ref %build-inputs "gdbm"))))
945
946 ;; compile to the destination
947 (compile-file gdbm.scm-dest gdbm.go-dest)))))
948 (inputs
949 `(("guile" ,guile-2.0)))
950 (propagated-inputs
951 `(("gdbm" ,gdbm)))
952 (home-page "https://github.com/ijp/guile-gdbm")
953 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
954 (description
955 "Guile bindings to the GDBM key-value storage system, using
956 Guile's foreign function interface.")
957 (license license:gpl3+)))
958
959 (define-public guile2.2-gdbm-ffi
960 (package-for-guile-2.2 guile-gdbm-ffi))
961
962 (define-public guile-sqlite3
963 (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
964 (package
965 (name "guile-sqlite3")
966 (version (string-append "0.0-0." (string-take commit 7)))
967
968 ;; XXX: This used to be available read-only at
969 ;; <https://www.gitorious.org/guile-sqlite3/guile-sqlite3.git/> but it
970 ;; eventually disappeared, so we have our own copy here.
971 (home-page "https://notabug.org/civodul/guile-sqlite3.git")
972 (source (origin
973 (method git-fetch)
974 (uri (git-reference
975 (url home-page)
976 (commit commit)))
977 (sha256
978 (base32
979 "09gaffhh5rawz5kdmqx2ahvj1ngvxddp469r18bmjz3sz8p0slj2"))
980 (file-name (string-append name "-" version "-checkout"))
981 (modules '((guix build utils)))
982 (snippet
983 ;; Upgrade 'Makefile.am' to the current way of doing things.
984 '(substitute* "Makefile.am"
985 (("TESTS_ENVIRONMENT")
986 "TEST_LOG_COMPILER")))))
987
988 (build-system gnu-build-system)
989 (native-inputs
990 `(("autoconf" ,autoconf)
991 ("automake" ,automake)
992 ("pkg-config" ,pkg-config)))
993 (inputs
994 `(("guile" ,guile-2.0)
995 ("sqlite" ,sqlite)))
996 (arguments
997 '(#:phases (modify-phases %standard-phases
998 (add-before 'configure 'autoreconf
999 (lambda _
1000 (zero? (system* "autoreconf" "-vfi"))))
1001 (add-before 'build 'set-sqlite3-file-name
1002 (lambda* (#:key inputs #:allow-other-keys)
1003 (substitute* "sqlite3.scm"
1004 (("\"libsqlite3\"")
1005 (string-append "\"" (assoc-ref inputs "sqlite")
1006 "/lib/libsqlite3\"")))
1007 #t)))))
1008 (synopsis "Access SQLite databases from Guile")
1009 (description
1010 "This package provides Guile bindings to the SQLite database system.")
1011 (license license:gpl3+))))
1012
1013 (define-public haunt
1014 (package
1015 (name "haunt")
1016 (version "0.2.1")
1017 (source (origin
1018 (method url-fetch)
1019 (uri (string-append "https://files.dthompson.us/haunt/haunt-"
1020 version ".tar.gz"))
1021 (sha256
1022 (base32
1023 "1fpaf1vm6s7j13fs35barjh5yajcc2rc3pi8r7278wpgp4i2vs3w"))))
1024 (build-system gnu-build-system)
1025 (arguments
1026 `(#:modules ((ice-9 match) (ice-9 ftw)
1027 ,@%gnu-build-system-modules)
1028 #:tests? #f ; test suite is non-deterministic :(
1029 #:phases (modify-phases %standard-phases
1030 (add-after 'install 'wrap-haunt
1031 (lambda* (#:key outputs #:allow-other-keys)
1032 ;; Wrap the 'haunt' command to refer to the right
1033 ;; modules.
1034 (let* ((out (assoc-ref outputs "out"))
1035 (bin (string-append out "/bin"))
1036 (site (string-append
1037 out "/share/guile/site")))
1038 (match (scandir site)
1039 (("." ".." version)
1040 (let ((modules (string-append site "/" version)))
1041 (wrap-program (string-append bin "/haunt")
1042 `("GUILE_LOAD_PATH" ":" prefix
1043 (,modules))
1044 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
1045 (,modules)))
1046 #t)))))))))
1047 (native-inputs
1048 `(("pkg-config" ,pkg-config)
1049 ("texinfo" ,texinfo)))
1050 (inputs
1051 `(("guile" ,guile-2.2)))
1052 (propagated-inputs
1053 `(("guile-reader" ,guile-reader)
1054 ("guile-commonmark" ,guile-commonmark)))
1055 (synopsis "Functional static site generator")
1056 (description "Haunt is a static site generator written in Guile
1057 Scheme. Haunt features a functional build system and an extensible
1058 interface for reading articles in any format.")
1059 (home-page "http://haunt.dthompson.us")
1060 (license license:gpl3+)))
1061
1062 (define-public guile2.0-haunt
1063 (package-for-guile-2.0
1064 (package (inherit haunt) (name "guile2.0-haunt"))))
1065 (define-public guile2.2-haunt
1066 (deprecated-package "guile2.2-haunt" haunt))
1067
1068 (define-public guile-config
1069 (package
1070 (name "guile-config")
1071 (version "0.1.1")
1072 (source (origin
1073 (method url-fetch)
1074 (uri (string-append
1075 "http://alex.pompo.co/software/" name "-" version
1076 ".tar.gz"))
1077 (sha256
1078 (base32
1079 "1b719bn192f9wg24rr0zx8jpmygsvyhfi35iy778pb5p392snrn8"))))
1080 (build-system gnu-build-system)
1081 (inputs
1082 `(("guile" ,guile-2.0)))
1083 (synopsis "Guile application configuration parsing library")
1084 (description
1085 "Guile Config is a library providing a declarative approach to
1086 application configuration specification. The library provides clean
1087 configuration declaration forms, and processors that take care of:
1088 configuration file creation; configuration file parsing; command-line
1089 parameter parsing using getopt-long; basic GNU command-line parameter
1090 generation (--help, --usage, --version); automatic output generation for the
1091 above command-line parameters.")
1092 (home-page "https://github.com/a-sassmannshausen/guile-config")
1093 (license license:agpl3+)))
1094
1095 (define-public guile-redis
1096 (package
1097 (name "guile-redis")
1098 (version "0.1.0")
1099 (source (origin
1100 (method url-fetch)
1101 (uri (string-append "mirror://savannah/guile-redis/guile-redis-"
1102 version ".tar.gz"))
1103 (sha256
1104 (base32
1105 "0vx6if6b4r3kwx64vzbs6vpc0cpcr85x11w9vkzq27gw8n7isv56"))
1106 (modules '((guix build utils)))
1107 (snippet
1108 ;; Make sure everything goes under .../site/X.Y, like Guile's
1109 ;; search paths expects.
1110 '(begin
1111 (substitute* "configure"
1112 (("ac_subst_vars='")
1113 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1114 (substitute* '("Makefile.in"
1115 "redis/Makefile.in"
1116 "redis/commands/Makefile.in")
1117 (("moddir =.*/share/guile/site" all)
1118 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))))))
1119 (build-system gnu-build-system)
1120 (native-inputs
1121 `(("guile" ,guile-2.0)))
1122 (home-page "http://savannah.nongnu.org/projects/guile-redis/")
1123 (synopsis "Redis client library for Guile")
1124 (description "Guile-redis provides a Scheme interface to the Redis
1125 key-value cache and store.")
1126 (license license:lgpl3+)))
1127
1128 (define-public guile2.2-redis
1129 (package-for-guile-2.2 guile-redis))
1130
1131 (define-public guile-wisp
1132 (package
1133 (name "guile-wisp")
1134 (version "0.9.0")
1135 (source (origin
1136 (method url-fetch)
1137 (uri (string-append "https://bitbucket.org/ArneBab/"
1138 "wisp/downloads/wisp-"
1139 version ".tar.gz"))
1140 (sha256
1141 (base32
1142 "0y5fxacalkgbv9s71h58vdvm2h2ln3rk024dd0vszwcf953as5fq"))))
1143 (build-system gnu-build-system)
1144 (arguments
1145 `(#:modules ((system base compile)
1146 ,@%gnu-build-system-modules)
1147 #:phases
1148 (modify-phases %standard-phases
1149 (add-before
1150 'configure 'substitute-before-config
1151
1152 (lambda* (#:key inputs #:allow-other-keys)
1153 (let ((bash (assoc-ref inputs "bash")))
1154 ;; configure checks for guile-2.0, but ours is just named "guile" :)
1155 (substitute* "configure"
1156 (("guile-2.0") "guile"))
1157 ;; Puts together some test files with /bin/bash hardcoded
1158 (substitute* "Makefile.in"
1159 (("/bin/bash")
1160 (string-append bash "/bin/bash") ))
1161 #t)))
1162
1163 ;; auto compilation breaks, but if we set HOME to /tmp,
1164 ;; that works ok
1165 (add-before
1166 'check 'auto-compile-hacky-workaround
1167 (lambda _
1168 (setenv "HOME" "/tmp")
1169 #t))
1170 (replace
1171 'install
1172 (lambda* (#:key outputs inputs #:allow-other-keys)
1173 (let* ((out (assoc-ref outputs "out"))
1174 (module-dir (string-append out "/share/guile/site/2.0"))
1175 (language-dir
1176 (string-append module-dir "/language/wisp"))
1177 (guild (string-append (assoc-ref inputs "guile")
1178 "/bin/guild")))
1179 ;; Make installation directories.
1180 (mkdir-p module-dir)
1181 (mkdir-p language-dir)
1182
1183 ;; copy the source
1184 (copy-file "wisp-scheme.scm"
1185 (string-append module-dir "/wisp-scheme.scm"))
1186 (copy-file "language/wisp/spec.scm"
1187 (string-append language-dir "/spec.scm"))
1188
1189 ;; compile to the destination
1190 (compile-file "wisp-scheme.scm"
1191 #:output-file (string-append
1192 module-dir "/wisp-scheme.go"))
1193 (compile-file "language/wisp/spec.scm"
1194 #:output-file (string-append
1195 language-dir "/spec.go"))
1196 #t))))))
1197 (home-page "http://draketo.de/english/wisp")
1198 (inputs
1199 `(("guile" ,guile-2.0)
1200 ("python" ,python)))
1201 (synopsis "Whitespace to lisp syntax for Guile")
1202 (description "Wisp is a syntax for Guile which provides a Python-like
1203 whitespace-significant language. It may be easier on the eyes for some
1204 users and in some situations.")
1205 (license license:gpl3+)))
1206
1207 (define-public guile-sly
1208 (package
1209 (name "guile-sly")
1210 (version "0.1")
1211 (source (origin
1212 (method url-fetch)
1213 (uri (string-append "https://files.dthompson.us/sly/sly-"
1214 version ".tar.gz"))
1215 (sha256
1216 (base32
1217 "1svzlbz2vripmyq2kjh0rig16bsrnbkwbsm558pjln9l65mcl4qq"))))
1218 (build-system gnu-build-system)
1219 (arguments
1220 '(#:configure-flags
1221 (list (string-append "--with-libfreeimage-prefix="
1222 (assoc-ref %build-inputs "freeimage"))
1223 (string-append "--with-libgslcblas-prefix="
1224 (assoc-ref %build-inputs "gsl")))))
1225 (native-inputs
1226 `(("pkg-config" ,pkg-config)))
1227 (propagated-inputs
1228 `(("guile" ,guile-2.0)
1229 ("guile-sdl" ,guile-sdl)
1230 ("guile-opengl" ,guile-opengl)))
1231 (inputs
1232 `(("gsl" ,gsl)
1233 ("freeimage" ,freeimage)
1234 ("mesa" ,mesa)))
1235 (synopsis "2D/3D game engine for GNU Guile")
1236 (description "Sly is a 2D/3D game engine written in Guile Scheme. Sly
1237 features a functional reactive programming interface and live coding
1238 capabilities.")
1239 (home-page "http://dthompson.us/pages/software/sly.html")
1240 (license license:gpl3+)))
1241
1242 (define-public g-wrap
1243 (package
1244 (name "g-wrap")
1245 (version "1.9.15")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (string-append "mirror://savannah/g-wrap/g-wrap-"
1249 version ".tar.gz"))
1250 (sha256
1251 (base32
1252 "0ak0bha37dfpj9kmyw1r8fj8nva639aw5xr66wr5gd3l1rqf5xhg"))))
1253 (build-system gnu-build-system)
1254 (native-inputs
1255 `(("pkg-config" ,pkg-config)))
1256 (propagated-inputs
1257 `(("guile" ,guile-2.0)
1258 ("guile-lib" ,guile-lib)))
1259 (inputs
1260 `(("libffi" ,libffi)))
1261 (arguments
1262 `(#:phases
1263 (modify-phases %standard-phases
1264 (add-before 'configure 'pre-configure
1265 (lambda* (#:key outputs #:allow-other-keys)
1266 (let ((out (assoc-ref outputs "out")))
1267 (substitute* (find-files "." "^Makefile.in$")
1268 (("guilemoduledir =.*guile/site" all)
1269 (string-append all "/2.0")))
1270 #t))))))
1271 (synopsis "Generate C bindings for Guile")
1272 (description "G-Wrap is a tool and Guile library for generating function
1273 wrappers for inter-language calls. It currently only supports generating Guile
1274 wrappers for C functions. Given a definition of the types and prototypes for
1275 a given C interface, G-Wrap will automatically generate the C code that
1276 provides access to that interface and its types from the Scheme level.")
1277 (home-page "http://www.nongnu.org/g-wrap/index.html")
1278 (license license:lgpl2.1+)))
1279
1280 (define-public guile-dbi
1281 (package
1282 (name "guile-dbi")
1283 (version "2.1.6")
1284 (source (origin
1285 (method url-fetch)
1286 (uri (string-append
1287 "http://download.gna.org/guile-dbi/guile-dbi-"
1288 version ".tar.gz"))
1289 (sha256
1290 (base32
1291 "116njrprhgrsv1qm904sp3b02rq01fx639r433d657gyhw3x159n"))))
1292 (build-system gnu-build-system)
1293 (arguments
1294 '(#:configure-flags
1295 (list (string-append
1296 "--with-guile-site-dir=" %output "/share/guile/site/2.0"))
1297 #:phases
1298 (modify-phases %standard-phases
1299 (add-after 'install 'patch-extension-path
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 (let* ((out (assoc-ref outputs "out"))
1302 (dbi.scm (string-append
1303 out "/share/guile/site/2.0/dbi/dbi.scm"))
1304 (ext (string-append out "/lib/libguile-dbi")))
1305 (substitute* dbi.scm (("libguile-dbi") ext))
1306 #t))))))
1307 (propagated-inputs
1308 `(("guile" ,guile-2.0)))
1309 (synopsis "Guile database abstraction layer")
1310 (home-page "http://home.gna.org/guile-dbi/guile-dbi.html")
1311 (description
1312 "guile-dbi is a library for Guile that provides a convenient interface to
1313 SQL databases. Database programming with guile-dbi is generic in that the same
1314 programming interface is presented regardless of which database system is used.
1315 It currently supports MySQL, Postgres and SQLite3.")
1316 (license license:gpl2+)))
1317
1318 (define-public guile-dbd-sqlite3
1319 (package
1320 (name "guile-dbd-sqlite3")
1321 (version "2.1.6")
1322 (source (origin
1323 (method url-fetch)
1324 (uri (string-append
1325 "http://download.gna.org/guile-dbi/guile-dbd-sqlite3-"
1326 version ".tar.gz"))
1327 (sha256
1328 (base32
1329 "0rg71jchxd2y8x496s8zmfmikr5g8zxi8zv2ar3f7a23pph92iw2"))))
1330 (build-system gnu-build-system)
1331 (native-inputs
1332 `(("pkg-config" ,pkg-config)))
1333 (inputs
1334 `(("sqlite" ,sqlite)
1335 ("zlib" ,(@ (gnu packages compression) zlib))))
1336 (propagated-inputs
1337 `(("guile-dbi" ,guile-dbi)))
1338 (synopsis "Guile DBI driver for SQLite")
1339 (home-page "https://github.com/jkalbhenn/guile-dbd-sqlite3")
1340 (description
1341 "guile-dbi is a library for Guile that provides a convenient interface to
1342 SQL databases. This package implements the interface for SQLite.")
1343 (license license:gpl2+)))
1344
1345 (define-public guile-xosd
1346 (package
1347 (name "guile-xosd")
1348 (version "0.2.1")
1349 (source (origin
1350 (method url-fetch)
1351 (uri (string-append "https://github.com/alezost/" name
1352 "/releases/download/v" version
1353 "/" name "-" version ".tar.gz"))
1354 (sha256
1355 (base32
1356 "1ri5065c16kmgrf2pysn2ymxjqi5302lhpb07wkl1jr75ym8fn8p"))))
1357 (build-system gnu-build-system)
1358 (native-inputs
1359 `(("pkg-config" ,pkg-config)))
1360 (inputs
1361 `(("guile" ,guile-2.0)
1362 ("libx11" ,libx11)
1363 ("libxext" ,libxext)
1364 ("libxinerama" ,libxinerama)
1365 ("xosd" ,xosd)))
1366 (home-page "https://github.com/alezost/guile-xosd")
1367 (synopsis "XOSD bindings for Guile")
1368 (description
1369 "Guile-XOSD provides Guile bindings for @code{libxosd},
1370 @uref{http://sourceforge.net/projects/libxosd/, the X On Screen Display
1371 library}.")
1372 (license license:gpl3+)))
1373
1374 (define-public guile-daemon
1375 (package
1376 (name "guile-daemon")
1377 (version "0.1.1")
1378 (source (origin
1379 (method url-fetch)
1380 (uri (string-append "https://github.com/alezost/" name
1381 "/releases/download/v" version
1382 "/" name "-" version ".tar.gz"))
1383 (sha256
1384 (base32
1385 "0wsq9l6a4sijq4i1r3kcddfaznsak2jc5k59gzkhs5il5d2kn5yi"))))
1386 (build-system gnu-build-system)
1387 (native-inputs
1388 `(("pkg-config" ,pkg-config)))
1389 (inputs
1390 `(("guile" ,guile-2.0)))
1391 (home-page "https://github.com/alezost/guile-daemon")
1392 (synopsis "Evaluate code in a running Guile process")
1393 (description
1394 "Guile-Daemon is a small Guile program that loads your initial
1395 configuration file, and then reads and evaluates Guile expressions that
1396 you send to a FIFO file.")
1397 (license license:gpl3+)))
1398
1399 (define-public guile-commonmark
1400 (package
1401 (name "guile-commonmark")
1402 (version "0.1")
1403 (source (origin
1404 (method url-fetch)
1405 (uri (string-append "https://github.com/OrangeShark/" name
1406 "/releases/download/v" version
1407 "/" name "-" version ".tar.gz"))
1408 (sha256
1409 (base32
1410 "12cb5fqvvgc87f5xp0ih5az305wnjia89l5jba83d0r2p8bfy0b0"))
1411 (modules '((guix build utils)))
1412 (snippet
1413 ;; Use the real effective version of Guile in directory names
1414 ;; instead of a hard-coded "/2.0".
1415 '(begin
1416 (substitute* "configure"
1417 (("ac_subst_vars='")
1418 "ac_subst_vars='GUILE_EFFECTIVE_VERSION\n"))
1419 (substitute* "Makefile.in"
1420 (("/site/2.0")
1421 "/site/@GUILE_EFFECTIVE_VERSION@"))))))
1422 (build-system gnu-build-system)
1423 (inputs
1424 `(("guile" ,guile-2.2)))
1425 (synopsis "CommonMark parser for Guile")
1426 (description
1427 "guile-commonmark is a library for parsing CommonMark, a fully specified
1428 variant of Markdown. The library is written in Guile Scheme and is designed
1429 to transform a CommonMark document to SXML. guile-commonmark tries to closely
1430 follow the @uref{http://commonmark.org/, CommonMark spec}, the main difference
1431 is no support for parsing block and inline level HTML.")
1432 (home-page "https://github.com/OrangeShark/guile-commonmark")
1433 (license license:lgpl3+)))
1434
1435 (define-public guile2.0-commonmark
1436 (package-for-guile-2.0 guile-commonmark))
1437 (define-public guile2.2-commonmark
1438 (deprecated-package "guile2.2-commonmark" guile-commonmark))
1439
1440 (define-public guile-bytestructures
1441 (package
1442 (name "guile-bytestructures")
1443 (version "20160726.53127f6")
1444 (source (origin
1445 (method git-fetch)
1446 (uri (git-reference
1447 (url "https://github.com/TaylanUB/scheme-bytestructures")
1448 (commit "53127f608caf64b34fa41c389b2743b546fbe9da")))
1449 (file-name (string-append name "-" version "-checkout"))
1450 (sha256
1451 (base32
1452 "0l4nx1vp9fkrgrgwjiycj7nx6wfjfd39rqamv4pmq7issi8mrywq"))))
1453 (build-system trivial-build-system)
1454 (arguments
1455 `(#:modules ((guix build utils))
1456 #:builder
1457 (begin
1458 (use-modules (guix build utils)
1459 (ice-9 match)
1460 (ice-9 popen)
1461 (ice-9 rdelim))
1462 (let* ((out (assoc-ref %outputs "out"))
1463 (guile (assoc-ref %build-inputs "guile"))
1464 (effective (read-line
1465 (open-pipe* OPEN_READ
1466 (string-append guile "/bin/guile")
1467 "-c" "(display (effective-version))")))
1468 (module-dir (string-append out "/share/guile/site/"
1469 effective))
1470 (source (assoc-ref %build-inputs "source"))
1471 (doc (string-append out "/share/doc/scheme-bytestructures"))
1472 (scm-files (filter (lambda (path)
1473 (not (string-prefix? "bytestructures/r7" path)))
1474 (with-directory-excursion source
1475 (find-files "bytestructures" "\\.scm$"))))
1476 (guild (string-append (assoc-ref %build-inputs "guile")
1477 "/bin/guild")))
1478 ;; Make installation directories.
1479 (mkdir-p doc)
1480
1481 ;; Compile .scm files and install.
1482 (chdir source)
1483 (setenv "GUILE_AUTO_COMPILE" "0")
1484 (for-each (lambda (file)
1485 (let* ((dest-file (string-append module-dir "/"
1486 file))
1487 (go-file (string-append module-dir "/"
1488 (substring file 0
1489 (string-rindex file #\.))
1490 ".go")))
1491 ;; Install source module.
1492 (mkdir-p (dirname dest-file))
1493 (copy-file file dest-file)
1494
1495 ;; Install compiled module.
1496 (mkdir-p (dirname go-file))
1497 (unless (zero? (system* guild "compile"
1498 "-L" source
1499 "-o" go-file
1500 file))
1501 (error (format #f "Failed to compile ~s to ~s!"
1502 file go-file)))))
1503 scm-files)
1504
1505 ;; Also copy over the README.
1506 (install-file "README.md" doc)
1507 #t))))
1508 (inputs
1509 `(("guile" ,guile-2.2)))
1510 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
1511 (synopsis "Structured access to bytevector contents for Guile")
1512 (description
1513 "Guile bytestructures offers a system imitating the type system
1514 of the C programming language, to be used on bytevectors. C's type
1515 system works on raw memory, and Guile works on bytevectors which are
1516 an abstraction over raw memory. It's also more powerful than the C
1517 type system, elevating types to first-class status.")
1518 (license license:gpl3+)))
1519
1520 (define-public guile-aspell
1521 (package
1522 (name "guile-aspell")
1523 (version "0.4")
1524 (source (origin
1525 (method url-fetch)
1526 (uri (string-append
1527 "http://lonelycactus.com/tarball/guile_aspell-"
1528 version ".tar.gz"))
1529 (sha256
1530 (base32
1531 "0vpk5xj9m9qc702z3khmkwhgpb949qbsyz8kw2qycda6qnxk0077"))))
1532 (build-system gnu-build-system)
1533 (arguments
1534 '(#:phases (modify-phases %standard-phases
1535 (add-before 'configure 'set-guilesitedir
1536 (lambda _
1537 (substitute* "Makefile.in"
1538 (("^guilesitedir =.*$")
1539 "guilesitedir = \
1540 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
1541 #t))
1542 (add-before 'build 'set-libaspell-file-name
1543 (lambda* (#:key inputs #:allow-other-keys)
1544 (let ((aspell (assoc-ref inputs "aspell")))
1545 (substitute* "aspell.scm"
1546 (("\"libaspell\\.so\"")
1547 (string-append "\"" aspell
1548 "/lib/libaspell\"")))
1549 #t))))))
1550 (native-inputs `(("pkg-config" ,pkg-config)))
1551 (inputs `(("guile" ,guile-2.2)
1552 ("aspell" ,aspell)))
1553 (home-page "https://github.com/spk121/guile-aspell")
1554 (synopsis "Spell-checking from Guile")
1555 (description
1556 "guile-aspell is a Guile Scheme library for comparing a string against a
1557 dictionary and suggesting spelling corrections.")
1558 (license license:gpl3+)))
1559
1560 (define-public guile-bash
1561 ;; This project is currently retired. It was initially announced here:
1562 ;; <https://lists.gnu.org/archive/html/guile-user/2015-02/msg00003.html>.
1563 (let ((commit "1eabc563ca5692b3e08d84f1f0e6fd2283284469")
1564 (revision "0"))
1565 (package
1566 (name "guile-bash")
1567 (version (string-append "0.1.6-" revision "." (string-take commit 7)))
1568 (home-page
1569 "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git")
1570 (source (origin
1571 (method git-fetch)
1572 (uri (git-reference
1573 (commit commit)
1574 (url home-page)))
1575 (sha256
1576 (base32
1577 "097vny990wp2qpjij6a5a5gwc6fxzg5wk56inhy18iki5v6pif1p"))
1578 (file-name (string-append name "-" version "-checkout"))))
1579 (build-system gnu-build-system)
1580 (arguments
1581 '(#:phases (modify-phases %standard-phases
1582 (add-after 'unpack 'bootstrap
1583 (lambda _
1584 (zero? (system* "sh" "bootstrap")))))
1585
1586 #:configure-flags
1587 ;; Add -I to match 'bash.pc' of Bash 4.4.
1588 (list (string-append "CPPFLAGS=-I"
1589 (assoc-ref %build-inputs "bash:include")
1590 "/include/bash/include")
1591
1592 ;; The '.a' file is useless.
1593 "--disable-static"
1594
1595 ;; Install 'lib/bash' as Bash 4.4 expects.
1596 (string-append "--libdir=" (assoc-ref %outputs "out")
1597 "/lib/bash"))))
1598 (native-inputs `(("pkg-config" ,pkg-config)
1599 ("autoconf" ,(autoconf-wrapper))
1600 ("automake" ,automake)
1601 ("libtool" ,libtool)
1602 ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
1603 ("gettext" ,gettext-minimal)))
1604 (inputs `(("guile" ,guile-2.0)
1605 ("bash:include" ,bash "include")))
1606 (synopsis "Extend Bash using Guile")
1607 (description
1608 "Guile-Bash provides a shared library and set of Guile modules,
1609 allowing you to extend Bash in Scheme. Scheme interfaces allow you to access
1610 the following aspects of Bash:
1611
1612 @itemize
1613 @item aliases;
1614 @item setting and getting Bash variables;
1615 @item creating dynamic variables;
1616 @item creating Bash functions with a Scheme implementation;
1617 @item reader macro for output capturing;
1618 @item reader macro for evaluating raw Bash commands.
1619 @end itemize
1620
1621 To enable it, run:
1622
1623 @example
1624 enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
1625 @end example
1626
1627 and then run @command{scm example.scm}.")
1628 (license license:gpl3+))))
1629
1630 (define-public guile-8sync
1631 (package
1632 (name "guile-8sync")
1633 (version "0.4.2")
1634 (source (origin
1635 (method url-fetch)
1636 (uri (string-append "mirror://gnu/8sync/8sync-" version
1637 ".tar.gz"))
1638 (sha256
1639 (base32
1640 "031wm13srak3wsnll7j2mbbi29g1pcm4swdb71ds9yn567pn20qw"))))
1641 (build-system gnu-build-system)
1642 (native-inputs `(("autoconf" ,autoconf)
1643 ("automake" ,automake)
1644 ("guile" ,guile-2.2)
1645 ("pkg-config" ,pkg-config)
1646 ("texinfo" ,texinfo)))
1647 (arguments
1648 `(#:phases (modify-phases %standard-phases
1649 (add-before 'configure 'setenv
1650 (lambda _
1651 ;; quiet warnings
1652 (setenv "GUILE_AUTO_COMPILE" "0")
1653 #t)))))
1654 (home-page "https://gnu.org/s/8sync/")
1655 (synopsis "Asynchronous actor model library for Guile")
1656 (description
1657 "GNU 8sync (pronounced \"eight-sync\") is an asynchronous programming
1658 library for GNU Guile based on the actor model.
1659
1660 Note that 8sync is only available for Guile 2.2.")
1661 (license license:lgpl3+)))
1662
1663 (define-public guile-fibers
1664 (package
1665 (name "guile-fibers")
1666 (version "1.0.0")
1667 (source (origin
1668 (method url-fetch)
1669 (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
1670 version ".tar.gz"))
1671 (sha256
1672 (base32
1673 "0vjkg72ghgdgphzbjz9ig8al8271rq8974viknb2r1rg4lz92ld0"))))
1674 (build-system gnu-build-system)
1675 (native-inputs
1676 `(("texinfo" ,texinfo)
1677 ("pkg-config" ,pkg-config)))
1678 (inputs
1679 `(("guile" ,guile-2.2)))
1680 (synopsis "Lightweight concurrency facility for Guile")
1681 (description
1682 "Fibers is a Guile library that implements a a lightweight concurrency
1683 facility, inspired by systems like Concurrent ML, Go, and Erlang. A fiber is
1684 like a \"goroutine\" from the Go language: a lightweight thread-like
1685 abstraction. Systems built with Fibers can scale up to millions of concurrent
1686 fibers, tens of thousands of concurrent socket connections, and many parallel
1687 cores. The Fibers library also provides Concurrent ML-like channels for
1688 communication between fibers.
1689
1690 Note that Fibers makes use of some Guile 2.1/2.2-specific features and
1691 is not available for Guile 2.0.")
1692 (home-page "https://github.com/wingo/fibers")
1693 (license license:lgpl3+)))
1694
1695 (define-public guile-git
1696 (let ((revision "1")
1697 (commit "96dfb3bdba39a37cf6aefb18e335118a6115f963"))
1698 (package
1699 (name "guile-git")
1700 (version (string-append "0.0-" revision "." (string-take commit 7)))
1701 (home-page "https://gitlab.com/amirouche/guile-git")
1702 (source (origin
1703 (method git-fetch)
1704 (uri (git-reference (url home-page) (commit commit)))
1705 (sha256
1706 (base32
1707 "0v73251kmh1vs7gp3jh4pk4rikl4d8illwi0gnhwa55ij1mn9apl"))
1708 (file-name (git-file-name name version))))
1709 (build-system gnu-build-system)
1710 (arguments
1711 '(#:phases (modify-phases %standard-phases
1712 (add-after 'unpack 'bootstrap
1713 (lambda _
1714 ;; Install .go files to "site-ccache", not "ccache".
1715 (substitute* "Makefile.am"
1716 (("/ccache")
1717 "/site-ccache"))
1718
1719 (zero? (system* "autoreconf" "-vfi")))))))
1720 (native-inputs
1721 `(("autoconf" ,autoconf)
1722 ("automake" ,automake)
1723 ("pkg-config" ,pkg-config)))
1724 (inputs
1725 `(("guile" ,guile-2.2)
1726 ("libgit2" ,libgit2)))
1727 (propagated-inputs
1728 `(("guile-bytestructures" ,guile-bytestructures)))
1729 (synopsis "Guile bindings for libgit2")
1730 (description
1731 "This package provides Guile bindings to libgit2, a library to
1732 manipulate repositories of the Git version control system.")
1733 (license license:gpl3+))))
1734
1735 ;;; guile.scm ends here