gnu: httpd: Update to 2.4.12.
[jackhill/guix/guix.git] / gnu / packages / lisp.scm
CommitLineData
f842bbed
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
00ab9458 3;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
f842bbed
JD
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages lisp)
21 #:use-module (gnu packages)
b5b73a82 22 #:use-module ((guix licenses) #:prefix license:)
f842bbed
JD
23 #:use-module (guix packages)
24 #:use-module (gnu packages readline)
25 #:use-module (gnu packages texinfo)
26 #:use-module (gnu packages texlive)
27 #:use-module (gnu packages m4)
28 #:use-module (guix download)
29 #:use-module (guix utils)
00ab9458
TUBK
30 #:use-module (guix build-system gnu)
31 #:use-module (gnu packages which)
32 #:use-module (gnu packages multiprecision)
33 #:use-module (gnu packages bdw-gc)
560f51d0
TUBK
34 #:use-module (gnu packages libffi)
35 #:use-module (gnu packages libffcall)
36 #:use-module (gnu packages readline)
37 #:use-module (gnu packages libsigsegv))
f842bbed
JD
38
39(define-public gcl
40 (package
41 (name "gcl")
e6c1e91d 42 (version "2.6.12")
f842bbed
JD
43 (source
44 (origin
45 (method url-fetch)
46 (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
47 (sha256
e6c1e91d 48 (base32 "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f"))))
f842bbed
JD
49 (build-system gnu-build-system)
50 (arguments
51 `(#:parallel-build? #f ; The build system seems not to be thread safe.
52 #:tests? #f ; There does not seem to be make check or anything similar.
53 #:configure-flags '("--enable-ansi") ; required for use by the maxima package
54 #:phases (alist-cons-before
55 'configure 'pre-conf
56 (lambda _
57 ;; Patch bug when building readline support. This bug was
58 ;; also observed by Debian
59 ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741819
60 (substitute* "o/gcl_readline.d"
61 (("rl_attempted_completion_function = \\(CPPFunction \\*\\)rl_completion;")
62 "rl_attempted_completion_function = rl_completion;"))
63 (substitute*
64 (append
65 '("pcl/impl/kcl/makefile.akcl"
66 "add-defs"
67 "unixport/makefile.dos"
68 "add-defs.bat"
69 "gcl-tk/makefile.prev"
70 "add-defs1")
71 (find-files "h" "\\.defs"))
72 (("SHELL=/bin/(ba)?sh")
73 (string-append "SHELL=" (which "bash")))))
46251411
AE
74 ;; drop strip phase to make maxima build, see
75 ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
76 (alist-delete 'strip
77 %standard-phases))))
f842bbed
JD
78 (native-inputs
79 `(("m4" ,m4)
80 ("readline" ,readline)
81 ("texinfo" ,texinfo)
82 ("texlive" ,texlive)))
83 (home-page "http://www.gnu.org/software/gcl")
a2b63d58 84 (synopsis "A Common Lisp implementation")
f842bbed
JD
85 (description "GCL is an implementation of the Common Lisp language. It
86features the ability to compile to native object code and to load native
87object code modules directly into its lisp core. It also features a
88stratified garbage collection strategy, a source-level debugger and a built-in
89interface to the Tk widget system.")
90 (license license:lgpl2.0+)))
91
00ab9458
TUBK
92(define-public ecl
93 (package
94 (name "ecl")
95 (version "13.5.1")
96 (source
97 (origin
98 (method url-fetch)
99 (uri (string-append "mirror://sourceforge/ecls/ecls/"
100 (version-major+minor version)
101 "/ecl-" version ".tgz"))
102 (sha256
103 (base32 "18ic8w9sdl0dh3kmyc9lsrafikrd9cg1jkhhr25p9saz0v75f77r"))))
104 (build-system gnu-build-system)
105 (native-inputs `(("which" ,which)))
106 (inputs `(("gmp" ,gmp)
107 ("libatomic-ops" ,libatomic-ops)
108 ("libgc" ,libgc)
109 ("libffi" ,libffi)))
110 (arguments
111 '(#:phases
112 ;; The test-suite seems to assume that ECL is installed. So re-order
113 ;; the phases, then reference the installed executable.
114 (let* ((check-phase (assq-ref %standard-phases 'check))
115 (rearranged-phases
116 (alist-cons-after 'install 'check check-phase
117 (alist-delete 'check %standard-phases))))
118 (alist-cons-before
119 'check 'pre-check
120 (lambda* (#:key outputs #:allow-other-keys)
121 (substitute* '("build/tests/Makefile")
122 (("ECL=ecl")
123 (string-append
124 "ECL=" (assoc-ref outputs "out") "/bin/ecl"))))
125 rearranged-phases))
126 ;; Parallel builds explicitly not supported:
127 ;; http://sourceforge.net/p/ecls/bugs/98/
128 #:parallel-build? #f
129 #:parallel-tests? #f))
130 (home-page "http://ecls.sourceforge.net/")
131 (synopsis "Embeddable Common Lisp")
132 (description "ECL is an implementation of the Common Lisp language as
133defined by the ANSI X3J13 specification. Its most relevant features are: a
134bytecode compiler and interpreter, being able to compile Common Lisp with any
135C/C++ compiler, being able to build standalone executables and libraries, and
136supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
137 ;; Note that the file "Copyright" points to some files and directories
138 ;; which aren't under the lgpl2.0+ and instead contain many different,
139 ;; non-copyleft licenses.
140 (license license:lgpl2.0+)))
560f51d0
TUBK
141
142(define-public clisp
143 (package
144 (name "clisp")
145 (version "2.49")
146 (source
147 (origin
148 (method url-fetch)
149 (uri (string-append "mirror://gnu/clisp/release/" version
150 "/clisp-" version ".tar.gz"))
151 (sha256
152 (base32 "0rp82nqp5362isl9i34rwgg04cidz7izljd9d85pqcw1qr964bxx"))))
153 (build-system gnu-build-system)
154 (inputs `(("libffcall" ,libffcall)
155 ("readline" ,readline)
156 ("libsigsegv" ,libsigsegv)))
157 (arguments
158 '(#:phases
159 (alist-cons-after
160 'unpack 'patch-sh-and-pwd
161 (lambda _
162 ;; The package is very messy with its references to "/bin/sh" and
163 ;; some other absolute paths to traditional tools. These appear in
164 ;; many places where our automatic patching misses them. Therefore
165 ;; we do the following, in this early (post-unpack) phase, to solve
166 ;; the problem from its root.
167 (substitute* (find-files "." "configure|Makefile")
168 (("/bin/sh") "sh"))
169 (substitute* '("src/clisp-link.in")
170 (("/bin/pwd") "pwd")))
171 (alist-cons-before
172 'build 'chdir-to-source
173 (lambda _
174 ;; We are supposed to call make under the src sub-directory.
175 (chdir "src"))
176 %standard-phases))
177 ;; Makefiles seem to have race conditions.
178 #:parallel-build? #f))
179 (home-page "http://www.clisp.org/")
180 (synopsis "Common Lisp implementation")
181 (description "GNU CLISP is an implementation of ANSI Common Lisp, with
182many extensions. It includes an interpreter, compiler, debugger, CLOS, MOP,
183an FFI, i18n, POSIX and Perl regular expressions, a socket interface, fast
184bignums, arbitrary precision floats, and more. An X11 interface is available
185through CLX, Garnet and CLUE/CLIO. Command line editing is provided by
186readline.")
187 ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source files have
188 ;; a lot of gpl3+. (Also some parts are under non-copyleft licenses, such
189 ;; as CLX by Texas Instruments.) In that case gpl3+ wins out.
190 (license license:gpl3+)))