1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (distro packages scheme)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (distro packages m4)
26 #:use-module (distro packages multiprecision)
27 #:use-module (distro packages emacs)
28 #:use-module (distro packages texinfo)
29 #:use-module (ice-9 match))
31 (define-public mit-scheme
35 (source #f) ; see below
36 (build-system gnu-build-system)
38 `(#:tests? #f ; no "check" target
42 (lambda* (#:key inputs #:allow-other-keys)
43 (and (zero? (system* "tar" "xzvf"
44 (assoc-ref inputs "source")))
45 (chdir ,(string-append name "-" version))
47 ;; Delete these dangling symlinks since they break
50 (append (find-files "src/lib/lib" "\\.so$")
51 (find-files "src/lib" "^ffi-test")))
56 (lambda* (#:key system outputs #:allow-other-keys)
57 (let ((out (assoc-ref outputs "out")))
58 (if (or (string-prefix? "x86_64" system)
59 (string-prefix? "i686" system))
60 (zero? (system* "make" "compile-microcode"))
61 (zero? (system* "./etc/make-liarc.sh"
62 (string-append "--prefix=" out))))))
65 `(;; TODO: Build doc when TeX Live is available.
66 ;; ("automake" ,automake)
67 ;; ("texlive-core" ,texlive-core)
73 ;; MIT/GNU Scheme is not bootstrappable, so it's recommended to
74 ;; compile from the architecture-specific tarballs, which contain
75 ;; pre-built binaries. It leads to more efficient code than when
76 ;; building the tarball that contains generated C code instead of
80 (uri (string-append "mirror://gnu/mit-scheme/stable.pkg/"
81 version "/mit-scheme-"
84 ("x86_64-linux" "x86-64")
92 "1wcxm9hyfc53myvlcn93fyqrnnn4scwkknl9hkbp1cphc6mp291x"))
95 "0vi760fy550d9db538m0vzbq1mpdncvw9g8bk4lswk0kcdira55z"))
98 "0pclakzwxbqgy6wqwvs6ml62wgby8ba8xzmwzdwhx1v8wv05yw1j")))))))))
99 (home-page "http://www.gnu.org/software/mit-scheme/")
100 (synopsis "MIT/GNU Scheme, a native code Scheme compiler")
102 "MIT/GNU Scheme is an implementation of the Scheme programming
103 language, providing an interpreter, compiler, source-code debugger,
104 integrated Emacs-like editor, and a large runtime library. MIT/GNU
105 Scheme is best suited to programming large applications with a rapid
109 (define-public bigloo
115 (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo"
119 "0v1q0gcbn38ackdzsnvpkdgaj6ydkfdya31l2hag21aig087px1y"))))
120 (build-system gnu-build-system)
122 '(#:patches (list (assoc-ref %build-inputs "patch/shebangs"))
124 #:phases (alist-replace
126 (lambda* (#:key outputs #:allow-other-keys)
128 (substitute* "configure"
130 (string-append "shell=" (which "bash") "\n")))
132 ;; Those variables are used by libgc's `configure'.
133 (setenv "SHELL" (which "bash"))
134 (setenv "CONFIG_SHELL" (which "bash"))
136 ;; The `configure' script doesn't understand options
137 ;; of those of Autoconf.
138 (let ((out (assoc-ref outputs "out")))
140 (system* "./configure"
141 (string-append "--prefix=" out)
142 (string-append"--mv=" (which "mv"))
143 (string-append "--rm=" (which "rm"))))))
145 'patch 'patch-absolute-file-names
147 (substitute* (cons "configure"
148 (find-files "gc" "^install-gc"))
149 (("/bin/rm") (which "rm"))
150 (("/bin/mv") (which "mv"))))
155 ("patch/shebangs" ,(search-patch "bigloo-gc-shebangs.patch"))))
156 (home-page "http://www-sop.inria.fr/indes/fp/Bigloo/")
157 (synopsis "Bigloo, an efficient Scheme compiler")
159 "Bigloo is a Scheme implementation devoted to one goal: enabling
160 Scheme based programming style where C(++) is usually
161 required. Bigloo attempts to make Scheme practical by offering
162 features usually presented by traditional programming languages
163 but not offered by Scheme and functional programming. Bigloo
164 compiles Scheme modules. It delivers small and fast stand alone
165 binary executables. Bigloo enables full connections between
166 Scheme and C programs, between Scheme and Java programs, and
167 between Scheme and C# programs.")