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