1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
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>
6 ;;; Copyright © 2015, 2017 Christopher Allan Webber <cwebber@dustycloud.org>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
11 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
12 ;;; Copyright © 2017, 2019 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>
16 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
17 ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
18 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
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.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages guile)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages bdw-gc)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages dbm)
44 #:use-module (gnu packages flex)
45 #:use-module (gnu packages gawk)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages gperf)
48 #:use-module (gnu packages hurd)
49 #:use-module (gnu packages libffi)
50 #:use-module (gnu packages libunistring)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages m4)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages sqlite)
57 #:use-module (gnu packages texinfo)
58 #:use-module (gnu packages version-control)
59 #:use-module (guix packages)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix build-system gnu)
63 #:use-module (guix build-system guile)
64 #:use-module (guix deprecation)
65 #:use-module (guix utils)
66 #:use-module (ice-9 match)
67 #:use-module ((srfi srfi-1) #:prefix srfi-1:))
71 ;;; GNU Guile, and modules and extensions.
75 (define-public guile-1.8
81 (uri (string-append "mirror://gnu/guile/guile-" version
85 "0l200a0v7h8bh0cwz6v7hc13ds39cgqsmfrks55b1rbj5vniyiy3"))
86 (patches (search-patches "guile-1.8-cpp-4.5.patch"))))
87 (build-system gnu-build-system)
88 (arguments '(#:configure-flags '("--disable-error-on-warning")
90 ;; Insert a phase before `configure' to patch things up.
92 (modify-phases %standard-phases
93 (add-before 'configure 'patch-stuff
94 (lambda* (#:key outputs #:allow-other-keys)
95 ;; Add a call to `lt_dladdsearchdir' so that
96 ;; `libguile-readline.so' & co. are in the
97 ;; loader's search path.
98 (substitute* "libguile/dynl.c"
99 (("lt_dlinit.*$" match)
101 " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
103 (assoc-ref outputs "out"))))
105 ;; The usual /bin/sh...
106 (substitute* "ice-9/popen.scm"
107 (("/bin/sh") (which "sh")))
110 ;; When cross-compiling, a native version of Guile itself is needed.
111 (native-inputs (if (%current-target-system)
112 `(("self" ,this-package))
115 (inputs `(("gawk" ,gawk)
116 ("readline" ,readline)))
118 ;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
120 (propagated-inputs `(("gmp" ,gmp)
121 ("libltdl" ,libltdl)))
124 (list (search-path-specification
125 (variable "GUILE_LOAD_PATH")
126 (files '("share/guile/site")))))
128 (synopsis "Scheme implementation intended especially for extensions")
130 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
131 official extension language of the GNU system. It is an implementation of
132 the Scheme language which can be easily embedded in other applications to
133 provide a convenient means of extending the functionality of the application
134 without requiring the source code to be rewritten.")
135 (home-page "https://www.gnu.org/software/guile/")
136 (license license:lgpl2.0+)))
138 (define-public guile-2.0
144 (uri (string-append "mirror://gnu/guile/guile-" version
148 "10lxc6l5alf3lzbs3ihnbfy6dfcrsyf8667wa57f26vf4mk2ai78"))))
149 (build-system gnu-build-system)
151 ;; When cross-compiling, a native version of Guile itself is needed.
152 (native-inputs `(,@(if (%current-target-system)
153 `(("self" ,this-package))
155 ("pkgconfig" ,pkg-config)))
156 (inputs `(("libffi" ,libffi)
157 ,@(libiconv-if-needed)
159 ;; We need Bash when cross-compiling because some of the scripts
160 ;; in bin/ refer to it. Use 'bash-minimal' because we don't need
161 ;; an interactive Bash with Readline and all.
162 ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
164 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
165 ;; reads `-lltdl -lunistring', adding them here will add the needed
166 ;; `-L' flags. As for why the `.la' file lacks the `-L' flags, see
167 ;; <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903>.
168 ("libunistring" ,libunistring)
170 ;; Depend on LIBLTDL, not LIBTOOL. That way, we avoid some the extra
171 ;; dependencies that LIBTOOL has, which is helpful during bootstrap.
174 ;; The headers and/or `guile-2.0.pc' refer to these packages, so they
175 ;; must be propagated.
179 (outputs '("out" "debug"))
182 `(#:configure-flags '("--disable-static") ; saves 3 MiB
184 (modify-phases %standard-phases
186 '((add-after 'unpack 'disable-tests
188 ;; Hangs at: "Running 00-repl-server.test"
189 (rename-file "test-suite/tests/00-repl-server.test" "00-repl-server.test")
190 ;; Sometimes Hangs at: "Running 00-socket.test"
191 (rename-file "test-suite/tests/00-socket.test" "00-socket.test")
192 ;; FAIL: srfi-18.test: thread-sleep!: thread sleeps fractions of a second
193 (rename-file "test-suite/tests/srfi-18.test" "srfi-18.test")
194 ;; failed to remove 't-guild-compile-7215.go.tdL7yC
195 (substitute* "test-suite/standalone/Makefile.in"
196 (("test-guild-compile ") ""))
199 (add-before 'configure 'pre-configure
200 (lambda* (#:key inputs #:allow-other-keys)
201 ;; Tell (ice-9 popen) the file name of Bash.
202 (let ((bash (assoc-ref inputs "bash")))
203 (substitute* "module/ice-9/popen.scm"
204 ;; If bash is #f allow fallback for user to provide
205 ;; "bash" in PATH. This happens when cross-building to
206 ;; MinGW for which we do not have Bash yet.
208 ,@(if (target-mingw?)
210 (string-append bash "/bin/bash")
212 '((string-append bash "/bin/bash")))))
216 (list (search-path-specification
217 (variable "GUILE_LOAD_PATH")
218 (files '("share/guile/site/2.0")))
219 (search-path-specification
220 (variable "GUILE_LOAD_COMPILED_PATH")
221 (files '("lib/guile/2.0/site-ccache")))))
223 (synopsis "Scheme implementation intended especially for extensions")
225 "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the
226 official extension language of the GNU system. It is an implementation of
227 the Scheme language which can be easily embedded in other applications to
228 provide a convenient means of extending the functionality of the application
229 without requiring the source code to be rewritten.")
230 (home-page "https://www.gnu.org/software/guile/")
231 (license license:lgpl3+)))
233 (define-public guile-2.2
234 (package (inherit guile-2.0)
240 ;; Note: we are limited to one of the compression formats
241 ;; supported by the bootstrap binaries, so no lzip here.
242 (uri (string-append "mirror://gnu/guile/guile-" version
246 "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd"))
247 (modules '((guix build utils)))
248 (patches (search-patches
249 "guile-2.2-skip-oom-test.patch"))
251 ;; Remove the pre-built object files. Instead, build everything
252 ;; from source, at the expense of significantly longer build
253 ;; times (almost 3 hours on a 4-core Intel i5).
255 (for-each delete-file
256 (find-files "prebuilt" "\\.go$"))
258 (properties '((timeout . 72000) ;20 hours
259 (max-silent-time . 36000))) ;10 hours (needed on ARM
260 ; when heavily loaded)
262 (list (search-path-specification
263 (variable "GUILE_LOAD_PATH")
264 (files '("share/guile/site/2.2")))
265 (search-path-specification
266 (variable "GUILE_LOAD_COMPILED_PATH")
267 (files '("lib/guile/2.2/site-ccache")))))))
269 (define-deprecated guile-2.2/bug-fix guile-2.2)
271 (define-public guile-2.2.4
276 (inherit (package-source guile-2.2))
277 (uri (string-append "mirror://gnu/guile/guile-" version
281 "07p3g0v2ba2vlfbfidqzlgbhnzdx46wh2rgc5gszq1mjyx5bks6r"))))))
283 (define-public guile-3.0
284 ;; This is the latest Guile stable version.
290 (inherit (package-source guile-2.2))
291 (uri (string-append "mirror://gnu/guile/guile-"
295 "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k"))))
297 ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
299 (substitute-keyword-arguments (package-arguments guile-2.2)
300 ((#:configure-flags flags ''())
301 `(cons "--disable-jit" ,flags)))
302 (package-arguments guile-2.2)))
304 (list (search-path-specification
305 (variable "GUILE_LOAD_PATH")
306 (files '("share/guile/site/3.0")))
307 (search-path-specification
308 (variable "GUILE_LOAD_COMPILED_PATH")
309 (files '("lib/guile/3.0/site-ccache"
310 "share/guile/site/3.0")))))))
312 (define-public guile-3.0-latest
313 ;; TODO: Make this 'guile-3.0' on the next rebuild cycle.
314 (package-with-extra-patches
319 (inherit (package-source guile-3.0))
320 (uri (string-append "mirror://gnu/guile/guile-"
324 "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid")))))
325 ;; Remove on the next rebuild cycle.
326 (search-patches "guile-2.2-skip-so-test.patch")))
328 (define-public guile-3.0/libgc-7
329 ;; Using libgc-7 avoid crashes that can occur, particularly when loading
330 ;; data in to the Guix Data Service:
331 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40525
334 (inherit guile-3.0-latest)
336 `(("bdw-gc" ,libgc-7)
337 ,@(srfi-1:alist-delete "bdw-gc" (package-propagated-inputs guile-3.0)))))))
339 (define-public guile-3.0/fixed
340 ;; A package of Guile that's rarely changed. It is the one used in the
341 ;; `base' module, and thus changing it entails a full rebuild.
344 (properties '((hidden? . #t) ;people should install 'guile-2.2'
345 (timeout . 72000) ;20 hours
346 (max-silent-time . 36000))))) ;10 hours (needed on ARM
347 ; when heavily loaded)
349 (define-public guile-next
350 (let ((version "3.0.5")
352 (commit "91547abf54d5e0795afda2781259ab8923eb527b"))
356 (version (git-version version revision commit))
358 ;; The main goal here is to allow for '--with-branch'.
361 (url "https://git.savannah.gnu.org/git/guile.git")
365 "09i1c77h2shygylfk0av31jsc1my6zjl230b2cx6vyl58q8c0cqy"))))
367 (substitute-keyword-arguments (package-arguments guile-3.0)
368 ((#:phases phases '%standard-phases)
369 `(modify-phases ,phases
370 (add-before 'check 'skip-failing-tests
372 (substitute* "test-suite/standalone/test-out-of-memory"
373 (("!#") "!#\n\n(exit 77)\n"))
374 (delete-file "test-suite/tests/version.test")
377 `(("autoconf" ,autoconf)
378 ("automake" ,automake)
381 ("gettext" ,gnu-gettext)
384 ,@(package-native-inputs guile-3.0)))
385 (synopsis "Development version of GNU Guile"))))
387 (define* (make-guile-readline guile #:optional (name "guile-readline"))
390 (version (package-version guile))
391 (source (package-source guile))
392 (build-system gnu-build-system)
394 '(#:configure-flags '("--disable-silent-rules")
395 #:phases (modify-phases %standard-phases
396 (add-before 'build 'chdir
397 (lambda* (#:key outputs #:allow-other-keys)
398 (invoke "make" "-C" "libguile" "scmconfig.h")
399 (invoke "make" "-C" "lib")
400 (chdir "guile-readline")
402 (substitute* "Makefile"
403 (("../libguile/libguile-[[:graph:]]+\\.la")
404 ;; Remove dependency on libguile-X.Y.la.
406 (("^READLINE_LIBS = (.*)$" _ libs)
407 ;; Link against the provided libguile.
408 (string-append "READLINE_LIBS = "
409 "-lguile-$(GUILE_EFFECTIVE_VERSION) "
411 (("\\$\\(top_builddir\\)/meta/build-env")
412 ;; Use the provided Guile, not the one from
416 ;; Install modules to the 'site' directories.
418 "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
419 (("^ccachedir = .*$")
420 "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
422 ;; Load 'guile-readline.so' from the right place.
423 (substitute* "ice-9/readline.scm"
424 (("load-extension \"guile-readline\"")
425 (format #f "load-extension \
426 (string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
427 (assoc-ref outputs "out"))))
429 (home-page (package-home-page guile))
430 (native-inputs (package-native-inputs guile))
432 `(,@(package-inputs guile) ;to placate 'configure'
433 ,@(package-propagated-inputs guile)
435 ("readline" ,readline)))
436 (synopsis "Line editing support for GNU Guile")
438 "This module provides line editing support via the Readline library for
439 GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its
440 @code{activate-readline} procedure to enable it.")
441 (license license:gpl3+)))
443 (define-public guile-readline
444 (make-guile-readline guile-3.0))
446 (define-public guile2.2-readline
447 (make-guile-readline guile-2.2 "guile2.2-readline"))
449 (define (guile-variant-package-name prefix)
451 "Return NAME with PREFIX instead of \"guile-\", when applicable."
452 (if (string-prefix? "guile-" name)
453 (string-append prefix "-"
455 (string-length "guile-")))
458 (define package-for-guile-2.0
459 ;; A procedure that rewrites the dependency tree of the given package to use
460 ;; GUILE-2.0 instead of GUILE-3.0.
461 (package-input-rewriting `((,guile-3.0 . ,guile-2.0))
462 (guile-variant-package-name "guile2.0")
465 (define package-for-guile-2.2
466 (package-input-rewriting `((,guile-3.0 . ,guile-2.2))
467 (guile-variant-package-name "guile2.2")
470 (define-syntax define-deprecated-guile3.0-package
472 "Define a deprecated package alias for \"guile3.0-something\"."
475 (and (identifier? #'name)
476 (string-prefix? "guile3.0-" (symbol->string (syntax->datum
478 (let ((->guile (lambda (str)
479 (let ((base (string-drop str
480 (string-length "guile3.0-"))))
481 (string-append "guile-" base)))))
482 (with-syntax ((package-name (symbol->string (syntax->datum #'name)))
487 (->guile (symbol->string (syntax->datum
490 ;; XXX: This is the name generated by
491 ;; 'define-deprecated'.
494 (symbol-append '% (syntax->datum #'name)
497 (define-deprecated name package
498 (deprecated-package package-name package))
499 (export old-name))))))))
501 (define-deprecated-guile3.0-package guile3.0-readline)
503 (define-public guile-for-guile-emacs
504 (let ((commit "15ca78482ac0dd2e3eb36dcb31765d8652d7106d")
506 (package (inherit guile-2.2)
507 (name "guile-for-guile-emacs")
508 (version (git-version "2.1.2" revision commit))
512 (url "git://git.savannah.gnu.org/guile.git")
514 (file-name (git-file-name name version))
517 "1l7ik4q4zk7vq4m3gnwizc0b64b1mdr31hxqlzxs94xaf2lvi7s2"))))
519 (substitute-keyword-arguments (package-arguments guile-2.2)
520 ((#:phases phases '%standard-phases)
521 `(modify-phases ,phases
524 ;; Disable broken tests.
526 (substitute* "test-suite/tests/gc.test"
527 (("\\(pass-if \"after-gc-hook gets called\"" m)
528 (string-append "#;" m)))
529 (substitute* "test-suite/tests/version.test"
530 (("\\(pass-if \"version reporting works\"" m)
531 (string-append "#;" m)))
532 ;; Warning: Unwind-only `out-of-memory' exception; skipping pre-unwind handler.
533 ;; FAIL: test-out-of-memory
534 (substitute* "test-suite/standalone/Makefile.am"
535 (("(check_SCRIPTS|TESTS) \\+= test-out-of-memory") ""))
537 (patch-shebang "build-aux/git-version-gen")
538 (invoke "sh" "autogen.sh")
541 `(("autoconf" ,autoconf)
542 ("automake" ,automake)
546 ("gettext" ,gettext-minimal)
547 ,@(package-native-inputs guile-2.2))))))
554 (define-public guile-json-1
558 (home-page "https://github.com/aconchillo/guile-json")
561 (uri (string-append "mirror://savannah/guile-json/guile-json-"
565 "0m6yzb169r6iz56k3nkncjaiijwi4p0x9ijn1p5ax3s77jklxy9k"))))
566 (build-system gnu-build-system)
568 `(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
569 (native-inputs `(("pkg-config" ,pkg-config)
570 ("guile" ,guile-2.2)))
571 (inputs `(("guile" ,guile-2.2)))
572 (synopsis "JSON module for Guile")
574 "Guile-JSON supports parsing and building JSON documents according to the
575 specification. These are the main features:
578 @item Strictly complies to @uref{http://json.org, specification}.
579 @item Build JSON documents programmatically via macros.
580 @item Unicode support for strings.
581 @item Allows JSON pretty printing.
584 ;; Version 1.2.0 switched to GPLv3+ (from LGPLv3+).
585 (license license:gpl3+)))
587 ;; Deprecate the 'guile-json' alias to force the use 'guile-json-1' or
588 ;; 'guile-json-3'. In the future, we may reuse 'guile-json' as an alias for
590 (define-deprecated guile-json guile-json-1)
593 (define-public guile2.0-json
594 (package-for-guile-2.0 guile-json-1))
596 (define-public guile-json-3
597 ;; This version is incompatible with 1.x; see the 'NEWS' file.
599 (inherit guile-json-1)
604 (uri (string-append "mirror://savannah/guile-json/guile-json-"
608 "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im"))))
609 (native-inputs `(("pkg-config" ,pkg-config)
610 ("guile" ,guile-3.0)))
611 (inputs `(("guile" ,guile-3.0)))))
613 (define-public guile3.0-json
614 (deprecated-package "guile3.0-json" guile-json-3))
616 (define-public guile-json-4
618 (inherit guile-json-3)
623 (uri (string-append "mirror://savannah/guile-json/guile-json-"
627 "0cqr0ljqmzlc2bwrapcsmcgxg147h66mcxf23824ri5i6vn4dc0s"))))))
629 (define-public guile2.2-json
630 (package-for-guile-2.2 guile-json-4))
632 ;; There are two guile-gdbm packages, one using the FFI and one with
633 ;; direct C bindings, hence the verbose name.
635 (define-public guile-gdbm-ffi
637 (name "guile-gdbm-ffi")
638 (version "20120209.fa1d5b6")
642 (url "https://github.com/ijp/guile-gdbm")
643 (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
644 (file-name (string-append name "-" version "-checkout"))
645 (patches (search-patches
646 "guile-gdbm-ffi-support-gdbm-1.14.patch"))
649 "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
650 (build-system guile-build-system)
652 '(#:phases (modify-phases %standard-phases
653 (add-after 'unpack 'move-examples
654 (lambda* (#:key outputs #:allow-other-keys)
655 ;; Move examples where they belong.
656 (let* ((out (assoc-ref outputs "out"))
657 (doc (string-append out "/share/doc/"
658 (strip-store-file-name out)
660 (copy-recursively "examples" doc)
661 (delete-file-recursively "examples")
663 (add-after 'unpack 'set-libgdbm-file-name
664 (lambda* (#:key inputs #:allow-other-keys)
665 (substitute* "gdbm.scm"
666 (("\\(dynamic-link \"libgdbm\"\\)")
667 (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
668 (assoc-ref inputs "gdbm"))))
671 `(("guile" ,guile-3.0)))
674 (home-page "https://github.com/ijp/guile-gdbm")
675 (synopsis "Guile bindings to the GDBM library via Guile's FFI")
677 "Guile bindings to the GDBM key-value storage system, using
678 Guile's foreign function interface.")
679 (license license:gpl3+)))
681 (define-public guile2.0-gdbm-ffi
682 (package-for-guile-2.0 guile-gdbm-ffi))
684 (define-public guile2.2-gdbm-ffi
685 (package-for-guile-2.2 guile-gdbm-ffi))
687 (define-deprecated-guile3.0-package guile3.0-gdbm-ffi)
689 (define-public guile-sqlite3
691 (name "guile-sqlite3")
693 (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git")
698 (commit (string-append "v" version))))
701 "1nryy9j3bk34i0alkmc9bmqsm0ayz92k1cdf752mvhyjjn8nr928"))
702 (file-name (string-append name "-" version "-checkout"))))
703 (build-system gnu-build-system)
705 `(("autoconf" ,autoconf)
706 ("automake" ,automake)
708 ("pkg-config" ,pkg-config)))
710 `(("guile" ,guile-3.0)
712 (synopsis "Access SQLite databases from Guile")
714 "This package provides Guile bindings to the SQLite database system.")
715 (license license:gpl3+)))
717 (define-public guile2.0-sqlite3
718 (package-for-guile-2.0 guile-sqlite3))
720 (define-public guile2.2-sqlite3
721 (package-for-guile-2.2 guile-sqlite3))
723 (define-deprecated-guile3.0-package guile3.0-sqlite3)
725 (define-public guile-bytestructures
727 (name "guile-bytestructures")
729 (home-page "https://github.com/TaylanUB/scheme-bytestructures")
735 (file-name (git-file-name name version))
738 "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk"))))
739 (build-system gnu-build-system)
741 `(#:make-flags '("GUILE_AUTO_COMPILE=0") ;to prevent guild warnings
743 #:phases (modify-phases %standard-phases
744 (add-after 'install 'install-doc
745 (lambda* (#:key outputs #:allow-other-keys)
746 (let* ((out (assoc-ref outputs "out"))
747 (package ,(package-full-name this-package "-"))
748 (doc (string-append out "/share/doc/" package)))
749 (install-file "README.md" doc)
752 `(("autoconf" ,autoconf)
753 ("automake" ,automake)
754 ("pkg-config" ,pkg-config)
755 ("guile" ,guile-3.0)))
757 `(("guile" ,guile-3.0)))
758 (synopsis "Structured access to bytevector contents for Guile")
760 "Guile bytestructures offers a system imitating the type system
761 of the C programming language, to be used on bytevectors. C's type
762 system works on raw memory, and Guile works on bytevectors which are
763 an abstraction over raw memory. It's also more powerful than the C
764 type system, elevating types to first-class status.")
765 (license license:gpl3+)
766 (properties '((upstream-name . "bytestructures")))))
768 (define-public guile2.0-bytestructures
769 (package-for-guile-2.0 guile-bytestructures))
771 (define-public guile2.2-bytestructures
772 (package-for-guile-2.2 guile-bytestructures))
774 (define-deprecated-guile3.0-package guile3.0-bytestructures)
776 (define-public guile-git
780 (home-page "https://gitlab.com/guile-git/guile-git.git")
785 (commit (string-append "v" version))))
786 (file-name (git-file-name name version))
789 "1x3wa6la4j1wcfxyhhjlmd7yp85wwpny0y6lrzpz803i9z5fwagc"))))
790 (build-system gnu-build-system)
792 `(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings
794 `(("pkg-config" ,pkg-config)
795 ("autoconf" ,autoconf)
796 ("automake" ,automake)
799 ("guile-bytestructures" ,guile-bytestructures)))
801 `(("guile" ,guile-3.0)
802 ("libgit2" ,libgit2)))
804 `(("guile-bytestructures" ,guile-bytestructures)))
805 (synopsis "Guile bindings for libgit2")
807 "This package provides Guile bindings to libgit2, a library to
808 manipulate repositories of the Git version control system.")
809 (license license:gpl3+)))
811 (define-public guile2.2-git
812 (package-for-guile-2.2 guile-git))
814 (define-public guile2.0-git
815 (package-for-guile-2.0 guile-git))
817 (define-deprecated-guile3.0-package guile3.0-git)
819 (define-public guile-zlib
825 ;; XXX: Do not use "git-fetch" method here that would create and
826 ;; endless inclusion loop, because this package is used as an extension
827 ;; in the same method.
830 (string-append "https://notabug.org/guile-zlib/guile-zlib/archive/v"
832 (file-name (string-append name "-" version ".tar.gz"))
834 ;; content hash: 1ip18nzwnczqyhn9cpzxkm9vzpi5fz5sy96cgjhmp7cwhnkmv6zv
836 "1safz7rrbdf1d98x3lgx5v74kivpyf9n1v6pdyy22vd0f2sjdir5"))))
837 (build-system gnu-build-system)
840 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
842 `(("autoconf" ,autoconf)
843 ("automake" ,automake)
844 ("pkg-config" ,pkg-config)
845 ,@(if (%current-target-system)
846 `(("guile" ,guile-3.0)) ;for 'guild compile' and 'guile-3.0.pc'
849 `(("guile" ,guile-3.0)
851 (synopsis "Guile bindings to zlib")
853 "This package provides Guile bindings for zlib, a lossless
854 data-compression library. The bindings are written in pure Scheme by using
855 Guile's foreign function interface.")
856 (home-page "https://notabug.org/guile-zlib/guile-zlib")
857 (license license:gpl3+)))
859 (define-public guile-lzlib
867 (string-append "https://notabug.org/guile-lzlib/guile-lzlib/archive/"
869 (file-name (string-append name "-" version ".tar.gz"))
872 "11sggvncyx08ssp1s5xii4d6nskh1qwqihnbpzzvkrs7sivxn8w6"))))
873 (build-system gnu-build-system)
876 '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
878 `(("autoconf" ,autoconf)
879 ("automake" ,automake)
880 ("pkg-config" ,pkg-config)
881 ,@(if (%current-target-system)
882 `(("guile" ,guile-3.0)) ;for 'guild compile' and 'guile-3.0.pc'
885 `(("guile" ,guile-3.0)
887 (synopsis "Guile bindings to lzlib")
889 "This package provides Guile bindings for lzlib, a C library for
890 in-memory LZMA compression and decompression. The bindings are written in
891 pure Scheme by using Guile's foreign function interface.")
892 (home-page "https://notabug.org/guile-lzlib/guile-lzlib")
893 (license license:gpl3+)))
895 (define-public guile-zstd
899 (home-page "https://notabug.org/guile-zstd/guile-zstd")
902 (uri (git-reference (url home-page)
903 (commit (string-append "v" version))))
904 (file-name (git-file-name name version))
907 "1c8l7829b5yx8wdc0mrhzjfwb6h9hb7cd8dfxcr71a7vlsi86310"))))
908 (build-system gnu-build-system)
910 `(("autoconf" ,autoconf)
911 ("automake" ,automake)
912 ("pkg-config" ,pkg-config)
913 ("guile" ,guile-3.0)))
915 `(("zstd" ,zstd "lib")
916 ("guile" ,guile-3.0)))
917 (synopsis "GNU Guile bindings to the zstd compression library")
919 "This package provides a GNU Guile interface to the zstd (``zstandard'')
920 compression library.")
921 (license license:gpl3+)))
923 ;;; guile.scm ends here