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