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