gnu: Update harfbuzz to 0.9.20.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
index 58e7c29..c580e0c 100644 (file)
@@ -19,6 +19,7 @@
 (define-module (gnu packages guile)
   #:use-module (guix licenses)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gperf)
    ;; When cross-compiling, a native version of Guile itself is needed.
    (self-native-input? #t)
 
-   (synopsis "GNU Guile 1.8, an embeddable Scheme interpreter")
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUILE_LOAD_PATH")
+           (directories '("share/guile/site")))))
+
+   (synopsis "Scheme implementation intended especially for extensions")
    (description
 "GNU Guile 1.8 is an interpreter for the Scheme programming language,
 packaged as a library that can be embedded into programs to make them
@@ -99,18 +105,23 @@ extensible.  It supports many SRFIs.")
 (define-public guile-2.0
   (package
    (name "guile")
-   (version "2.0.7")
+   (version "2.0.9")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/guile/guile-" version
                                 ".tar.xz"))
             (sha256
              (base32
-              "0f53pxkia4v17n0avwqlcjpy0n89hkazm2xsa6p84lv8k6k8y9vg"))))
+              "0nw9y8vjyz4r61v06p9msks5lm58pd91irmzg4k487vmv743h2pp"))))
    (build-system gnu-build-system)
    (native-inputs `(("pkgconfig" ,pkg-config)))
    (inputs `(("libffi" ,libffi)
-             ("readline" ,readline)))
+             ("readline" ,readline)
+
+             ;; TODO: On next core-updates, make Bash input unconditional.
+             ,@(if (%current-target-system)
+                   `(("bash" ,bash))
+                   '())))
 
    (propagated-inputs
     `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
@@ -127,17 +138,32 @@ extensible.  It supports many SRFIs.")
 
    (self-native-input? #t)
 
+   (outputs '("out" "debug"))
+
    (arguments
-    '(#:phases (alist-cons-before
+    `(#:phases (alist-cons-before
                 'configure 'pre-configure
                 (lambda* (#:key inputs #:allow-other-keys)
+                  ;; Tell (ice-9 popen) the file name of Bash.
                   (let ((bash (assoc-ref inputs "bash")))
                     (substitute* "module/ice-9/popen.scm"
                       (("/bin/sh")
                        (string-append bash "/bin/bash")))))
-                %standard-phases)))
+                %standard-phases)
+
+      ,@(if (%current-target-system)
+            '(#:configure-flags '("CC_FOR_BUILD=gcc"))
+            '())))
 
-   (synopsis "GNU Guile 2.0, an embeddable Scheme implementation")
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUILE_LOAD_PATH")
+           (directories '("share/guile/site/2.0")))
+          (search-path-specification
+           (variable "GUILE_LOAD_COMPILED_PATH")
+           (directories '("share/guile/site/2.0")))))
+
+   (synopsis "Scheme implementation intended especially for extensions")
    (description
 "GNU Guile is an implementation of the Scheme programming language, with
 support for many SRFIs, packaged for use in a wide variety of environments.
@@ -176,8 +202,14 @@ or 2.0."
    (native-inputs `(("pkgconfig" ,pkg-config)
                     ("gperf" ,gperf)))
    (inputs `(("guile" ,guile)))
-   (synopsis "Guile-Reader, a simple framework for building readers for
-GNU Guile")
+   (arguments `(#:configure-flags
+                (let ((out (assoc-ref %outputs "out")))
+                  ,(if (string-prefix? "2." (package-version guile))
+                       '(list (string-append "--with-guilemoduledir="
+                                             out "/share/guile/site/2.0"))
+                       '(list (string-append "--with-guilemoduledir="
+                                             out "/share/guile/site"))))))
+   (synopsis "Framework for building readers for GNU Guile")
    (description
 "Guile-Reader is a simple framework for building readers for GNU Guile.
 
@@ -204,21 +236,21 @@ many readers as needed).")
 (define-public guile-ncurses
   (package
     (name "guile-ncurses")
-    (version "1.3")
+    (version "1.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "0chvfjrlmg99db98ra9vzwjmbypqx7d4ssm8q0kvzi0n0p9irszi"))))
+               "070wl664lsm14hb6y9ch97x9q6cns4k6nxgdzbdzi5byixn74899"))))
     (build-system gnu-build-system)
     (inputs `(("ncurses" ,ncurses)
               ("guile" ,guile-2.0)))
     (arguments
      '(#:configure-flags (list (string-append "--with-guilesitedir="
                                               (assoc-ref %outputs "out")
-                                              "/share/guile/site"))
+                                              "/share/guile/site/2.0"))
        #:phases (alist-cons-after
                  'install 'post-install
                  (lambda* (#:key outputs #:allow-other-keys)
@@ -231,8 +263,7 @@ many readers as needed).")
                                out)))))
                  %standard-phases)))
     (home-page "http://www.gnu.org/software/guile-ncurses/")
-    (synopsis
-     "GNU Guile-Ncurses, Scheme interface to the NCurses libraries")
+    (synopsis "Guile bindings to ncurses")
     (description
      "GNU Guile-Ncurses is a library for the Guile Scheme interpreter that
 provides functions for creating text user interfaces.  The text user interface
@@ -258,8 +289,7 @@ menu.")
      `(("ed" ,ed) ("which" ,which) ("guile" ,guile-1.8)
        ("patch/install" ,(search-patch "mcron-install.patch"))))
     (home-page "http://www.gnu.org/software/mcron/")
-    (synopsis
-     "GNU mcron, a flexible implementation of `cron' in Guile")
+    (synopsis "Run jobs at scheduled times")
     (description
      "The GNU package mcron (Mellor's cron) is a 100% compatible replacement
 for Vixie cron.  It is written in pure Guile, and allows configuration files
@@ -268,4 +298,38 @@ flexibility in specifying when jobs should be run.  Mcron was written by Dale
 Mellor.")
     (license gpl3+)))
 
+(define-public guile-lib
+  (package
+    (name "guile-lib")
+    (version "0.2.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://savannah/guile-lib/guile-lib-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "1f9n2b5b5r75lzjinyk6zp6g20g60msa0jpfrk5hhg4j8cy0ih4b"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-cons-before
+                 'configure 'patch-module-dir
+                 (lambda _
+                   (substitute* "src/Makefile.in"
+                     (("^moddir[[:blank:]]*=[[:blank:]]*([[:graph:]]+)" _ rhs)
+                      (string-append "moddir = " rhs "/2.0\n"))))
+                 %standard-phases)))
+    (inputs `(("guile" ,guile-2.0)))
+    (home-page "http://www.nongnu.org/guile-lib/")
+    (synopsis "Collection of useful Guile Scheme modules")
+    (description
+     "guile-lib is intended as an accumulation place for pure-scheme Guile
+modules, allowing for people to cooperate integrating their generic Guile
+modules into a coherent library.  Think \"a down-scaled, limited-scope CPAN
+for Guile\".")
+
+    ;; The whole is under GPLv3+, but some modules are under laxer
+    ;; distribution terms such as LGPL and public domain.  See `COPYING' for
+    ;; details.
+    (license gpl3+)))
+
 ;;; guile.scm ends here