gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
index 8665e2e..15d5b2c 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2014, 2016, 2018 David Thompson <davet@gnu.org>
 ;;; Copyright © 2014, 2017, 2018 Mark H Weaver <mhw@netris.org>
@@ -15,6 +15,7 @@
 ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2019 Taylan Kammer <taylan.kammer@gmail.com>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunistring)
@@ -307,7 +309,21 @@ without requiring the source code to be rewritten.")
             (files '("lib/guile/3.0/site-ccache"
                      "share/guile/site/3.0")))))))
 
-(define-public guile-next guile-3.0)
+(define-public guile-3.0-latest
+  ;; TODO: Make this 'guile-3.0' on the next rebuild cycle.
+  (package-with-extra-patches
+   (package
+     (inherit guile-3.0)
+     (version "3.0.5")
+     (source (origin
+               (inherit (package-source guile-3.0))
+               (uri (string-append "mirror://gnu/guile/guile-"
+                                   version ".tar.xz"))
+               (sha256
+                (base32
+                 "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid")))))
+   ;; Remove on the next rebuild cycle.
+   (search-patches "guile-2.2-skip-so-test.patch")))
 
 (define-public guile-3.0/libgc-7
   ;; Using libgc-7 avoid crashes that can occur, particularly when loading
@@ -315,7 +331,7 @@ without requiring the source code to be rewritten.")
   ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40525
   (hidden-package
    (package
-     (inherit guile-3.0)
+     (inherit guile-3.0-latest)
      (propagated-inputs
       `(("bdw-gc" ,libgc-7)
         ,@(srfi-1:alist-delete "bdw-gc" (package-propagated-inputs guile-3.0)))))))
@@ -330,6 +346,44 @@ without requiring the source code to be rewritten.")
                   (max-silent-time . 36000))))) ;10 hours (needed on ARM
                                                 ;  when heavily loaded)
 
+(define-public guile-next
+  (let ((version "3.0.5")
+        (revision "0")
+        (commit "91547abf54d5e0795afda2781259ab8923eb527b"))
+    (package
+      (inherit guile-3.0)
+      (name "guile-next")
+      (version (git-version version revision commit))
+      (source (origin
+                ;; The main goal here is to allow for '--with-branch'.
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://git.savannah.gnu.org/git/guile.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "09i1c77h2shygylfk0av31jsc1my6zjl230b2cx6vyl58q8c0cqy"))))
+      (arguments
+       (substitute-keyword-arguments (package-arguments guile-3.0)
+         ((#:phases phases '%standard-phases)
+          `(modify-phases ,phases
+             (add-before 'check 'skip-failing-tests
+               (lambda _
+                 (substitute* "test-suite/standalone/test-out-of-memory"
+                   (("!#") "!#\n\n(exit 77)\n"))
+                 (delete-file "test-suite/tests/version.test")
+                 #t))))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("libtool" ,libtool)
+         ("flex" ,flex)
+         ("gettext" ,gnu-gettext)
+         ("texinfo" ,texinfo)
+         ("gperf" ,gperf)
+         ,@(package-native-inputs guile-3.0)))
+      (synopsis "Development version of GNU Guile"))))
+
 (define* (make-guile-readline guile #:optional (name "guile-readline"))
   (package
     (name name)
@@ -405,11 +459,13 @@ GNU@tie{}Guile.  Use the @code{(ice-9 readline)} module and call its
   ;; A procedure that rewrites the dependency tree of the given package to use
   ;; GUILE-2.0 instead of GUILE-3.0.
   (package-input-rewriting `((,guile-3.0 . ,guile-2.0))
-                           (guile-variant-package-name "guile2.0")))
+                           (guile-variant-package-name "guile2.0")
+                           #:deep? #f))
 
 (define package-for-guile-2.2
   (package-input-rewriting `((,guile-3.0 . ,guile-2.2))
-                           (guile-variant-package-name "guile2.2")))
+                           (guile-variant-package-name "guile2.2")
+                           #:deep? #f))
 
 (define-syntax define-deprecated-guile3.0-package
   (lambda (s)
@@ -428,11 +484,19 @@ GNU@tie{}Guile.  Use the @code{(ice-9 readline)} module and call its
                          (datum->syntax
                           #'name
                           (string->symbol
-                           (->guile (symbol->string (syntax->datum #'name)))))))
+                           (->guile (symbol->string (syntax->datum
+                                                     #'name))))))
+                       (old-name
+                        ;; XXX: This is the name generated by
+                        ;; 'define-deprecated'.
+                        (datum->syntax
+                         #'name
+                         (symbol-append '% (syntax->datum #'name)
+                                        '/deprecated))))
            #'(begin
                (define-deprecated name package
                  (deprecated-package package-name package))
-               (export name))))))))
+               (export old-name))))))))
 
 (define-deprecated-guile3.0-package guile3.0-readline)
 
@@ -490,7 +554,7 @@ GNU@tie{}Guile.  Use the @code{(ice-9 readline)} module and call its
 (define-public guile-json-1
   (package
     (name "guile-json")
-    (version "1.2.0")
+    (version "1.3.2")
     (home-page "https://github.com/aconchillo/guile-json")
     (source (origin
               (method url-fetch)
@@ -498,8 +562,10 @@ GNU@tie{}Guile.  Use the @code{(ice-9 readline)} module and call its
                                   version ".tar.gz"))
               (sha256
                (base32
-                "15gnb84d7hpazqhskkf3g9z4r6knw54wfj4ch5270kakz1lp70c9"))))
+                "0m6yzb169r6iz56k3nkncjaiijwi4p0x9ijn1p5ax3s77jklxy9k"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("GUILE_AUTO_COMPILE=0")))   ;to prevent guild warnings
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("guile" ,guile-2.2)))
     (inputs `(("guile" ,guile-2.2)))
@@ -544,12 +610,25 @@ specification.  These are the main features:
                      ("guile" ,guile-3.0)))
     (inputs `(("guile" ,guile-3.0)))))
 
