;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages guile)
#:use-module (guix licenses)
- #:use-module (distro)
+ #: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)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ed)
+ #:use-module (gnu packages which)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu))
;; Insert a phase before `configure' to patch things up.
#:phases (alist-cons-before
'configure
- 'patch-loader-search-path
+ 'patch-stuff
(lambda* (#:key outputs #:allow-other-keys)
;; Add a call to `lt_dladdsearchdir' so that
;; `libguile-readline.so' & co. are in the
;; loader's search path.
(substitute* "libguile/dynl.c"
- (("lt_dlinit.*$" match)
- (format #f
- " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
- match
- (assoc-ref outputs "out")))))
+ (("lt_dlinit.*$" match)
+ (format #f
+ " ~a~% lt_dladdsearchdir(\"~a/lib\");~%"
+ match
+ (assoc-ref outputs "out"))))
+
+ ;; The usual /bin/sh...
+ (substitute* "ice-9/popen.scm"
+ (("/bin/sh") (which "sh"))))
%standard-phases)))
(inputs `(("patch/snarf" ,(search-patch "guile-1.8-cpp-4.5.patch"))
("gawk" ,gawk)
;; 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
(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'
(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.
"Build Guile-Reader against GUILE, a package of some version of Guile 1.8
or 2.0."
(package
- (name (string-append "guile-reader-for-guile-" (package-version guile)))
+ (name (string-append "guile-reader-for-guile_" (package-version guile)))
(version "0.6")
(source (origin
(method url-fetch)
(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.
;; Guile-Reader built against Guile 2.0.
(guile-reader guile-2.0))
+(define-public guile-ncurses
+ (package
+ (name "guile-ncurses")
+ (version "1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/guile-ncurses/guile-ncurses-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "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/2.0"))
+ #:phases (alist-cons-after
+ 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/share/guile/site/"))
+ (files (find-files dir ".scm")))
+ (substitute* files
+ (("\"libguile-ncurses\"")
+ (format #f "\"~a/lib/libguile-ncurses\""
+ out)))))
+ %standard-phases)))
+ (home-page "http://www.gnu.org/software/guile-ncurses/")
+ (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
+functionality is built on the ncurses libraries: curses, form, panel, and
+menu.")
+ (license lgpl3+)))
+
+(define-public mcron
+ (package
+ (name "mcron")
+ (version "1.0.6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/mcron/mcron-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0yvrfzzdy2m7fbqkr61fw01wd9r2jpnbyabxhcsfivgxywknl0fy"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:patches (list (assoc-ref %build-inputs "patch/install"))))
+ (inputs
+ `(("ed" ,ed) ("which" ,which) ("guile" ,guile-1.8)
+ ("patch/install" ,(search-patch "mcron-install.patch"))))
+ (home-page "http://www.gnu.org/software/mcron/")
+ (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
+to be written in scheme (as well as Vixie's original format) for infinite
+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