gnu: guile-gcrypt: Fix cross-compilation.
[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)))))
528ea990
LC
106
107 ;; When cross-compiling, a native version of Guile itself is needed.
108 (native-inputs (if (%current-target-system)
109 `(("self" ,this-package))
110 '()))
111
01eafd38 112 (inputs `(("gawk" ,gawk)
c44899a2
LC
113 ("readline" ,readline)))
114
115 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
116 ;; propagated.
117 (propagated-inputs `(("gmp" ,gmp)
be11b102 118 ("libltdl" ,libltdl)))
c44899a2 119
9be8d7c8
LC
120 (native-search-paths
121 (list (search-path-specification
122 (variable "GUILE_LOAD_PATH")
af070955 123 (files '("share/guile/site")))))
9be8d7c8 124
f50d2669 125 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 126 (description
a22dc0c4
LC
127 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
128official extension language of the GNU system. It is an implementation of
129the Scheme language which can be easily embedded in other applications to
130provide a convenient means of extending the functionality of the application
131without requiring the source code to be rewritten.")
6fd52309 132 (home-page "https://www.gnu.org/software/guile/")
71e0f217 133 (license license:lgpl2.0+)))
c44899a2
LC
134
135(define-public guile-2.0
136 (package
137 (name "guile")
b5efd14a 138 (version "2.0.14")
c44899a2 139 (source (origin
87f5d366 140 (method url-fetch)
0db342a5 141 (uri (string-append "mirror://gnu/guile/guile-" version
c44899a2
LC
142 ".tar.xz"))
143 (sha256
144 (base32
b5efd14a 145 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
c44899a2 146 (build-system gnu-build-system)
528ea990
LC
147
148 ;; When cross-compiling, a native version of Guile itself is needed.
149 (native-inputs `(,@(if (%current-target-system)
150 `(("self" ,this-package))
151 '())
152 ("pkgconfig" ,pkg-config)))
c44899a2 153 (inputs `(("libffi" ,libffi)
88da729f 154 ,@(libiconv-if-needed)
baf549df
LC
155
156 ;; We need Bash when cross-compiling because some of the scripts
157 ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
158 ;; an interactive Bash with Readline and all.
159 ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
c44899a2
LC
160 (propagated-inputs
161 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
162 ;; reads `-lltdl -lunistring', adding them here will add the needed
163 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
164 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
165 ("libunistring" ,libunistring)
be11b102
LC
166
167 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
168 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
169 ("libltdl" ,libltdl)
c44899a2
LC
170
171 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
172 ;; must be propagated.
bda1bc6c 173 ("bdw-gc" ,libgc)
c44899a2
LC
174 ("gmp" ,gmp)))
175
9bf62d9b
LC
176 (outputs '("out" "debug"))
177
8ffaa93b 178 (arguments
20897536
TGR
179 `(#:configure-flags '("--disable-static") ; saves 3 MiB
180 #:phases
181 (modify-phases %standard-phases
182 (add-before 'configure 'pre-configure
183 (lambda* (#:key inputs #:allow-other-keys)
184 ;; Tell (ice-9 popen) the file name of Bash.
185 (let ((bash (assoc-ref inputs "bash")))
186 (substitute* "module/ice-9/popen.scm"
187 ;; If bash is #f allow fallback for user to provide
188 ;; "bash" in PATH. This happens when cross-building to
189 ;; MinGW for which we do not have Bash yet.
190 (("/bin/sh")
191 ,@(if (target-mingw?)
192 '((if bash
193 (string-append bash "/bin/bash")
194 "bash"))
195 '((string-append bash "/bin/bash")))))
196 #t))))))
8ffaa93b 197
9be8d7c8
LC
198 (native-search-paths
199 (list (search-path-specification
200 (variable "GUILE_LOAD_PATH")
af070955 201 (files '("share/guile/site/2.0")))
9be8d7c8
LC
202 (search-path-specification
203 (variable "GUILE_LOAD_COMPILED_PATH")
b03f270e 204 (files '("lib/guile/2.0/site-ccache")))))
9be8d7c8 205
f50d2669 206 (synopsis "Scheme implementation intended especially for extensions")
c44899a2 207 (description
a22dc0c4
LC
208 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
209official extension language of the GNU system. It is an implementation of
210the Scheme language which can be easily embedded in other applications to
211provide a convenient means of extending the functionality of the application
212without requiring the source code to be rewritten.")
6fd52309 213 (home-page "https://www.gnu.org/software/guile/")
71e0f217 214 (license license:lgpl3+)))
c44899a2 215
f6396d86 216(define-public guile-2.2
f906d30c 217 (package (inherit guile-2.0)
f6396d86 218 (name "guile")
1c94df8a 219 (version "2.2.6")
4eae7980
LC
220 (source (origin
221 (method url-fetch)
34d624ce
LC
222
223 ;; Note: we are limited to one of the compression formats
224 ;; supported by the bootstrap binaries, so no lzip here.
80a72572 225 (uri (string-append "mirror://gnu/guile/guile-" version
34d624ce 226 ".tar.xz"))
4eae7980
LC
227 (sha256
228 (base32
1c94df8a 229 "1269ymxm56j1z1lvq1y42rm961f2n7rinm3k6l00p9k52hrpcddk"))
d9f0788a 230 (modules '((guix build utils)))
44f07d1d
CD
231 (patches (search-patches
232 "guile-2.2-skip-oom-test.patch"))
d9f0788a
LC
233
234 ;; Remove the pre-built object files. Instead, build everything
235 ;; from source, at the expense of significantly longer build
236 ;; times (almost 3 hours on a 4-core Intel i5).
6cbee49d
MW
237 (snippet '(begin
238 (for-each delete-file
239 (find-files "prebuilt" "\\.go$"))
240 #t))))
4fbd0f4f 241 (properties '((timeout . 72000) ;20 hours
16b0f205 242 (max-silent-time . 36000))) ;10 hours (needed on ARM
1577a658 243 ; when heavily loaded)
dd90ed89
DT
244 (native-search-paths
245 (list (search-path-specification
246 (variable "GUILE_LOAD_PATH")
247 (files '("share/guile/site/2.2")))
248 (search-path-specification
249 (variable "GUILE_LOAD_COMPILED_PATH")
1dcca83a 250 (files '("lib/guile/2.2/site-ccache")))))))
4eae7980 251
34d624ce
LC
252(define-public guile-2.2/fixed
253 ;; A package of Guile 2.2 that's rarely changed. It is the one used
254 ;; in the `base' module, and thus changing it entails a full rebuild.
255 (package
256 (inherit guile-2.2)
a9308efe 257 (properties '((hidden? . #t) ;people should install 'guile-2.2'
5a5b3632
MW
258 (timeout . 72000) ;20 hours
259 (max-silent-time . 36000))))) ;10 hours (needed on ARM
260 ; when heavily loaded)
8400d097
LC
261(define-public guile-2.2.4
262 (package/inherit
263 guile-2.2
264 (version "2.2.4")
265 (source (origin
266 (inherit (package-source guile-2.2))
267 (uri (string-append "mirror://gnu/guile/guile-" version
268 ".tar.xz"))
269 (sha256
270 (base32
271 "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r"))))))
34d624ce 272
5cd074ea 273(define-public guile-next
35f90377 274 ;; This is the upcoming Guile 3.0, with JIT support.
2d0e802f
DT
275 (package
276 (inherit guile-2.2)
277 (name "guile-next")
2ae1c752 278 (version "2.9.4")
2d0e802f
DT
279 (source (origin
280 (inherit (package-source guile-2.2))
281 (uri (string-append "ftp://alpha.gnu.org/gnu/guile/guile-"
282 version ".tar.xz"))
283 (sha256
284 (base32
2ae1c752 285 "1milviqhipyfx400pqhngxpxyajalzwmp597dxn5514pkk0g7v0p"))))
2d0e802f
DT
286 (native-search-paths
287 (list (search-path-specification
288 (variable "GUILE_LOAD_PATH")
289 (files '("share/guile/site/3.0")))
290 (search-path-specification
291 (variable "GUILE_LOAD_COMPILED_PATH")
292 (files '("lib/guile/3.0/site-ccache"
293 "share/guile/site/3.0")))))
294 (properties '((ftp-server . "alpha.gnu.org")
295 (upstream-name . "guile")))))
5cd074ea 296
2ba2c98d
LC
297(define (make-guile-readline guile)
298 (package
299 (name "guile-readline")
300 (version (package-version guile))
301 (source (package-source guile))
302 (build-system gnu-build-system)
303 (arguments
304 '(#:configure-flags '("--disable-silent-rules")
305 #:phases (modify-phases %standard-phases
306 (add-before 'build 'chdir
307 (lambda* (#:key outputs #:allow-other-keys)
308 (invoke "make" "-C" "libguile" "scmconfig.h")
309 (invoke "make" "-C" "lib")
310 (chdir "guile-readline")
311
312 (substitute* "Makefile"
313 (("../libguile/libguile-[[:graph:]]+\\.la")
314 ;; Remove dependency on libguile-X.Y.la.
315 "")
316 (("^READLINE_LIBS = (.*)$" _ libs)
317 ;; Link against the provided libguile.
318 (string-append "READLINE_LIBS = "
319 "-lguile-$(GUILE_EFFECTIVE_VERSION) "
320 libs "\n"))
321 (("\\$\\(top_builddir\\)/meta/build-env")
322 ;; Use the provided Guile, not the one from
323 ;; $(builddir).
324 "")
325
326 ;; Install modules to the 'site' directories.
327 (("^moddir = .*$")
328 "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
329 (("^ccachedir = .*$")
330 "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
331
332 ;; Load 'guile-readline.so' from the right place.
333 (substitute* "ice-9/readline.scm"
334 (("load-extension \"guile-readline\"")
335 (format #f "load-extension \
336 (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
337 (assoc-ref outputs "out"))))
338 #t)))))
339 (home-page (package-home-page guile))
340 (native-inputs (package-native-inputs guile))
341 (inputs
342 `(,@(package-inputs guile) ;to placate 'configure'
343 ,@(package-propagated-inputs guile)
344 ("guile" ,guile)
345 ("readline" ,readline)))
346 (synopsis "Line editing support for GNU Guile")
347 (description
348 "This module provides line editing support via the Readline library for
349GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
350@code{activate-readline} procedure to enable it.")
351 (license license:gpl3+)))
352
353(define-public guile-readline
354 (make-guile-readline guile-2.2))
355
8f4acad7
LC
356(define (guile-variant-package-name prefix)
357 (lambda (name)
358 "Return NAME with PREFIX instead of \"guile-\", when applicable."
359 (if (string-prefix? "guile-" name)
360 (string-append prefix "-"
361 (string-drop name
362 (string-length "guile-")))
363 name)))
947a5d47 364
8f4acad7 365(define package-for-guile-2.0
10b507b2
LC
366 ;; A procedure that rewrites the dependency tree of the given package to use
367 ;; GUILE-2.0 instead of GUILE-2.2.
c9c51ac3 368 (package-input-rewriting `((,guile-2.2 . ,guile-2.0))
8f4acad7 369 (guile-variant-package-name "guile2.0")))
947a5d47 370
89a99d53
LC
371(define package-for-guile-3.0
372 (package-input-rewriting `((,guile-2.2 . ,guile-next))
373 (guile-variant-package-name "guile3.0")))
374
4eae7980 375(define-public guile-for-guile-emacs
f6396d86 376 (package (inherit guile-2.2)
4eae7980
LC
377 (name "guile-for-guile-emacs")
378 (version "20150510.d8d9a8d")
f906d30c
CAW
379 (source (origin
380 (method git-fetch)
381 (uri (git-reference
4eae7980
LC
382 (url "git://git.hcoop.net/git/bpt/guile.git")
383 (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
51988e3a 384 (file-name (string-append name "-" version "-checkout"))
f906d30c
CAW
385 (sha256
386 (base32
4eae7980 387 "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
f906d30c 388 (arguments
8924e3fd
RW
389 `(;; Tests aren't passing for now.
390 ;; Obviously we should re-enable this!
391 #:tests? #f
392 ,@(package-arguments guile-2.2)))
f906d30c
CAW
393 (native-inputs
394 `(("autoconf" ,autoconf)
395 ("automake" ,automake)
396 ("libtool" ,libtool)
397 ("flex" ,flex)
398 ("texinfo" ,texinfo)
b94a6ca0 399 ("gettext" ,gettext-minimal)
f6396d86 400 ,@(package-native-inputs guile-2.2)))
daeb61f7
RW
401 ;; Same as in guile-2.0
402 (native-search-paths
403 (list (search-path-specification
404 (variable "GUILE_LOAD_PATH")
405 (files '("share/guile/site/2.0")))
406 (search-path-specification
407 (variable "GUILE_LOAD_COMPILED_PATH")
31769b9f 408 (files '("lib/guile/2.0/site-ccache"
daeb61f7 409 "share/guile/site/2.0")))))))
be3feafe 410
c44899a2
LC
411\f
412;;;
413;;; Extensions.
414;;;
415
6050a1fb
CR
416(define-public guile-json
417 (package
418 (name "guile-json")
15214828 419 (version "1.2.0")
f52ef55e 420 (home-page "https://github.com/aconchillo/guile-json")
6050a1fb 421 (source (origin
ffc72ec6 422 (method url-fetch)
28123c01
LC
423 (uri (string-append "mirror://savannah/guile-json/guile-json-"
424 version ".tar.gz"))
ffc72ec6
LC
425 (sha256
426 (base32
6efccabe 427 "15gnb84d7hpazqhskkf3g9z4r6knw54wfj4ch5270kakz1lp70c9"))))
6050a1fb 428 (build-system gnu-build-system)
6efccabe 429 (native-inputs `(("pkg-config" ,pkg-config)
f52ef55e
LC
430 ("guile" ,guile-2.2)))
431 (inputs `(("guile" ,guile-2.2)))
6050a1fb
CR
432 (synopsis "JSON module for Guile")
433 (description
0f31d4f0
LC
434 "Guile-JSON supports parsing and building JSON documents according to the
435specification. These are the main features:
436
437@itemize
438@item Strictly complies to @uref{http://json.org, specification}.
439@item Build JSON documents programmatically via macros.
440@item Unicode support for strings.
441@item Allows JSON pretty printing.
442@end itemize\n")
15214828
LC
443
444 ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+).
445 (license license:gpl3+)))
6050a1fb 446
584a3ca3
LC
447(define-public guile-json-1
448 ;; This is the 1.x branch of Guile-JSON.
449 guile-json)
450
2252f087
LC
451(define-public guile2.0-json
452 (package-for-guile-2.0 guile-json))
947a5d47 453
152d4076
LC
454(define-public guile-json-3
455 ;; This version is incompatible with 1.x; see the 'NEWS' file.
456 (package
457 (inherit guile-json)
458 (name "guile-json")
4e029919 459 (version "3.2.0")
152d4076
LC
460 (source (origin
461 (method url-fetch)
28123c01
LC
462 (uri (string-append "mirror://savannah/guile-json/guile-json-"
463 version ".tar.gz"))
152d4076
LC
464 (sha256
465 (base32
4e029919 466 "14m6b6g2maw0mkvfm4x63rqb54vgbpn1gcqs715ijw4bikfzlqfz"))))))
152d4076 467
89a99d53
LC
468(define-public guile3.0-json
469 (package-for-guile-3.0 guile-json-3))
470
93e7199b
CAW
471;; There are two guile-gdbm packages, one using the FFI and one with
472;; direct C bindings, hence the verbose name.
473
474(define-public guile-gdbm-ffi
475 (package
476 (name "guile-gdbm-ffi")
477 (version "20120209.fa1d5b6")
478 (source (origin
479 (method git-fetch)
480 (uri (git-reference
481 (url "https://github.com/ijp/guile-gdbm.git")
482 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
821f4dc2 483 (file-name (string-append name "-" version "-checkout"))
977d8666
LC
484 (patches (search-patches
485 "guile-gdbm-ffi-support-gdbm-1.14.patch"))
93e7199b
CAW
486 (sha256
487 (base32
488 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
977d8666
LC
489 (build-system guile-build-system)
490 (arguments
491 '(#:phases (modify-phases %standard-phases
492 (add-after 'unpack 'move-examples
493 (lambda* (#:key outputs #:allow-other-keys)
494 ;; Move examples where they belong.
495 (let* ((out (assoc-ref outputs "out"))
496 (doc (string-append out "/share/doc/"
497 (strip-store-file-name out)
498 "/examples")))
499 (copy-recursively "examples" doc)
500 (delete-file-recursively "examples")
501 #t)))
502 (add-after 'unpack 'set-libgdbm-file-name
503 (lambda* (#:key inputs #:allow-other-keys)
504 (substitute* "gdbm.scm"
505 (("\\(dynamic-link \"libgdbm\"\\)")
506 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
507 (assoc-ref inputs "gdbm"))))
508 #t)))))
509 (native-inputs
510 `(("guile" ,guile-2.2)))
56f31a9f 511 (inputs
56f31a9f 512 `(("gdbm" ,gdbm)))
93e7199b
CAW
513 (home-page "https://github.com/ijp/guile-gdbm")
514 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
515 (description
516 "Guile bindings to the GDBM key-value storage system, using
517Guile's foreign function interface.")
71e0f217 518 (license license:gpl3+)))
93e7199b 519
5bd3a841
LC
520(define-public guile2.0-gdbm-ffi
521 (package-for-guile-2.0 guile-gdbm-ffi))
522
89a99d53
LC
523(define-public guile3.0-gdbm-ffi
524 (package-for-guile-3.0 guile-gdbm-ffi))
93e7199b 525
e8ac1f8f 526(define-public guile-sqlite3
319e26e4
LC
527 (package
528 (name "guile-sqlite3")
529 (version "0.1.0")
3527f600 530 (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git")
319e26e4
LC
531 (source (origin
532 (method git-fetch)
533 (uri (git-reference
534 (url home-page)
535 (commit (string-append "v" version))))
536 (sha256
537 (base32
538 "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
539 (file-name (string-append name "-" version "-checkout"))))
540 (build-system gnu-build-system)
541 (native-inputs
542 `(("autoconf" ,autoconf)
543 ("automake" ,automake)
544 ("pkg-config" ,pkg-config)))
545 (inputs
546 `(("guile" ,guile-2.2)
547 ("sqlite" ,sqlite)))
548 (synopsis "Access SQLite databases from Guile")
549 (description
550 "This package provides Guile bindings to the SQLite database system.")
551 (license license:gpl3+)))
e8ac1f8f 552
c8e3651a
EB
553(define-public guile2.0-sqlite3
554 (package-for-guile-2.0 guile-sqlite3))
555
3b5783fc
AB
556(define-public guile-bytestructures
557 (package
558 (name "guile-bytestructures")
b29d6abc 559 (version "1.0.6")
3b5783fc 560 (source (origin
4f85f7f7 561 (method url-fetch)
562 (uri (string-append "https://github.com/TaylanUB/scheme-bytestructures"
563 "/releases/download/v" version
564 "/bytestructures-" version ".tar.gz"))
3b5783fc
AB
565 (sha256
566 (base32
b29d6abc 567 "07dffrmc6cnw9mmw0pdrqlkbhzzpz0hm8p26z738l2j5i84dypnk"))))
4f85f7f7 568 (build-system gnu-build-system)
726ecfeb 569 (native-inputs
4f85f7f7 570 `(("pkg-config" ,pkg-config)))
3b5783fc 571 (inputs
aabece2e 572 `(("guile" ,guile-2.2)))
3b5783fc
AB
573 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
574 (synopsis "Structured access to bytevector contents for Guile")
575 (description
576 "Guile bytestructures offers a system imitating the type system
577of the C programming language, to be used on bytevectors. C's type
578system works on raw memory, and Guile works on bytevectors which are
579an abstraction over raw memory. It's also more powerful than the C
580type system, elevating types to first-class status.")
abba4073
LC
581 (license license:gpl3+)
582 (properties '((upstream-name . "bytestructures")))))
3b5783fc 583
726ecfeb
LC
584(define-public guile2.0-bytestructures
585 (package-for-guile-2.0 guile-bytestructures))
586
89a99d53
LC
587(define-public guile3.0-bytestructures
588 (package-for-guile-3.0 guile-bytestructures))
589
bd233722 590(define-public guile-git
e85035c9
LC
591 (package
592 (name "guile-git")
db9771a9 593 (version "0.2.0")
e85035c9
LC
594 (home-page "https://gitlab.com/guile-git/guile-git.git")
595 (source (origin
596 (method git-fetch)
597 (uri (git-reference (url home-page)
598 (commit (string-append "v" version))))
599 (sha256
600 (base32
db9771a9 601 "018hmfsh0rjwfvr4h7y10jc6k8a2k9xsirngghy3pjasin4nd2yz"))
e85035c9
LC
602 (file-name (git-file-name name version))))
603 (build-system gnu-build-system)
604 (native-inputs
605 `(("autoconf" ,autoconf)
606 ("automake" ,automake)
607 ("texinfo" ,texinfo)
608 ("pkg-config" ,pkg-config)))
609 (inputs
610 `(("guile" ,guile-2.2)
611 ("libgit2" ,libgit2)))
612 (propagated-inputs
613 `(("guile-bytestructures" ,guile-bytestructures)))
614 (synopsis "Guile bindings for libgit2")
615 (description
616 "This package provides Guile bindings to libgit2, a library to
bd233722 617manipulate repositories of the Git version control system.")
e85035c9 618 (license license:gpl3+)))
c5793e7e 619
70bc6085
LC
620(define-public guile2.0-git
621 (package-for-guile-2.0 guile-git))
622
1722d680 623;;; guile.scm ends here
a8307a17 624