-(define-public guile2.2-json
-  (package-for-guile-2.2 guile-json-3))
-
 (define-public guile3.0-json
   (deprecated-package "guile3.0-json" guile-json-3))
 
+(define-public guile-json-4
+  (package
+    (inherit guile-json-3)
+    (name "guile-json")
+    (version "4.5.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://savannah/guile-json/guile-json-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0cqr0ljqmzlc2bwrapcsmcgxg147h66mcxf23824ri5i6vn4dc0s"))))))
+
+(define-public guile2.2-json
+  (package-for-guile-2.2 guile-json-4))
+
 ;; There are two guile-gdbm packages, one using the FFI and one with
 ;; direct C bindings, hence the verbose name.
 
@@ -560,7 +639,7 @@ specification.  These are the main features:
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                    (url "https://github.com/ijp/guile-gdbm.git")
+                    (url "https://github.com/ijp/guile-gdbm")
                     (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
               (file-name (string-append name "-" version "-checkout"))
               (patches (search-patches
@@ -610,7 +689,7 @@ Guile's foreign function interface.")
 (define-public guile-sqlite3
   (package
     (name "guile-sqlite3")
-    (version "0.1.0")
+    (version "0.1.2")
     (home-page "https://notabug.org/guile-sqlite3/guile-sqlite3.git")
     (source (origin
               (method git-fetch)
@@ -619,18 +698,8 @@ Guile's foreign function interface.")
                     (commit (string-append "v" version))))
               (sha256
                (base32
-                "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
-              (file-name (string-append name "-" version "-checkout"))
-              (patches
-               (search-patches "guile-sqlite3-fix-cross-compilation.patch"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  ;; Allow builds with Guile 3.0.
-                  (substitute* "configure.ac"
-                    (("^GUILE_PKG.*")
-                     "GUILE_PKG([3.0 2.2 2.0])\n"))
-                  #t))))
+                "1nryy9j3bk34i0alkmc9bmqsm0ayz92k1cdf752mvhyjjn8nr928"))
+              (file-name (string-append name "-" version "-checkout"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("autoconf" ,autoconf)
@@ -656,17 +725,17 @@ Guile's foreign function interface.")
 (define-public guile-bytestructures
   (package
     (name "guile-bytestructures")
-    (version "1.0.7")
+    (version "1.0.10")
     (home-page "https://github.com/TaylanUB/scheme-bytestructures")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url home-page)
-                    (commit (string-append "v" version))))
+                    (commit version)))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0q0habjiy3h9cigb7q1br9kz6z212dn2ab31f6dgd3rrmsfn5rvb"))))
+                "14k50jln32kkxv41hvsdgjkkfj6xlv06vc1caz01qkgk1fzh72nk"))))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags '("GUILE_AUTO_COMPILE=0")     ;to prevent guild warnings
@@ -707,19 +776,25 @@ type system, elevating types to first-class status.")
 (define-public guile-git
   (package
     (name "guile-git")
-    (version "0.3.0")
+    (version "0.5.1")
     (home-page "https://gitlab.com/guile-git/guile-git.git")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://gitlab.com/guile-git/guile-git/uploads/"
-                                  "4c563d8e7e1ff84396abe8ca7011bcaf/guile-git-"
-                                  version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0c5i3d16hp7gp9rd78vk9zc45js8bphf92m4lbb5gyi4l1yl7kkm"))))
+                "1x3wa6la4j1wcfxyhhjlmd7yp85wwpny0y6lrzpz803i9z5fwagc"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("GUILE_AUTO_COMPILE=0")))     ; to prevent guild warnings
     (native-inputs
      `(("pkg-config" ,pkg-config)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("texinfo" ,texinfo)
        ("guile" ,guile-3.0)
        ("guile-bytestructures" ,guile-bytestructures)))
     (inputs
@@ -737,17 +812,112 @@ manipulate repositories of the Git version control system.")
   (package-for-guile-2.2 guile-git))
 
 (define-public guile2.0-git
-  (let ((base (package-for-guile-2.0 guile-git)))
-    (package
-      (inherit base)
-      ;; Libgit2's Guile test driver requires (ice-9 textual-ports), which is
-      ;; not in Guile 2.0.  Thus, keep LIBGIT2 as-is here (i.e., built against
-      ;; Guile 2.2).
-      (inputs `(("libgit2" ,libgit2)
-                ,@(srfi-1:alist-delete "libgit2"
-                                       (package-inputs base)))))))
+  (package-for-guile-2.0 guile-git))
 
 (define-deprecated-guile3.0-package guile3.0-git)
 
