gnu: mumi: Update to 0.0.0-3.ea5a738.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
152d4076 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
0791437f
RW
3;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
4;;; Copyright © 2014, 2016, 2018 David Thompson <davet@gnu.org>
5;;; Copyright © 2014, 2017, 2018 Mark H Weaver <mhw@netris.org>
c5793e7e 6;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
c5793e7e 7;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
0791437f
RW
8;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
9;;; Copyright © 2016, 2019 Ricardo Wurmus <rekado@elephly.net>
aaf1bdc3 10;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
0791437f
RW
11;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
12;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
13;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
14;;; Copyright © 2017, 2018 Amirouche <amirouche@hypermove.net>
15;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
c8e3651a 16;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
0791437f 17;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
1722d680 18;;;
233e7676 19;;; This file is part of GNU Guix.
1722d680 20;;;
233e7676 21;;; GNU Guix is free software; you can redistribute it and/or modify it
1722d680
LC
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
233e7676 26;;; GNU Guix is distributed in the hope that it will be useful, but
1722d680
LC
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
233e7676 32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
1722d680 33
1ffa7090 34(define-module (gnu packages guile)
71e0f217 35 #:use-module ((guix licenses) #:prefix license:)
59a43334 36 #:use-module (gnu packages)
146c6b62
RW
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
9c782445 39 #:use-module (gnu packages bash)
1ffa7090 40 #:use-module (gnu packages bdw-gc)
148585c2 41 #:use-module (gnu packages compression)
255d1bbe 42 #:use-module (gnu packages dbm)
146c6b62 43 #:use-module (gnu packages flex)
1ffa7090 44 #:use-module (gnu packages gawk)
146c6b62 45 #:use-module (gnu packages gettext)
ee8ee748 46 #:use-module (gnu packages hurd)
1ffa7090 47 #:use-module (gnu packages libffi)
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)
cd0322a3 54 #:use-module (gnu packages sqlite)
f906d30c 55 #:use-module (gnu packages texinfo)
bd233722 56 #:use-module (gnu packages version-control)
1722d680 57 #:use-module (guix packages)
87f5d366 58 #:use-module (guix download)
6bc24063 59 #:use-module (guix git-download)
32795fcf 60 #:use-module (guix build-system gnu)
977d8666 61 #:use-module (guix build-system guile)
32795fcf 62 #:use-module (guix utils)
d4660a54
MC
63 #:use-module (ice-9 match)
64 #:use-module ((srfi srfi-1) #:prefix srfi-1:))
1722d680
LC
65
66;;; Commentary:
67;;;
c44899a2 68;;; GNU Guile, and modules and extensions.
1722d680
LC
69;;;
70;;; Code:
71
c44899a2
LC
72(define-public guile-1.8
73 (package
74 (name "guile")
75 (version "1.8.8")
76 (source (origin
87f5d366 77 (method url-fetch)
0db342a5 78 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
79 ".tar.gz"))
80 (sha256
81 (base32
01eafd38 82 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
fc1adab1 83 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
c44899a2
LC
84 (build-system gnu-build-system)
85 (arguments '(#:configure-flags '("--disable-error-on-warning")
c44899a2
LC
86
87 ;; Insert a phase before `configure' to patch things up.
dc1d3cde
KK
88 #:phases
89 (modify-phases %standard-phases
90 (add-before 'configure 'patch-stuff
91 (lambda* (#:key outputs #:allow-other-keys)
92 ;; Add a call to `lt_dladdsearchdir' so that
93 ;; `libguile-readline.so' & co. are in the
94 ;; loader's search path.
95 (substitute* "libguile/dynl.c"
96 (("lt_dlinit.*$" match)
97 (format #f
98 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
99 match
100 (assoc-ref outputs "out"))))
2f4fbe1c 101
dc1d3cde
KK
102 ;; The usual /bin/sh...
103 (substitute* "ice-9/popen.scm"
104 (("/bin/sh") (which "sh")))
105 #t)))))
01eafd38 106 (inputs `(("gawk" ,gawk)
c44899a2
LC
107 ("readline" ,readline)))
108
109 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
110 ;; propagated.
111 (propagated-inputs `(("gmp" ,gmp)
be11b102 112 ("libltdl" ,libltdl)))
c44899a2
LC
113
114 ;; When cross-compiling, a native version of Guile itself is needed.
115 (self-native-input? #t)
116
9be8d7c8
LC
117 (native-search-paths
118 (list (search-path-specification
119 (variable "GUILE_LOAD_PATH")
af070955 120 (files '("share/guile/site")))))
9be8d7c8 121
f50d2669 122 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 123 (description
a22dc0c4
LC
124 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
125official extension language of the GNU system. It is an implementation of
126the Scheme language which can be easily embedded in other applications to
127provide a convenient means of extending the functionality of the application
128without requiring the source code to be rewritten.")
6fd52309 129 (home-page "https://www.gnu.org/software/guile/")
71e0f217 130 (license license:lgpl2.0+)))
c44899a2
LC
131
132(define-public guile-2.0
133 (package
134 (name "guile")
b5efd14a 135 (version "2.0.14")
c44899a2 136 (source (origin
87f5d366 137 (method url-fetch)
0db342a5 138 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
139 ".tar.xz"))
140 (sha256
141 (base32
b5efd14a 142 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
c44899a2
LC
143 (build-system gnu-build-system)
144 (native-inputs `(("pkgconfig" ,pkg-config)))
145 (inputs `(("libffi" ,libffi)
88da729f 146 ,@(libiconv-if-needed)
baf549df
LC
147
148 ;; We need Bash when cross-compiling because some of the scripts
149 ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
150 ;; an interactive Bash with Readline and all.
151 ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
c44899a2
LC
152 (propagated-inputs
153 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
154 ;; reads `-lltdl -lunistring', adding them here will add the needed
155 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
156 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
157 ("libunistring" ,libunistring)
be11b102
LC
158
159 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
160 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
161 ("libltdl" ,libltdl)
c44899a2
LC
162
163 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
164 ;; must be propagated.
bda1bc6c 165 ("bdw-gc" ,libgc)
c44899a2
LC
166 ("gmp" ,gmp)))
167
168 (self-native-input? #t)
169
9bf62d9b
LC
170 (outputs '("out" "debug"))
171
8ffaa93b 172 (arguments
20897536
TGR
173 `(#:configure-flags '("--disable-static") ; saves 3 MiB
174 #:phases
175 (modify-phases %standard-phases
176 (add-before 'configure 'pre-configure
177 (lambda* (#:key inputs #:allow-other-keys)
178 ;; Tell (ice-9 popen) the file name of Bash.
179 (let ((bash (assoc-ref inputs "bash")))
180 (substitute* "module/ice-9/popen.scm"
181 ;; If bash is #f allow fallback for user to provide
182 ;; "bash" in PATH. This happens when cross-building to
183 ;; MinGW for which we do not have Bash yet.
184 (("/bin/sh")
185 ,@(if (target-mingw?)
186 '((if bash
187 (string-append bash "/bin/bash")
188 "bash"))
189 '((string-append bash "/bin/bash")))))
190 #t))))))
8ffaa93b 191
9be8d7c8
LC
192 (native-search-paths
193 (list (search-path-specification
194 (variable "GUILE_LOAD_PATH")
af070955 195 (files '("share/guile/site/2.0")))
9be8d7c8
LC
196 (search-path-specification
197 (variable "GUILE_LOAD_COMPILED_PATH")
b03f270e 198 (files '("lib/guile/2.0/site-ccache")))))
9be8d7c8 199
f50d2669 200 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 201 (description
a22dc0c4
LC
202 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
203official extension language of the GNU system. It is an implementation of
204the Scheme language which can be easily embedded in other applications to
205provide a convenient means of extending the functionality of the application
206without requiring the source code to be rewritten.")
6fd52309 207 (home-page "https://www.gnu.org/software/guile/")
71e0f217 208 (license license:lgpl3+)))
c44899a2 209
6f1ce09d
EB
210(define-public guile-2.0.13
211 ;; For testing a "minimal" Guix
212 (hidden-package
213 (package (inherit guile-2.0)
214 (name "guile")
215 (version "2.0.13")
216 (source (origin
217 (method url-fetch)
218 (uri (string-append "mirror://gnu/guile/guile-" version
219 ".tar.xz"))
220 (sha256
221 (base32
222 "12yqkr974y91ylgw6jnmci2v90i90s7h9vxa4zk0sai8vjnz4i1p")))))))
223
f6396d86 224(define-public guile-2.2
f906d30c 225 (package (inherit guile-2.0)
f6396d86 226 (name "guile")
2abd76e8 227 (version "2.2.4")
4eae7980
LC
228 (source (origin
229 (method url-fetch)
34d624ce
LC
230
231 ;; Note: we are limited to one of the compression formats
232 ;; supported by the bootstrap binaries, so no lzip here.
80a72572 233 (uri (string-append "mirror://gnu/guile/guile-" version
34d624ce 234 ".tar.xz"))
4eae7980
LC
235 (sha256
236 (base32
2abd76e8 237 "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r"))
d9f0788a
LC
238 (modules '((guix build utils)))
239
240 ;; Remove the pre-built object files. Instead, build everything
241 ;; from source, at the expense of significantly longer build
242 ;; times (almost 3 hours on a 4-core Intel i5).
6cbee49d
MW
243 (snippet '(begin
244 (for-each delete-file
245 (find-files "prebuilt" "\\.go$"))
246 #t))))
4fbd0f4f 247 (properties '((timeout . 72000) ;20 hours
16b0f205 248 (max-silent-time . 36000))) ;10 hours (needed on ARM
1577a658 249 ; when heavily loaded)
dd90ed89
DT
250 (native-search-paths
251 (list (search-path-specification
252 (variable "GUILE_LOAD_PATH")
253 (files '("share/guile/site/2.2")))
254 (search-path-specification
255 (variable "GUILE_LOAD_COMPILED_PATH")
b03f270e 256 (files '("lib/guile/2.2/site-ccache")))))
33c3a214
LC
257
258 (arguments
259 (if (%current-target-system)
260 (substitute-keyword-arguments (package-arguments guile-2.0)
261 ((#:phases phases '%standard-phases)
262 `(modify-phases ,phases
263 (add-after 'unpack 'sacrifice-elisp-support
264 (lambda _
265 ;; Cross-compiling language/elisp/boot.el fails, so
266 ;; sacrifice it. See
267 ;; <https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=988aa29238fca862c7e2cb55f15762a69b4c16ce>
268 ;; for the upstream fix.
269 (substitute* "module/Makefile.in"
270 (("language/elisp/boot\\.el")
271 "\n"))
ee8ee748
LC
272 #t))
273 ,@(if (hurd-target?)
274 `((add-after 'unpack 'allow-madvise-ENOSYS
275 (lambda _
276 ;; Do not warn about ENOSYS on 'madvise'. This is
277 ;; what Guile commit
278 ;; 45e4ace6603e00b297e6542362273041aebe7305 does.
279 ;; TODO: Remove for Guile >= 2.2.5.
280 (substitute* "libguile/vm.c"
281 (("perror \\(\"madvise failed\"\\)")
282 "if (errno != ENOSYS) perror (\"madvised failed\");"))
283 #t)))
284 '()))))
33c3a214 285 (package-arguments guile-2.0)))))
4eae7980 286
34d624ce
LC
287(define-public guile-2.2/fixed
288 ;; A package of Guile 2.2 that's rarely changed. It is the one used
289 ;; in the `base' module, and thus changing it entails a full rebuild.
290 (package
291 (inherit guile-2.2)
a9308efe 292 (properties '((hidden? . #t) ;people should install 'guile-2.2'
5a5b3632
MW
293 (timeout . 72000) ;20 hours
294 (max-silent-time . 36000))))) ;10 hours (needed on ARM
295 ; when heavily loaded)
34d624ce 296
5cd074ea 297(define-public guile-next
35f90377 298 ;; This is the upcoming Guile 3.0, with JIT support.
55b616fd
DT
299 (let ((commit "6f3357b0df64c4be17e72079864c09a542f1c779")
300 (revision "1"))
35f90377
LC
301 (package
302 (inherit guile-2.2)
303 (name "guile-next")
121f32a1 304 (version "2.9.1")
35f90377 305 (source (origin
121f32a1
LC
306 (inherit (package-source guile-2.2))
307 (uri (string-append "https://alpha.gnu.org/gnu/guile/guile-"
308 version ".tar.xz"))
35f90377
LC
309 (sha256
310 (base32
121f32a1 311 "0iba93yqn6mvgid0rfsrg4amym36pg9m8cqdplxsy222blrj9gh1"))))
e14b3067
DT
312 (native-search-paths
313 (list (search-path-specification
314 (variable "GUILE_LOAD_PATH")
315 (files '("share/guile/site/3.0")))
316 (search-path-specification
317 (variable "GUILE_LOAD_COMPILED_PATH")
318 (files '("lib/guile/3.0/site-ccache"
121f32a1
LC
319 "share/guile/site/3.0")))))
320 (properties '((ftp-server . "alpha.gnu.org")
321 (upstream-name . "guile"))))))
5cd074ea 322
2ba2c98d
LC
323(define (make-guile-readline guile)
324 (package
325 (name "guile-readline")
326 (version (package-version guile))
327 (source (package-source guile))
328 (build-system gnu-build-system)
329 (arguments
330 '(#:configure-flags '("--disable-silent-rules")
331 #:phases (modify-phases %standard-phases
332 (add-before 'build 'chdir
333 (lambda* (#:key outputs #:allow-other-keys)
334 (invoke "make" "-C" "libguile" "scmconfig.h")
335 (invoke "make" "-C" "lib")
336 (chdir "guile-readline")
337
338 (substitute* "Makefile"
339 (("../libguile/libguile-[[:graph:]]+\\.la")
340 ;; Remove dependency on libguile-X.Y.la.
341 "")
342 (("^READLINE_LIBS = (.*)$" _ libs)
343 ;; Link against the provided libguile.
344 (string-append "READLINE_LIBS = "
345 "-lguile-$(GUILE_EFFECTIVE_VERSION) "
346 libs "\n"))
347 (("\\$\\(top_builddir\\)/meta/build-env")
348 ;; Use the provided Guile, not the one from
349 ;; $(builddir).
350 "")
351
352 ;; Install modules to the 'site' directories.
353 (("^moddir = .*$")
354 "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
355 (("^ccachedir = .*$")
356 "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
357
358 ;; Load 'guile-readline.so' from the right place.
359 (substitute* "ice-9/readline.scm"
360 (("load-extension \"guile-readline\"")
361 (format #f "load-extension \
362 (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
363 (assoc-ref outputs "out"))))
364 #t)))))
365 (home-page (package-home-page guile))
366 (native-inputs (package-native-inputs guile))
367 (inputs
368 `(,@(package-inputs guile) ;to placate 'configure'
369 ,@(package-propagated-inputs guile)
370 ("guile" ,guile)
371 ("readline" ,readline)))
372 (synopsis "Line editing support for GNU Guile")
373 (description
374 "This module provides line editing support via the Readline library for
375GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
376@code{activate-readline} procedure to enable it.")
377 (license license:gpl3+)))
378
379(define-public guile-readline
380 (make-guile-readline guile-2.2))
381
8f4acad7
LC
382(define (guile-variant-package-name prefix)
383 (lambda (name)
384 "Return NAME with PREFIX instead of \"guile-\", when applicable."
385 (if (string-prefix? "guile-" name)
386 (string-append prefix "-"
387 (string-drop name
388 (string-length "guile-")))
389 name)))
947a5d47
LC
390
391(define package-for-guile-2.2
392 ;; A procedure that rewrites the dependency tree of the given package to use
f6396d86
LC
393 ;; GUILE-2.2 instead of GUILE-2.0.
394 (package-input-rewriting `((,guile-2.0 . ,guile-2.2))
8f4acad7
LC
395 (guile-variant-package-name "guile2.2")))
396
397(define package-for-guile-2.0
398 ;; Likewise, but the other way around. :-)
399 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
400 (guile-variant-package-name "guile2.0")))
947a5d47 401
4eae7980 402(define-public guile-for-guile-emacs
f6396d86 403 (package (inherit guile-2.2)
4eae7980
LC
404 (name "guile-for-guile-emacs")
405 (version "20150510.d8d9a8d")
f906d30c
CAW
406 (source (origin
407 (method git-fetch)
408 (uri (git-reference
4eae7980
LC
409 (url "git://git.hcoop.net/git/bpt/guile.git")
410 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
51988e3a 411 (file-name (string-append name "-" version "-checkout"))
f906d30c
CAW
412 (sha256
413 (base32
4eae7980 414 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
f906d30c 415 (arguments
8924e3fd
RW
416 `(;; Tests aren't passing for now.
417 ;; Obviously we should re-enable this!
418 #:tests? #f
419 ,@(package-arguments guile-2.2)))
f906d30c
CAW
420 (native-inputs
421 `(("autoconf" ,autoconf)
422 ("automake" ,automake)
423 ("libtool" ,libtool)
424 ("flex" ,flex)
425 ("texinfo" ,texinfo)
b94a6ca0 426 ("gettext" ,gettext-minimal)
f6396d86 427 ,@(package-native-inputs guile-2.2)))
daeb61f7
RW
428 ;; Same as in guile-2.0
429 (native-search-paths
430 (list (search-path-specification
431 (variable "GUILE_LOAD_PATH")
432 (files '("share/guile/site/2.0")))
433 (search-path-specification
434 (variable "GUILE_LOAD_COMPILED_PATH")
31769b9f 435 (files '("lib/guile/2.0/site-ccache"
daeb61f7 436 "share/guile/site/2.0")))))))
be3feafe 437
c44899a2
LC
438\f
439;;;
440;;; Extensions.
441;;;
442
6050a1fb
CR
443(define-public guile-json
444 (package
445 (name "guile-json")
15214828 446 (version "1.2.0")
f52ef55e 447 (home-page "https://github.com/aconchillo/guile-json")
6050a1fb 448 (source (origin
ffc72ec6 449 (method url-fetch)
6efccabe
EB
450 (uri (string-append "https://download.savannah.nongnu.org/releases/"
451 name "/" name "-" version ".tar.gz"))
ffc72ec6
LC
452 (sha256
453 (base32
6efccabe 454 "15gnb84d7hpazqhskkf3g9z4r6knw54wfj4ch5270kakz1lp70c9"))))
6050a1fb 455 (build-system gnu-build-system)
6efccabe 456 (native-inputs `(("pkg-config" ,pkg-config)
f52ef55e
LC
457 ("guile" ,guile-2.2)))
458 (inputs `(("guile" ,guile-2.2)))
6050a1fb
CR
459 (synopsis "JSON module for Guile")
460 (description
0f31d4f0
LC
461 "Guile-JSON supports parsing and building JSON documents according to the
462specification. These are the main features:
463
464@itemize
465@item Strictly complies to @uref{http://json.org, specification}.
466@item Build JSON documents programmatically via macros.
467@item Unicode support for strings.
468@item Allows JSON pretty printing.
469@end itemize\n")
15214828
LC
470
471 ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+).
472 (license license:gpl3+)))
6050a1fb 473
947a5d47 474(define-public guile2.2-json
2252f087
LC
475 (deprecated-package "guile2.2-json" guile-json))
476
477(define-public guile2.0-json
478 (package-for-guile-2.0 guile-json))
947a5d47 479
152d4076
LC
480(define-public guile-json-3
481 ;; This version is incompatible with 1.x; see the 'NEWS' file.
482 (package
483 (inherit guile-json)
484 (name "guile-json")
485 (version "3.1.0")
486 (source (origin
487 (method url-fetch)
488 (uri (string-append "https://download.savannah.nongnu.org/releases/"
489 name "/" name "-" version ".tar.gz"))
490 (sha256
491 (base32
492 "1yfqscz74i4vxylabd3s9l0wbdp8bg9qxnv1ixdm3b1l7zdx00z3"))))))
493
93e7199b
CAW
494;; There are two guile-gdbm packages, one using the FFI and one with
495;; direct C bindings, hence the verbose name.
496
497(define-public guile-gdbm-ffi
498 (package
499 (name "guile-gdbm-ffi")
500 (version "20120209.fa1d5b6")
501 (source (origin
502 (method git-fetch)
503 (uri (git-reference
504 (url "https://github.com/ijp/guile-gdbm.git")
505 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
821f4dc2 506 (file-name (string-append name "-" version "-checkout"))
977d8666
LC
507 (patches (search-patches
508 "guile-gdbm-ffi-support-gdbm-1.14.patch"))
93e7199b
CAW
509 (sha256
510 (base32
511 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
977d8666
LC
512 (build-system guile-build-system)
513 (arguments
514 '(#:phases (modify-phases %standard-phases
515 (add-after 'unpack 'move-examples
516 (lambda* (#:key outputs #:allow-other-keys)
517 ;; Move examples where they belong.
518 (let* ((out (assoc-ref outputs "out"))
519 (doc (string-append out "/share/doc/"
520 (strip-store-file-name out)
521 "/examples")))
522 (copy-recursively "examples" doc)
523 (delete-file-recursively "examples")
524 #t)))
525 (add-after 'unpack 'set-libgdbm-file-name
526 (lambda* (#:key inputs #:allow-other-keys)
527 (substitute* "gdbm.scm"
528 (("\\(dynamic-link \"libgdbm\"\\)")
529 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
530 (assoc-ref inputs "gdbm"))))
531 #t)))))
532 (native-inputs
533 `(("guile" ,guile-2.2)))
56f31a9f 534 (inputs
56f31a9f 535 `(("gdbm" ,gdbm)))
93e7199b
CAW
536 (home-page "https://github.com/ijp/guile-gdbm")
537 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
538 (description
539 "Guile bindings to the GDBM key-value storage system, using
540Guile's foreign function interface.")
71e0f217 541 (license license:gpl3+)))
93e7199b 542
5bd3a841
LC
543(define-public guile2.0-gdbm-ffi
544 (package-for-guile-2.0 guile-gdbm-ffi))
545
2737bcff 546(define-public guile2.2-gdbm-ffi
5bd3a841 547 (deprecated-package "guile2.2-gdbm-ffi" guile-gdbm-ffi))
93e7199b 548
e8ac1f8f 549(define-public guile-sqlite3
319e26e4
LC
550 (package
551 (name "guile-sqlite3")
552 (version "0.1.0")
3527f600 553 (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git")
319e26e4
LC
554 (source (origin
555 (method git-fetch)
556 (uri (git-reference
557 (url home-page)
558 (commit (string-append "v" version))))
559 (sha256
560 (base32
561 "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
562 (file-name (string-append name "-" version "-checkout"))))
563 (build-system gnu-build-system)
564 (native-inputs
565 `(("autoconf" ,autoconf)
566 ("automake" ,automake)
567 ("pkg-config" ,pkg-config)))
568 (inputs
569 `(("guile" ,guile-2.2)
570 ("sqlite" ,sqlite)))
571 (synopsis "Access SQLite databases from Guile")
572 (description
573 "This package provides Guile bindings to the SQLite database system.")
574 (license license:gpl3+)))
e8ac1f8f 575
c8e3651a
EB
576(define-public guile2.0-sqlite3
577 (package-for-guile-2.0 guile-sqlite3))
578
3b5783fc
AB
579(define-public guile-bytestructures
580 (package
581 (name "guile-bytestructures")
db58e326 582 (version "1.0.5")
3b5783fc 583 (source (origin
4f85f7f7 584 (method url-fetch)
585 (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
586 "/releases/download/v" version
587 "/bytestructures-" version ".tar.gz"))
3b5783fc
AB
588 (sha256
589 (base32
db58e326 590 "0ibk7fjwpb450lnrva4bx45sgln3pbyb645az4ansvh1spgani43"))))
4f85f7f7 591 (build-system gnu-build-system)
726ecfeb 592 (native-inputs
4f85f7f7 593 `(("pkg-config" ,pkg-config)))
3b5783fc 594 (inputs
aabece2e 595 `(("guile" ,guile-2.2)))
3b5783fc
AB
596 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
597 (synopsis "Structured access to bytevector contents for Guile")
598 (description
599 "Guile bytestructures offers a system imitating the type system
600of the C programming language, to be used on bytevectors. C's type
601system works on raw memory, and Guile works on bytevectors which are
602an abstraction over raw memory. It's also more powerful than the C
603type system, elevating types to first-class status.")
71e0f217 604 (license license:gpl3+)))
3b5783fc 605
726ecfeb
LC
606(define-public guile2.0-bytestructures
607 (package-for-guile-2.0 guile-bytestructures))
608
bd233722 609(define-public guile-git
e85035c9
LC
610 (package
611 (name "guile-git")
612 (version "0.1.0")
613 (home-page "https://gitlab.com/guile-git/guile-git.git")
614 (source (origin
615 (method git-fetch)
616 (uri (git-reference (url home-page)
617 (commit (string-append "v" version))))
618 (sha256
619 (base32
620 "1z3awa3i5il08dl2swbnli2j7cawdpray11zx4844j27bxqddcs2"))
621 (file-name (git-file-name name version))))
622 (build-system gnu-build-system)
623 (native-inputs
624 `(("autoconf" ,autoconf)
625 ("automake" ,automake)
626 ("texinfo" ,texinfo)
627 ("pkg-config" ,pkg-config)))
628 (inputs
629 `(("guile" ,guile-2.2)
630 ("libgit2" ,libgit2)))
631 (propagated-inputs
632 `(("guile-bytestructures" ,guile-bytestructures)))
633 (synopsis "Guile bindings for libgit2")
634 (description
635 "This package provides Guile bindings to libgit2, a library to
bd233722 636manipulate repositories of the Git version control system.")
e85035c9 637 (license license:gpl3+)))
c5793e7e 638
70bc6085
LC
639(define-public guile2.0-git
640 (package-for-guile-2.0 guile-git))
641
1722d680 642;;; guile.scm ends here
a8307a17 643