aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/guile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/guile.scm')
-rw-r--r--gnu/packages/guile.scm117
1 files changed, 108 insertions, 9 deletions
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 751002f54c..d8c1a8ca35 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -27,6 +27,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages libffi)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages libunistring)
#:use-module (gnu packages m4)
#:use-module (gnu packages multiprecision)
@@ -35,6 +36,9 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ed)
#:use-module (gnu packages base)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages gdbm)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -181,6 +185,42 @@ without requiring the source code to be rewritten.")
;; in the `base' module, and thus changing it entails a full rebuild.
guile-2.0)
+(define-public guile-for-guile-emacs
+ (package (inherit guile-2.0)
+ (name "guile-for-guile-emacs")
+ (version "20150510.d8d9a8d")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.hcoop.net/git/bpt/guile.git")
+ (commit "d8d9a8da05ec876acba81a559798eb5eeceb5a17")))
+ (sha256
+ (base32
+ "00sprsshy16y8pxjy126hr2adqcvvzzz96hjyjwgg8swva1qh6b0"))))
+ (arguments
+ (substitute-keyword-arguments `(;; Tests aren't passing for now.
+ ;; Obviously we should re-enable this!
+ #:tests? #f
+ ,@(package-arguments guile-2.0))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'autogen
+ (lambda _
+ (zero? (system* "sh" "autogen.sh"))))
+ (add-before 'autogen 'patch-/bin/sh
+ (lambda _
+ (substitute* "build-aux/git-version-gen"
+ (("#!/bin/sh") (string-append "#!" (which "sh"))))
+ #t))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("flex" ,flex)
+ ("texinfo" ,texinfo)
+ ("gettext" ,gnu-gettext)
+ ,@(package-native-inputs guile-2.0)))))
+
;;;
;;; Extensions.
@@ -189,25 +229,19 @@ without requiring the source code to be rewritten.")
(define-public guile-reader
(package
(name "guile-reader")
- (version "0.6")
+ (version "0.6.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/guile-reader/guile-reader-"
version ".tar.gz"))
(sha256
(base32
- "1svlyk5pm4fsdp2g7n6qffdl6fdggxnlicj0jn9s4lxd63gzxy1n"))))
+ "020wz5w8z6g79nbqifg2n496wxwkcjzh8xizpv6mz0hczpl155ma"))))
(build-system gnu-build-system)
(native-inputs `(("pkgconfig" ,pkg-config)
("gperf" ,gperf)))
(inputs `(("guile" ,guile-2.0)))
- (arguments `(;; The extract-*.sh scripts really expect to run in the C
- ;; locale. Failing to do that, we end up with a build
- ;; failure while extracting doc. (Fixed in Guile-Reader's
- ;; repo.)
- #:locale "C"
-
- #:configure-flags
+ (arguments `(#:configure-flags
(let ((out (assoc-ref %outputs "out")))
(list (string-append "--with-guilemoduledir="
out "/share/guile/site/2.0")))))
@@ -436,4 +470,69 @@ slightly from miniKanren mainline.
See http://minikanren.org/ for more on miniKanren generally.")
(license expat)))
+
+;; There are two guile-gdbm packages, one using the FFI and one with
+;; direct C bindings, hence the verbose name.
+
+(define-public guile-gdbm-ffi
+ (package
+ (name "guile-gdbm-ffi")
+ (version "20120209.fa1d5b6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ijp/guile-gdbm.git")
+ (commit "fa1d5b6231d0e4d096687b378c025f2148c5f246")))
+ (sha256
+ (base32
+ "1j8wrsw7v9w6qkl47xz0rdikg50v16nn6kbs3lgzcymjzpa7babj"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules
+ ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils)
+ (system base compile))
+
+ (let* ((out (assoc-ref %outputs "out"))
+ (module-dir (string-append out "/share/guile/site/2.0"))
+ (source (assoc-ref %build-inputs "source"))
+ (doc (string-append out "/share/doc"))
+ (guild (string-append (assoc-ref %build-inputs "guile")
+ "/bin/guild"))
+ (gdbm.scm-dest
+ (string-append module-dir "/gdbm.scm"))
+ (gdbm.go-dest
+ (string-append module-dir "/gdbm.go")))
+ ;; Make installation directories.
+ (mkdir-p module-dir)
+ (mkdir-p doc)
+
+ ;; Switch directory for compiling and installing
+ (chdir source)
+
+ ;; copy the source
+ (copy-file "gdbm.scm" gdbm.scm-dest)
+
+ ;; Patch the FFI
+ (substitute* gdbm.scm-dest
+ (("\\(dynamic-link \"libgdbm\"\\)")
+ (format #f "(dynamic-link \"~a/lib/libgdbm.so\")"
+ (assoc-ref %build-inputs "gdbm"))))
+
+ ;; compile to the destination
+ (compile-file gdbm.scm-dest
+ #:output-file gdbm.go-dest)))))
+ (inputs
+ `(("guile" ,guile-2.0)))
+ (propagated-inputs
+ `(("gdbm" ,gdbm)))
+ (home-page "https://github.com/ijp/guile-gdbm")
+ (synopsis "Guile bindings to the GDBM library via Guile's FFI")
+ (description
+ "Guile bindings to the GDBM key-value storage system, using
+Guile's foreign function interface.")
+ (license gpl3+)))
+
;;; guile.scm ends here