-;;; guile.scm ends here
+(define-public guile-zlib
+  (package
+    (name "guile-zlib")
+    (version "0.1.0")
+    (source
+     (origin
+       ;; XXX: Do not use "git-fetch" method here that would create and
+       ;; endless inclusion loop, because this package is used as an extension
+       ;; in the same method.
+       (method url-fetch)
+       (uri
+        (string-append "https://notabug.org/guile-zlib/guile-zlib/archive/v"
+                       version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        ;; content hash: 1ip18nzwnczqyhn9cpzxkm9vzpi5fz5sy96cgjhmp7cwhnkmv6zv
+        (base32
+         "1safz7rrbdf1d98x3lgx5v74kivpyf9n1v6pdyy22vd0f2sjdir5"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags
+       '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ,@(if (%current-target-system)
+             `(("guile" ,guile-3.0))   ;for 'guild compile' and 'guile-3.0.pc'
+             '())))
+    (inputs
+     `(("guile" ,guile-3.0)
+       ("zlib" ,zlib)))
+    (synopsis "Guile bindings to zlib")
+    (description
+     "This package provides Guile bindings for zlib, a lossless
+data-compression library.  The bindings are written in pure Scheme by using
+Guile's foreign function interface.")
+    (home-page "https://notabug.org/guile-zlib/guile-zlib")
+    (license license:gpl3+)))
 
+(define-public guile-lzlib
+  (package
+    (name "guile-lzlib")
+    (version "0.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://notabug.org/guile-lzlib/guile-lzlib/archive/"
+                       version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "11sggvncyx08ssp1s5xii4d6nskh1qwqihnbpzzvkrs7sivxn8w6"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags
+       '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ,@(if (%current-target-system)
+             `(("guile" ,guile-3.0))   ;for 'guild compile' and 'guile-3.0.pc'
+             '())))
+    (inputs
+     `(("guile" ,guile-3.0)
+       ("lzlib" ,lzlib)))
+    (synopsis "Guile bindings to lzlib")
+    (description
+     "This package provides Guile bindings for lzlib, a C library for
+in-memory LZMA compression and decompression.  The bindings are written in
+pure Scheme by using Guile's foreign function interface.")
+    (home-page "https://notabug.org/guile-lzlib/guile-lzlib")
+    (license license:gpl3+)))
+
+(define-public guile-zstd
+  (package
+    (name "guile-zstd")
+    (version "0.1.1")
+    (home-page "https://notabug.org/guile-zstd/guile-zstd")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1c8l7829b5yx8wdc0mrhzjfwb6h9hb7cd8dfxcr71a7vlsi86310"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ("guile" ,guile-3.0)))
+    (inputs
+     `(("zstd" ,zstd "lib")
+       ("guile" ,guile-3.0)))
+    (synopsis "GNU Guile bindings to the zstd compression library")
+    (description
+     "This package provides a GNU Guile interface to the zstd (``zstandard'')
+compression library.")
+    (license license:gpl3+)))
+
+;;; guile.scm ends here