Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / lisp.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
12 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
13 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
14 ;;; Copyright © 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
15 ;;; Copyright © 2019, 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
16 ;;; Copyright © 2019 Jesse Gildersleve <jessejohngildersleve@protonmail.com>
17 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
18 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
19 ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
20 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
21 ;;;
22 ;;; This file is part of GNU Guix.
23 ;;;
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
28 ;;;
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
33 ;;;
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36
37 ;;; This file only contains Common Lisp compilers and tooling.
38 ;;; Common Lisp libraries go to lisp-xyz.scm.
39 ;;; Common Lisp applications should go to the most appropriate file,
40 ;;; e.g. StumpWM is in wm.scm.
41
42 (define-module (gnu packages lisp)
43 #:use-module (gnu packages)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix utils)
49 #:use-module (guix build-system copy)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system ant)
52 #:use-module (guix build-system asdf)
53 #:use-module (guix build-system trivial)
54 #:use-module (gnu packages admin)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages bdw-gc)
57 #:use-module (gnu packages compression)
58 #:use-module (gnu packages ed)
59 #:use-module (gnu packages fontutils)
60 #:use-module (gnu packages gcc)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages gl)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages m4)
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages multiprecision)
67 #:use-module (gnu packages ncurses)
68 #:use-module (gnu packages libffcall)
69 #:use-module (gnu packages libffi)
70 #:use-module (gnu packages libsigsegv)
71 #:use-module (gnu packages linux)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages readline)
74 #:use-module (gnu packages sdl)
75 #:use-module (gnu packages tex)
76 #:use-module (gnu packages tls)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages version-control)
79 #:use-module (gnu packages xorg)
80 #:use-module (ice-9 match))
81
82 (define-public cl-asdf
83 (package
84 (name "cl-asdf")
85 (version "3.3.4")
86 (source
87 (origin
88 (method url-fetch)
89 (uri
90 (string-append "https://common-lisp.net/project/asdf/archives/asdf-"
91 version ".lisp"))
92 (sha256
93 (base32 "1hpx30f6yrak15nw992k7x3pn75ahvjs04n4f134k68mhgs62km2"))))
94 (build-system trivial-build-system)
95 (native-inputs
96 `(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch"))
97 ("patch" ,patch)))
98 (arguments
99 `(#:modules ((guix build utils)
100 (guix build lisp-utils))
101 #:builder
102 (begin
103 (use-modules (guix build utils)
104 (guix build lisp-utils))
105 (let* ((out (string-append (assoc-ref %outputs "out")))
106 (asdf-install (string-append out %source-install-prefix
107 "/source/asdf/"))
108 (src-asdf (string-append (assoc-ref %build-inputs "source")))
109 (dst-asdf (string-append asdf-install "asdf.lisp"))
110 (patch (string-append (assoc-ref %build-inputs "patch")
111 "/bin/patch"))
112 (config-patch (assoc-ref %build-inputs "config-patch")))
113 (mkdir-p asdf-install)
114 (copy-file src-asdf dst-asdf)
115 (invoke patch "-p1" "-i" config-patch dst-asdf)))))
116 (home-page "https://common-lisp.net/project/asdf/")
117 (synopsis "Another System Definition Facility")
118 (description
119 "ASDF is what Common Lisp hackers use to build and load software. It is
120 the successor of the Lisp DEFSYSTEM of yore. ASDF stands for Another System
121 Definition Facility.")
122 ;; MIT License
123 (license license:expat)))
124
125 (define-public gcl
126 (let ((commit "d3335e2b3deb63f930eb0328e9b05377744c9512")
127 (revision "2")) ;Guix package revision
128 (package
129 (name "gcl")
130 (version (string-append "2.6.12-" revision "."
131 (string-take commit 7)))
132 (source
133 (origin
134 (method git-fetch)
135 (uri (git-reference
136 (url "https://git.savannah.gnu.org/r/gcl.git")
137 (commit commit)))
138 (file-name (string-append "gcl-" version "-checkout"))
139 (sha256
140 (base32 "05v86lhvsby05nzvcd3c4k0wljvgdgd0i6arzd2fx1yd67dl6fgj"))))
141 (build-system gnu-build-system)
142 (arguments
143 `(#:parallel-build? #f ; The build system seems not to be thread safe.
144 #:test-target "ansi-tests/test_results"
145 #:configure-flags '("--enable-ansi") ; required for use by the maxima package
146 #:make-flags (list
147 (string-append "GCL_CC=" (assoc-ref %build-inputs "gcc")
148 "/bin/gcc")
149 (string-append "CC=" (assoc-ref %build-inputs "gcc")
150 "/bin/gcc"))
151 #:phases
152 (modify-phases %standard-phases
153 (add-before 'configure 'pre-conf
154 (lambda* (#:key inputs #:allow-other-keys)
155 (chdir "gcl")
156 (substitute*
157 (append
158 '("pcl/impl/kcl/makefile.akcl"
159 "add-defs"
160 "unixport/makefile.dos"
161 "add-defs.bat"
162 "gcl-tk/makefile.prev"
163 "add-defs1")
164 (find-files "h" "\\.defs"))
165 (("SHELL=/bin/bash")
166 (string-append "SHELL=" (which "bash")))
167 (("SHELL=/bin/sh")
168 (string-append "SHELL=" (which "sh"))))
169 (substitute* "h/linux.defs"
170 (("#CC") "CC")
171 (("-fwritable-strings") "")
172 (("-Werror") ""))
173 (substitute* "lsp/gcl_top.lsp"
174 (("\"cc\"")
175 (string-append "\"" (assoc-ref %build-inputs "gcc")
176 "/bin/gcc\""))
177 (("\\(or \\(get-path \\*cc\\*\\) \\*cc\\*\\)") "*cc*")
178 (("\"ld\"")
179 (string-append "\"" (assoc-ref %build-inputs "binutils")
180 "/bin/ld\""))
181 (("\\(or \\(get-path \\*ld\\*\\) \\*ld\\*\\)") "*ld*")
182 (("\\(get-path \"objdump --source \"\\)")
183 (string-append "\"" (assoc-ref %build-inputs "binutils")
184 "/bin/objdump --source \"")))
185 #t))
186 (add-after 'install 'wrap
187 (lambda* (#:key inputs outputs #:allow-other-keys)
188 (let* ((gcl (assoc-ref outputs "out"))
189 (input-path (lambda (lib path)
190 (string-append
191 (assoc-ref inputs lib) path)))
192 (binaries '("binutils")))
193 ;; GCC and the GNU binutils are necessary for GCL to be
194 ;; able to compile Lisp functions and programs (this is
195 ;; a standard feature in Common Lisp). While the
196 ;; the location of GCC is specified in the make-flags,
197 ;; the GNU binutils must be available in GCL's $PATH.
198 (wrap-program (string-append gcl "/bin/gcl")
199 `("PATH" prefix ,(map (lambda (binary)
200 (input-path binary "/bin"))
201 binaries))))
202 #t))
203 ;; drop strip phase to make maxima build, see
204 ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
205 (delete 'strip))))
206 (inputs
207 `(("gmp" ,gmp)
208 ("readline" ,readline)))
209 (native-inputs
210 `(("m4" ,m4)
211 ("texinfo" ,texinfo)))
212 (home-page "https://www.gnu.org/software/gcl/")
213 (synopsis "A Common Lisp implementation")
214 (description "GCL is an implementation of the Common Lisp language. It
215 features the ability to compile to native object code and to load native
216 object code modules directly into its lisp core. It also features a
217 stratified garbage collection strategy, a source-level debugger and a built-in
218 interface to the Tk widget system.")
219 (license license:lgpl2.0+))))
220
221 (define-public ecl
222 (package
223 (name "ecl")
224 (version "21.2.1")
225 (source
226 (origin
227 (method url-fetch)
228 (uri (string-append
229 "https://common-lisp.net/project/ecl/static/files/release/"
230 name "-" version ".tgz"))
231 (sha256
232 (base32 "000906nnq25177bgsfndiw3iqqgrjc9spk10hzk653sbz3f7anmi"))))
233 (build-system gnu-build-system)
234 ;; src/configure uses 'which' to confirm the existence of 'gzip'.
235 (native-inputs
236 `(("cl-asdf" ,cl-asdf)
237 ("which" ,which)
238 ("texinfo" ,texinfo)))
239 ;; When ECL is embedded in a program that wants to use Common Lisp as an
240 ;; extension language, libgmp, libatomic-ops, libgc and libffi must be
241 ;; present when compiling the program because they are required by ECL's
242 ;; header file.
243 ;; Therefore we put these libraries in 'propagated-inputs' instead
244 ;; of 'inputs'.
245 (propagated-inputs
246 `(("gmp" ,gmp)
247 ("libatomic-ops" ,libatomic-ops)
248 ("libgc" ,libgc)
249 ("libffi" ,libffi)))
250 (arguments
251 `(#:configure-flags '("--without-rt")
252 ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
253 ;; 2-3 tests may be due to FHS assumptions.
254 #:tests? #t
255 #:parallel-tests? #f
256 #:phases
257 (modify-phases %standard-phases
258 (delete 'check)
259 (add-after 'unpack 'replace-asdf
260 ;; Use system ASDF instead of bundled one.
261 (lambda* (#:key inputs #:allow-other-keys)
262 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
263 (guix-asdf (string-append
264 cl-asdf
265 "/share/common-lisp/source/asdf/asdf.lisp"))
266 (contrib-asdf "contrib/asdf/asdf.lisp"))
267 (copy-file guix-asdf contrib-asdf))
268 #t))
269 (add-after 'install 'remove-build-stamp
270 (lambda* (#:key outputs #:allow-other-keys)
271 (delete-file (string-append (assoc-ref outputs "out")
272 "/lib/ecl-" ,version "/build-stamp"))
273 #t))
274 (add-after 'remove-build-stamp 'wrap
275 (lambda* (#:key inputs outputs #:allow-other-keys)
276 (let* ((ecl (assoc-ref outputs "out"))
277 (input-path (lambda (lib path)
278 (string-append
279 (assoc-ref inputs lib) path)))
280 (libraries '("gmp" "libatomic-ops" "libgc" "libffi" "libc"))
281 (binaries '("gcc" "ld-wrapper" "binutils"))
282 (library-directories
283 (map (lambda (lib) (input-path lib "/lib"))
284 libraries)))
285
286 (wrap-program (string-append ecl "/bin/ecl")
287 `("PATH" prefix
288 ,(map (lambda (binary)
289 (input-path binary "/bin"))
290 binaries))
291 `("CPATH" suffix
292 ,(map (lambda (lib)
293 (input-path lib "/include"))
294 `("kernel-headers" ,@libraries)))
295 `("LIBRARY_PATH" suffix ,library-directories)
296 `("LD_LIBRARY_PATH" suffix ,library-directories))
297 #t)))
298 (add-after 'wrap 'check (assoc-ref %standard-phases 'check))
299 (add-before 'check 'fix-path-to-ecl
300 (lambda _
301 (substitute* "build/tests/Makefile"
302 (("\\$\\{exec_prefix\\}/") ""))
303 #t)))))
304 (native-search-paths
305 (list (search-path-specification
306 (variable "XDG_DATA_DIRS")
307 (files '("share")))
308 (search-path-specification
309 (variable "XDG_CONFIG_DIRS")
310 (files '("etc")))))
311 (home-page "http://ecls.sourceforge.net/")
312 (synopsis "Embeddable Common Lisp")
313 (description "ECL is an implementation of the Common Lisp language as
314 defined by the ANSI X3J13 specification. Its most relevant features are: a
315 bytecode compiler and interpreter, being able to compile Common Lisp with any
316 C/C++ compiler, being able to build standalone executables and libraries, and
317 supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
318 ;; Note that the file "Copyright" points to some files and directories
319 ;; which aren't under the lgpl2.1+ and instead contain many different,
320 ;; non-copyleft licenses.
321 ;; See https://common-lisp.net/project/ecl/posts/ECL-license.html.
322 (license license:lgpl2.1+)))
323
324 (define-public clisp
325 (package
326 (name "clisp")
327 (version "2.49-92")
328 (source
329 (origin
330 (method git-fetch)
331 (uri (git-reference
332 (url "https://gitlab.com/gnu-clisp/clisp")
333 (commit "clisp-2.49.92-2018-02-18")))
334 (file-name (git-file-name name version))
335 (sha256
336 (base32 "0k2dmgl0miz3767iks4p0mvp6xw0ysyxhjpklyh11j010rmh6hqb"))))
337 (build-system gnu-build-system)
338 (native-inputs
339 `(("cl-asdf" ,cl-asdf)))
340 (inputs `(("libffcall" ,libffcall)
341 ("ncurses" ,ncurses)
342 ("readline" ,readline)
343 ("libsigsegv" ,libsigsegv)))
344 (arguments
345 `(#:configure-flags '(,@(if (string-prefix? "armhf-linux"
346 (or (%current-system)
347 (%current-target-system)))
348 '("CFLAGS=-falign-functions=4")
349 '())
350 "--with-dynamic-ffi"
351 "--with-dynamic-modules"
352 "--with-ffcall"
353 "--with-readline"
354 "--with-sigsegv"
355 "--with-module=asdf"
356 "--with-module=rawsock")
357 #:phases
358 (modify-phases %standard-phases
359 (add-after 'unpack 'patch-sh-and-pwd
360 (lambda _
361 ;; The package is very messy with its references to "/bin/sh" and
362 ;; some other absolute paths to traditional tools. These appear in
363 ;; many places where our automatic patching misses them. Therefore
364 ;; we do the following, in this early (post-unpack) phase, to solve
365 ;; the problem from its root.
366 (substitute* '("src/clisp-link.in"
367 "src/unix.d"
368 "src/makemake.in")
369 (("/bin/sh") (which "sh")))
370 (substitute* (find-files "." "configure|Makefile")
371 (("/bin/sh") "sh"))
372 (substitute* '("src/clisp-link.in")
373 (("/bin/pwd") "pwd"))
374 #t))
375 (add-after 'unpack 'replace-asdf
376 ;; Use system ASDF instead of bundled one.
377 (lambda* (#:key inputs #:allow-other-keys)
378 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
379 (guix-asdf (string-append
380 cl-asdf
381 "/share/common-lisp/source/asdf/asdf.lisp"))
382 (contrib-asdf "modules/asdf/asdf.lisp"))
383 (delete-file contrib-asdf)
384 (copy-file guix-asdf contrib-asdf)))))))
385 (native-search-paths
386 (list (search-path-specification
387 (variable "XDG_DATA_DIRS")
388 (files '("share")))
389 (search-path-specification
390 (variable "XDG_CONFIG_DIRS")
391 (files '("etc")))))
392 (home-page "https://clisp.sourceforge.io/")
393 (synopsis "A Common Lisp implementation")
394 (description
395 "GNU CLISP is an implementation of ANSI Common Lisp. Common Lisp is a
396 high-level, object-oriented functional programming language. CLISP includes
397 an interpreter, a compiler, a debugger, and much more.")
398 (license license:gpl2+)))
399
400 (define-public sbcl
401 (package
402 (name "sbcl")
403 (version "2.1.2")
404 (source
405 (origin
406 (method url-fetch)
407 (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
408 version "-source.tar.bz2"))
409 (sha256
410 (base32 "02scrqyp2izsd8xjm2k5j5lhn4pdhd202jlcb54ysmcqjd80awdp"))))
411 (build-system gnu-build-system)
412 (outputs '("out" "doc"))
413 (native-inputs
414 ;; From INSTALL:
415 ;; Supported build hosts are:
416 ;; SBCL
417 ;; CMUCL
418 ;; CCL (formerly known as OpenMCL)
419 ;; ABCL (recent versions only)
420 ;; CLISP (only some versions: 2.44.1 is OK, 2.47 is not)
421 ;; XCL
422 ;;
423 ;; From NEWS:
424 ;; * build enhancement: new host quirks mechanism, support for building under
425 ;; ABCL and ECL (as well as CCL, CMUCL, CLISP and SBCL itself)
426 ;;
427 ;; CCL is not bootstrappable so it won't do. CLISP 2.49 seems to work.
428 ;; ECL too. As of 2020-07-01, ECL was last updated in 2020 while CLISP
429 ;; was last updated in 2010, and both take about the same time to build SBCL.
430 ;;
431 ;; For now we stick to CLISP for all systems. We keep the `match' here
432 ;; to make it easier to change the host compiler for various
433 ;; architectures. Consider switching to ECL if it gets faster than CLISP
434 ;; (maybe post 2020 release).
435 `(,@(match (%current-system)
436 ((or "x86_64-linux" "i686-linux")
437 `(("clisp" ,clisp)))
438 (_
439 `(("clisp" ,clisp))))
440 ("cl-asdf" ,cl-asdf)
441 ("ed" ,ed)
442 ("inetutils" ,inetutils) ;for hostname(1)
443 ("texinfo" ,texinfo)
444 ("texlive" ,(texlive-updmap.cfg (list texlive-tex-texinfo)))
445 ("which" ,which)
446 ("zlib" ,zlib)))
447 (arguments
448 `(#:modules ((guix build gnu-build-system)
449 (guix build utils)
450 (srfi srfi-1))
451 #:phases
452 (modify-phases %standard-phases
453 (delete 'configure)
454 (add-after 'unpack 'replace-asdf
455 ;; SBCL developers have not committed to keeping ASDF up to date
456 ;; due to breaking changes [1]. Guix can handle this situation
457 ;; easily, and it behooves us to have more control over what version
458 ;; of ASDF we use to build software; therefore, replace the contrib
459 ;; ASDF with the version packaged into Guix.
460 ;; [1] - https://bugs.launchpad.net/sbcl/+bug/1823442
461 (lambda* (#:key inputs #:allow-other-keys)
462 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
463 (guix-asdf (string-append
464 cl-asdf
465 "/share/common-lisp/source/asdf/asdf.lisp"))
466 (contrib-asdf "contrib/asdf/asdf.lisp"))
467 (copy-file guix-asdf contrib-asdf))
468 #t))
469 (add-before 'build 'patch-unix-tool-paths
470 (lambda* (#:key outputs inputs #:allow-other-keys)
471 (let ((out (assoc-ref outputs "out"))
472 (bash (assoc-ref inputs "bash"))
473 (coreutils (assoc-ref inputs "coreutils"))
474 (ed (assoc-ref inputs "ed")))
475 (define (quoted-path input path)
476 (string-append "\"" input path "\""))
477 ;; Patch absolute paths in string literals. Note that this
478 ;; occurs in some .sh files too (which contain Lisp code). Use
479 ;; ISO-8859-1 because some of the files are ISO-8859-1 encoded.
480 (with-fluids ((%default-port-encoding #f))
481 ;; The removed file is utf-16-be encoded, which gives substitute*
482 ;; trouble. It does not contain references to the listed programs.
483 (substitute* (delete
484 "./tests/data/compile-file-pos-utf16be.lisp"
485 (find-files "." "\\.(lisp|sh)$"))
486 (("\"/bin/sh\"") (quoted-path bash "/bin/sh"))
487 (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env"))
488 (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat"))
489 (("\"/bin/ed\"") (quoted-path ed "/bin/ed"))
490 (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo"))
491 (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))))
492 ;; This one script has a non-string occurrence of /bin/sh.
493 (substitute* '("tests/foreign.test.sh")
494 ;; Leave whitespace so we don't match the shebang.
495 ((" /bin/sh ") " sh "))
496 ;; This file contains a module that can create executable files
497 ;; which depend on the presence of SBCL. It generates shell
498 ;; scripts doing "exec sbcl ..." to achieve this. We patch both
499 ;; the shebang and the reference to "sbcl", tying the generated
500 ;; executables to the exact SBCL package that generated them.
501 (substitute* '("contrib/sb-executable/sb-executable.lisp")
502 (("/bin/sh") (string-append bash "/bin/sh"))
503 (("exec sbcl") (string-append "exec " out "/bin/sbcl")))
504 ;; Disable some tests that fail in our build environment.
505 (substitute* '("contrib/sb-bsd-sockets/tests.lisp")
506 ;; This requires /etc/protocols.
507 (("\\(deftest get-protocol-by-name/error" all)
508 (string-append "#+nil ;disabled by Guix\n" all)))
509 (substitute* '("contrib/sb-posix/posix-tests.lisp")
510 ;; These assume some users/groups which we don't have.
511 (("\\(deftest pwent\\.[12]" all)
512 (string-append "#+nil ;disabled by Guix\n" all))
513 (("\\(deftest grent\\.[12]" all)
514 (string-append "#+nil ;disabled by Guix\n" all))))
515 #t))
516 (replace 'build
517 (lambda* (#:key outputs #:allow-other-keys)
518 (setenv "CC" "gcc")
519 (invoke "sh" "make.sh" ,@(match (%current-system)
520 ((or "x86_64-linux" "i686-linux")
521 `("clisp"))
522 (_
523 `("clisp")))
524 (string-append "--prefix="
525 (assoc-ref outputs "out"))
526 "--dynamic-space-size=3072"
527 "--with-sb-core-compression"
528 "--with-sb-xref-for-internals")))
529 (replace 'install
530 (lambda _
531 (invoke "sh" "install.sh")))
532 (add-after 'build 'build-doc
533 (lambda _
534 ;; TODO: Doc is not deterministic, maybe there is a timespamp?
535 (with-directory-excursion "doc/manual"
536 (and (invoke "make" "info")
537 (invoke "make" "dist")))))
538 (add-after 'build 'build-source
539 (lambda* (#:key outputs #:allow-other-keys)
540 (let* ((out (assoc-ref outputs "out"))
541 (rc (string-append out "/lib/sbcl/sbclrc"))
542 (source-dir (string-append out "/share/sbcl")))
543 (for-each (lambda (p)
544 (copy-recursively p (string-append source-dir "/" p)))
545 '("src" "contrib"))
546 (mkdir-p (dirname rc))
547 (with-output-to-file rc
548 (lambda ()
549 (display
550 (string-append "(sb-ext:set-sbcl-source-location \""
551 source-dir "\")") )))
552 #t)))
553 (add-after 'install 'install-doc
554 (lambda* (#:key outputs #:allow-other-keys)
555 (let* ((out (assoc-ref outputs "out"))
556 (doc (assoc-ref outputs "doc"))
557 (old-doc-dir (string-append out "/share/doc"))
558 (new-doc/sbcl-dir (string-append doc "/share/doc/sbcl")))
559 (rmdir (string-append old-doc-dir "/sbcl/html"))
560 (mkdir-p new-doc/sbcl-dir)
561 (copy-recursively (string-append old-doc-dir "/sbcl")
562 new-doc/sbcl-dir)
563 (delete-file-recursively old-doc-dir)
564 #t))))
565 ;; No 'check' target, though "make.sh" (build phase) runs tests.
566 #:tests? #f))
567 (native-search-paths
568 (list (search-path-specification
569 (variable "XDG_DATA_DIRS")
570 (files '("share")))
571 (search-path-specification
572 (variable "XDG_CONFIG_DIRS")
573 (files '("etc")))))
574 (home-page "http://www.sbcl.org/")
575 (synopsis "Common Lisp implementation")
576 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
577 Lisp compiler. In addition to the compiler and runtime system for ANSI Common
578 Lisp, it provides an interactive environment including a debugger, a
579 statistical profiler, a code coverage tool, and many other extensions.")
580 ;; Public domain in jurisdictions that allow it, bsd-2 otherwise. MIT
581 ;; loop macro has its own license. See COPYING file for further notes.
582 (license (list license:public-domain license:bsd-2
583 (license:x11-style "file://src/code/loop.lisp")))))
584
585 (define-public ccl
586 ;; Warning: according to upstream, CCL is not bootstrappable.
587 ;; See https://github.com/Clozure/ccl/issues/222 from 2019-09-02:
588 ;;
589 ;; "As far as I know, there is no way to build CCL without an existing
590 ;; running CCL image. It was bootstrapped back in 1986 or so as
591 ;; Macintosh Common Lisp, by Gary Byers, I believe, who is no longer on
592 ;; the planet to tell us the story. It SHOULD be possible to port the
593 ;; CCL compiler to portable Common Lisp, so that ANY lisp could build
594 ;; it, as is the case for SBCL, but I know of no attempt to do so."
595 (package
596 (name "ccl")
597 (version "1.12")
598 (source (origin
599 (method git-fetch)
600 (uri (git-reference
601 (url "https://github.com/Clozure/ccl/")
602 (commit (string-append "v" version))))
603 (file-name (git-file-name "ccl" version))
604 (sha256
605 (base32
606 "0kxr24d2fzsmpsilijpwwfl6g89y7fcrwb80kai5nx9pwgxmjbp3"))))
607 (build-system gnu-build-system)
608 ;; CCL consists of a "lisp kernel" and "heap image", both of which are
609 ;; shipped in precompiled form in source tarballs. The former is a C
610 ;; program which we can rebuild from scratch, but the latter cannot be
611 ;; generated without an already working copy of CCL, and is platform
612 ;; dependent, so we need to fetch the correct tarball for the platform.
613 (inputs
614 `(("ccl-bootstrap"
615 ,(origin
616 (method url-fetch)
617 (uri (string-append
618 "https://github.com/Clozure/ccl/releases/download/v" version "/"
619 (match (%current-system)
620 ("armhf-linux" "linuxarm")
621 ;; XXX: This source only works on x86, but provide it as a
622 ;; catch-all to prevent errors when querying this package
623 ;; on unsupported platforms.
624 (_ "linuxx86"))
625 ".tar.gz"))
626 (sha256
627 (base32
628 (match (%current-system)
629 ("armhf-linux"
630 "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c")
631 (_ "15l7cfa4a7jkfwdzsfm4q3n22jnb57imxahpql3h77xin57v1gbz"))))))))
632 (native-inputs
633 `(("cl-asdf" ,cl-asdf)
634 ("m4" ,m4)))
635 (arguments
636 `(#:tests? #f ;no 'check' target
637 #:modules ((ice-9 match)
638 (srfi srfi-26)
639 (guix build utils)
640 (guix build gnu-build-system))
641 #:phases
642 (modify-phases %standard-phases
643 (add-after 'unpack 'unpack-image
644 (lambda* (#:key inputs #:allow-other-keys)
645 (invoke "tar" "xzvf" (assoc-ref inputs "ccl-bootstrap"))))
646 (add-after 'unpack 'replace-asdf
647 ;; Use system ASDF instead of bundled one.
648 (lambda* (#:key inputs #:allow-other-keys)
649 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
650 (guix-asdf (string-append
651 cl-asdf
652 "/share/common-lisp/source/asdf/asdf.lisp"))
653 (contrib-asdf "tools/asdf.lisp"))
654 (delete-file contrib-asdf)
655 (copy-file guix-asdf contrib-asdf))))
656 (delete 'configure)
657 (add-before 'build 'pre-build
658 ;; Enter the source directory for the current platform's lisp
659 ;; kernel, and run 'make clean' to remove the precompiled one.
660 (lambda* (#:key system #:allow-other-keys)
661 (substitute* "lisp-kernel/m4macros.m4"
662 (("/bin/pwd") (which "pwd")))
663 (chdir (string-append
664 "lisp-kernel/"
665 (match system
666 ("i686-linux" "linuxx8632")
667 ("x86_64-linux" "linuxx8664")
668 ("armhf-linux" "linuxarm")
669 (_ (string-append "unknown system: " system)))))
670 (substitute* '("Makefile")
671 (("/bin/rm") "rm"))
672 (setenv "CC" "gcc")
673 (invoke "make" "clean")))
674 ;; XXX Do we need to recompile the heap image as well for Guix?
675 ;; For now just use the one we already got in the tarball.
676 (replace 'install
677 (lambda* (#:key outputs inputs system #:allow-other-keys)
678 ;; The lisp kernel built by running 'make' in lisp-kernel/$system
679 ;; is put back into the original directory, so go back. The heap
680 ;; image is there as well.
681 (chdir "../..")
682 (let* ((out (assoc-ref outputs "out"))
683 (libdir (string-append out "/lib/"))
684 (bindir (string-append out "/bin/"))
685 (wrapper (string-append bindir "ccl"))
686 (bash (assoc-ref inputs "bash"))
687 (kernel
688 (match system
689 ("i686-linux" "lx86cl")
690 ("x86_64-linux" "lx86cl64")
691 ("armhf-linux" "armcl")
692 ;; Unlikely to work, but try it anyway...
693 (_ system)))
694 (heap (string-append kernel ".image")))
695 (install-file kernel libdir)
696 (install-file heap libdir)
697
698 (let ((dirs `("lib" "library" "examples" "tools" "objc-bridge"
699 ,@(match system
700 ("x86_64-linux"
701 '("x86-headers64"))
702 ("i686-linux"
703 '("x86-headers"))
704 (_ '())))))
705 (for-each copy-recursively
706 dirs
707 (map (cut string-append libdir <>) dirs)))
708
709 (mkdir-p bindir)
710 (with-output-to-file wrapper
711 (lambda ()
712 (display
713 (string-append
714 "#!" bash "/bin/sh\n"
715 "export CCL_DEFAULT_DIRECTORY=" libdir "\n"
716 "exec -a \"$0\" " libdir kernel " \"$@\"\n"))))
717 (chmod wrapper #o755))
718 #t)))))
719 (native-search-paths
720 (list (search-path-specification
721 (variable "XDG_DATA_DIRS")
722 (files '("share")))
723 (search-path-specification
724 (variable "XDG_CONFIG_DIRS")
725 (files '("etc")))))
726 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))
727 (home-page "https://ccl.clozure.com/")
728 (synopsis "Common Lisp implementation")
729 (description "Clozure CL (often called CCL for short) is a Common Lisp
730 implementation featuring fast compilation speed, native threads, a precise,
731 generational, compacting garbage collector, and a convenient foreign-function
732 interface.")
733 (license license:asl2.0)))
734
735 (define-public lush2
736 (package
737 (name "lush2")
738 (version "2.0.1")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
743 version ".tar.gz"))
744 (modules '((guix build utils)))
745 (snippet
746 '(begin
747 (substitute* "src/unix.c"
748 (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
749 (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
750 (substitute* "src/main.c"
751 (("\" \\(built \" __DATE__ \"\\)\"") ""))
752 #t))
753 (sha256
754 (base32
755 "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
756 (build-system gnu-build-system)
757 (arguments
758 `(;; We have to add these LIBS so that they are found.
759 #:configure-flags (list "LIBS=-lz"
760 "X_EXTRA_LIBS=-lfontconfig"
761 "--with-x")
762 #:tests? #f)) ; No make check.
763 (native-inputs `(("intltool" ,intltool)))
764 (inputs
765 `(("alsa-lib" ,alsa-lib)
766 ("sdl" ,sdl)
767 ("sdl-image" ,sdl-image)
768 ("sdl-mixer" ,sdl-mixer)
769 ("sdl-net" ,sdl-net)
770 ("sdl-ttf" ,sdl-ttf)
771 ("lapack" ,lapack)
772 ("libxft" ,libxft)
773 ("fontconfig" ,fontconfig)
774 ("gsl" ,gsl)
775 ("openblas" ,openblas)
776 ("glu" ,glu)
777 ("mesa" ,mesa)
778 ("mesa-utils" ,mesa-utils)
779 ("binutils" ,binutils)
780 ("libiberty" ,libiberty)
781 ("readline" ,readline)
782 ("zlib" ,zlib)
783 ("gettext-minimal" ,gettext-minimal)))
784 (synopsis "Lisp Universal Shell")
785 (description
786 "Lush is an object-oriented Lisp interpreter/compiler with features
787 designed to please people who want to prototype large numerical
788 applications. Lush includes an extensive library of
789 vector/matrix/tensor manipulation, numerous numerical libraries
790 (including GSL, LAPACK, and BLAS), a set of graphic functions, a
791 simple GUI toolkit, and interfaces to various graphic and multimedia
792 libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
793 grabbing), and others. Lush is an ideal frontend script language for
794 programming projects written in C or other languages. Lush also has
795 libraries for Machine Learning, Neural Nets and statistical estimation.")
796 (home-page "http://lush.sourceforge.net/")
797 (license license:lgpl2.1+)))
798
799 (define-public confusion-mdl
800 (let* ((commit "12a055581fc262225272df43287dae48281900f5"))
801 (package
802 (name "confusion-mdl")
803 (version "0.2")
804 (source (origin
805 (method git-fetch)
806 (uri (git-reference
807 (url (string-append "https://gitlab.com/emacsomancer/" name))
808 (commit commit)))
809 (sha256
810 (base32
811 "1zi8kflzvwqg97ha1sa5xjisbjs5z1mvbpa772vfxiv5ksnpxp0d"))
812 (file-name (git-file-name name version))))
813 (build-system gnu-build-system)
814 (arguments
815 `(#:tests? #f ; there are no tests
816 #:phases
817 (modify-phases %standard-phases
818 (delete 'configure)
819 (replace 'build
820 (lambda* (#:key (make-flags '()) #:allow-other-keys)
821 (apply invoke "make" "CC=gcc" make-flags)))
822 (replace 'install
823 (lambda* (#:key outputs #:allow-other-keys)
824 (let* ((out (assoc-ref outputs "out"))
825 (bin (string-append out "/bin")))
826 (install-file "mdli" bin)
827 #t))))))
828 (native-inputs
829 `(("perl" ,perl)))
830 (inputs
831 `(("libgc" ,libgc)))
832 (synopsis "Interpreter for the MIT Design Language (MDL)")
833 (description "MDL (the MIT Design Language) is a descendant of Lisp. It
834 was originally developed in 1971 on the PDP-10 computer under the Incompatible
835 Timesharing System (ITS) to provide high level language support for the
836 Dynamic Modeling Group at MIT's Project MAC. Infocom built the original
837 PDP-10 Zork in MDL and their later ZIL (Zork Implementation Language) was
838 based on a subset of MDL. Confusion is a MDL interpreter that works just well
839 enough to play the original mainframe Zork all the way through.")
840 (home-page "http://www.russotto.net/git/mrussotto/confusion/src/master/src/README")
841 (license license:gpl3+))))
842
843 (define-public txr
844 (package
845 (name "txr")
846 (version "246")
847 (source
848 (origin
849 (method git-fetch)
850 (uri (git-reference
851 (url "http://www.kylheku.com/git/txr/")
852 (commit (string-append "txr-" version))))
853 (file-name (git-file-name name version))
854 (sha256
855 (base32 "1ynkz0ss7nn1ssiaxagpq80iabknf085nk0pra9hn8y9hx7av0db"))))
856 (build-system gnu-build-system)
857 (arguments
858 `(#:configure-flags
859 (list ,(string-append "cc=" (cc-for-target))
860 (string-append "--prefix=" (assoc-ref %outputs "out")))
861 #:test-target "tests"
862 #:phases
863 (modify-phases %standard-phases
864 (replace 'configure
865 ;; ./configure is a hand-written script that can't handle standard
866 ;; autotools arguments like CONFIG_SHELL.
867 (lambda* (#:key configure-flags #:allow-other-keys)
868 (setenv "txr_shell" (which "bash"))
869 (apply invoke "./configure" configure-flags)
870 #t))
871 (add-after 'configure 'fix-tests
872 (lambda _
873 (substitute* (list "tests/017/realpath.tl"
874 "tests/017/realpath.expected")
875 (("/usr/bin") "/"))
876 #t)))))
877 (inputs
878 `(("libffi" ,libffi)))
879 (synopsis "General-purpose, multi-paradigm programming language")
880 (description
881 "TXR is a general-purpose, multi-paradigm programming language. It
882 comprises two languages integrated into a single tool: a text scanning and
883 extraction language referred to as the TXR Pattern Language (sometimes just
884 \"TXR\"), and a general-purpose dialect of Lisp called TXR Lisp. TXR can be
885 used for everything from \"one liner\" data transformation tasks at the
886 command line, to data scanning and extracting scripts, to full application
887 development in a wide-range of areas.")
888 (home-page "https://nongnu.org/txr/")
889 (license license:bsd-2)))
890
891 (define picolisp32
892 (package
893 (name "picolisp32")
894 (version "19.12")
895 (source
896 (origin
897 (method url-fetch)
898 (uri (string-append "https://software-lab.de/picoLisp-" version ".tgz"))
899 (sha256
900 (base32 "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j"))
901 (modules '((guix build utils)))
902 (snippet '(begin
903 ;; Delete the pre-compiled jar file.
904 (delete-file "ersatz/picolisp.jar")
905 #t))))
906 (build-system gnu-build-system)
907 (inputs
908 `(("openssl" ,openssl)))
909 (arguments
910 `(#:system ,(match (%current-system)
911 ((or "armhf-linux" "aarch64-linux")
912 "armhf-linux")
913 (_
914 "i686-linux"))
915 #:phases
916 (modify-phases %standard-phases
917 (delete 'configure)
918 (add-after 'unpack 'fix-paths
919 (lambda* (#:key outputs #:allow-other-keys)
920 (let* ((out (assoc-ref outputs "out"))
921 (shebang-line (string-append
922 "#!" out "/bin/picolisp "
923 out "/lib/picolisp/lib.l")))
924 (substitute* '("bin/pil"
925 "bin/pilIndent"
926 "bin/pilPretty"
927 "bin/psh"
928 "bin/replica"
929 "bin/vip"
930 "bin/watchdog"
931 "games/xchess"
932 "misc/bigtest"
933 "misc/calc"
934 "misc/chat"
935 "misc/mailing"
936 "src/mkVers")
937 (("#\\!bin/picolisp lib.l")
938 shebang-line)
939 (("#\\!\\.\\./bin/picolisp \\.\\./lib.l")
940 shebang-line)
941 (("#\\!/usr/bin/picolisp /usr/lib/picolisp/lib.l")
942 shebang-line)))
943 #t))
944 (add-after 'fix-paths 'make-build-reproducible
945 (lambda _
946 (substitute* "src64/lib/asm.l"
947 (("\\(prinl \"/\\* \" \\(datSym \\(date\\)\\) \" \\*/\\)")
948 ""))
949 #t))
950 (add-after 'make-build-reproducible 'fix-permissions
951 (lambda _
952 (for-each make-file-writable
953 '("doc/family.tgz"
954 "doc/family64.tgz"
955 "lib/map"
956 "src64/tags"))
957 #t))
958 (replace 'build
959 (lambda _
960 (invoke "make" "-C" "src" "picolisp" "tools" "gate")))
961 (add-before 'check 'set-home-for-tests
962 (lambda _
963 (setenv "HOME" "/tmp")
964 #t))
965 (replace 'check
966 (lambda _
967 (invoke "./pil" "test/lib.l" "-bye" "+")))
968 (replace 'install
969 (lambda* (#:key outputs #:allow-other-keys)
970 (let* ((out (assoc-ref outputs "out"))
971 (bin (string-append out "/bin"))
972 (man (string-append out "/share/man"))
973 (picolisp (string-append out "/lib/picolisp")))
974 (copy-recursively "man" man)
975 (copy-recursively "." picolisp)
976 (for-each (lambda (name)
977 (let ((path (string-append picolisp "/" name)))
978 (delete-file-recursively path)))
979 '("CHANGES" "COPYING" "CREDITS" "cygwin"
980 "INSTALL" "man" "pil" "README" "src" "src64"
981 "test"))
982 (mkdir-p bin)
983 (symlink (string-append picolisp "/bin/picolisp")
984 (string-append bin "/picolisp"))
985 (symlink (string-append picolisp "/bin/pil")
986 (string-append bin "/pil")))
987 #t)))))
988 (synopsis "Interpreter for the PicoLisp programming language")
989 (description
990 "PicoLisp is a programming language, or really a programming system,
991 including a built-in database engine and a GUI system.")
992 (home-page "https://picolisp.com/wiki/?home")
993 (license license:expat)))
994
995 (define-public picolisp
996 (match (%current-system)
997 ((or "aarch64-linux" "x86_64-linux")
998 (package
999 ;; Use the 32-bit picolisp to generate the assembly files required by
1000 ;; the 64-bit picolisp.
1001 (inherit picolisp32)
1002 (name "picolisp")
1003 (native-inputs
1004 `(("picolisp32" ,picolisp32)
1005 ("which" ,which)))
1006 (arguments
1007 (substitute-keyword-arguments (package-arguments picolisp32)
1008 ((#:system _ "") (%current-system))
1009 ((#:phases phases)
1010 `(modify-phases ,phases
1011 (delete 'fix-paths)
1012 (add-before 'build 'fix-paths
1013 ;; This must run after the other shebang-patching phases,
1014 ;; or they will override our changes.
1015 (lambda* (#:key inputs outputs #:allow-other-keys)
1016 (let* ((picolisp32 (assoc-ref inputs "picolisp32"))
1017 (out (assoc-ref outputs "out"))
1018 (shebang-line (string-append
1019 "#!" out "/bin/picolisp "
1020 out "/lib/picolisp/lib.l")))
1021 (substitute* '("bin/pil"
1022 "bin/pilIndent"
1023 "bin/pilPretty"
1024 "bin/psh"
1025 "bin/replica"
1026 "bin/vip"
1027 "bin/watchdog"
1028 "games/xchess"
1029 "misc/bigtest"
1030 "misc/calc"
1031 "misc/chat"
1032 "misc/mailing"
1033 "src/mkVers")
1034 (("#\\!.*picolisp32.*/bin/picolisp .*lib\\.l")
1035 shebang-line))
1036 (substitute* "src64/mkAsm"
1037 (("/usr/bin/")
1038 (string-append picolisp32 "/bin/"))))
1039 #t))
1040 (replace 'build
1041 (lambda _
1042 (invoke "make" "-C" "src" "tools" "gate")
1043 (invoke "make" "-C" "src64" "CC=gcc" "picolisp")))))))))
1044 (_
1045 (package
1046 (inherit picolisp32)
1047 (name "picolisp")))))
1048
1049 (define-public janet
1050 (package
1051 (name "janet")
1052 (version "1.12.2")
1053 (source
1054 (origin
1055 (method git-fetch)
1056 (uri (git-reference
1057 (url "https://github.com/janet-lang/janet")
1058 (commit (string-append "v" version))))
1059 (file-name (git-file-name name version))
1060 (sha256
1061 (base32 "0if514zdmbjvvrsa9x5yfvg2b14sz53yaka12g3yhwkq8ls3qk0c"))))
1062 (build-system gnu-build-system)
1063 (arguments
1064 `(#:make-flags (list
1065 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1066 (string-append "PREFIX=")
1067 (string-append "CC=" (assoc-ref %build-inputs "gcc")
1068 "/bin/gcc"))
1069 #:phases
1070 (modify-phases %standard-phases
1071 (delete 'configure)
1072 (replace 'check
1073 (lambda _
1074 (invoke "make" "test"))))))
1075 (home-page "https://janet-lang.org/")
1076 (synopsis "Functional, imperative and embeddable programming language")
1077 (description
1078 "Janet is a functional and imperative programming language. It can be
1079 used for rapid prototyping, dynamic systems, and other domains where dynamic
1080 languages shine. You can also add Janet scripting to an application by
1081 embedding a single C file and two headers. It can be easily ported to new
1082 platforms. The entire language (core library, interpreter, compiler,
1083 assembler, PEG) is less than 1MB.")
1084 (license license:expat)))
1085
1086 (define-public lisp-repl-core-dumper
1087 (package
1088 (name "lisp-repl-core-dumper")
1089 (version "0.7.0")
1090 (source
1091 (origin
1092 (method git-fetch)
1093 (uri (git-reference
1094 (url "https://gitlab.com/ambrevar/lisp-repl-core-dumper.git")
1095 (commit version)))
1096 (file-name (git-file-name name version))
1097 (sha256
1098 (base32 "0yfsyxj462yi3bx587yssp4gwb54jdm6fjk9q93gjrfv8a65ilp7"))))
1099 (build-system copy-build-system)
1100 (arguments
1101 '(#:install-plan
1102 '(("lisp-repl-core-dumper" "bin/"))
1103 #:phases
1104 (modify-phases %standard-phases
1105 (add-before 'install 'fix-utils-path
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (let* ((coreutils (string-append (assoc-ref inputs "coreutils") "/bin/"))
1108 (cat (string-append coreutils "cat"))
1109 (paste (string-append coreutils "paste"))
1110 (sort (string-append coreutils "sort"))
1111 (basename (string-append coreutils "basename"))
1112 (sed (string-append (assoc-ref inputs "sed") "/bin/sed")))
1113 (substitute* "lisp-repl-core-dumper"
1114 (("\\$\\(basename") (string-append "$(" basename))
1115 (("\\<cat\\>") cat)
1116 (("\\<paste\\>") paste)
1117 (("\\<sed\\>") sed)
1118 (("\\<sort\\>") sort))))))))
1119 (inputs
1120 `(("coreutils" ,coreutils-minimal)
1121 ("sed" ,sed)))
1122 (home-page "https://gitlab.com/ambrevar/lisp-repl-core-dumper")
1123 (synopsis "Generate REPL-optimized Lisp cores on demand")
1124 (description
1125 "This tool generates Lisp images that can embed the provided systems
1126 and make for REPLs that start blazing fast.
1127
1128 @itemize
1129 @item It’s portable and should work with any compiler.
1130 @item It works for any REPL.
1131 @item It allows you to include arbitrary libraries.
1132 @end itemize\n")
1133 (license license:gpl3+)))
1134
1135 (define-public buildapp
1136 (package
1137 (name "buildapp")
1138 (version "1.5.6")
1139 (source
1140 (origin
1141 (method git-fetch)
1142 (uri (git-reference
1143 (url "https://github.com/xach/buildapp")
1144 (commit (string-append "release-" version))))
1145 (file-name (git-file-name name version))
1146 (sha256
1147 (base32 "020ipjfqa3l8skd97cj5kq837wgpj28ygfxnkv64cnjrlbnzh161"))))
1148 (build-system gnu-build-system)
1149 (native-inputs
1150 `(("sbcl" ,sbcl)))
1151 (arguments
1152 `(#:tests? #f
1153 #:make-flags
1154 (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
1155 #:strip-binaries? #f
1156 #:phases
1157 (modify-phases %standard-phases
1158 (delete 'configure)
1159 (add-after 'unpack 'set-home
1160 (lambda _
1161 (setenv "HOME" "/tmp")
1162 #t))
1163 (add-before 'install 'create-target-directory
1164 (lambda* (#:key outputs #:allow-other-keys)
1165 (let* ((bin (string-append (assoc-ref outputs "out") "/bin")))
1166 (mkdir-p bin)
1167 #t))))))
1168 (home-page "https://www.xach.com/lisp/buildapp/")
1169 (synopsis "Makes easy to build application executables with SBCL")
1170 (description
1171 "Buildapp is an application for SBCL or CCL that configures and saves an
1172 executable Common Lisp image. It is similar to cl-launch and hu.dwim.build. ")
1173 (license license:bsd-2)))