gnu: Update harfbuzz to 0.9.20.
[jackhill/guix/guix.git] / gnu / packages / guile.scm
index e0896ec..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)
 
+   (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,
@@ -110,7 +116,12 @@ extensible.  It supports many SRFIs.")
    (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,15 +138,30 @@ 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"))
+            '())))
+
+   (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
@@ -151,15 +177,7 @@ call interface, and powerful string processing.")
 (define-public guile-2.0/fixed
   ;; A package of Guile 2.0 that's rarely changed.  It is the one used
   ;; in the `base' module, and thus changing it entails a full rebuild.
-  (package (inherit guile-2.0)
-    (version "2.0.7")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnu/guile/guile-" version
-                                 ".tar.xz"))
-             (sha256
-              (base32
-               "0f53pxkia4v17n0avwqlcjpy0n89hkazm2xsa6p84lv8k6k8y9vg"))))))
+  guile-2.0)
 
 \f
 ;;;
@@ -184,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.
 
@@ -212,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)
@@ -274,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