gnu: cvs-fast-export: Update to 1.56.
[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 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, 2021 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.3")
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 "1h6s3as8m72ik971zy7a8j1kqfyy5gzpv9ksy09ixv65a10ll3d9"))))
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-union (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 ;; FIXME: the texlive-union insists on regenerating fonts. It stores
517 ;; them in HOME, so it needs to be writeable.
518 (add-before 'build 'set-HOME
519 (lambda _ (setenv "HOME" "/tmp") #t))
520 (replace 'build
521 (lambda* (#:key outputs #:allow-other-keys)
522 (setenv "CC" "gcc")
523 (invoke "sh" "make.sh" ,@(match (%current-system)
524 ((or "x86_64-linux" "i686-linux")
525 `("clisp"))
526 (_
527 `("clisp")))
528 (string-append "--prefix="
529 (assoc-ref outputs "out"))
530 "--dynamic-space-size=3072"
531 "--with-sb-core-compression"
532 "--with-sb-xref-for-internals")))
533 (replace 'install
534 (lambda _
535 (invoke "sh" "install.sh")))
536 (add-after 'build 'build-doc
537 (lambda _
538 ;; TODO: Doc is not deterministic, maybe there is a timespamp?
539 (with-directory-excursion "doc/manual"
540 (and (invoke "make" "info")
541 (invoke "make" "dist")))))
542 (add-after 'build 'build-source
543 (lambda* (#:key outputs #:allow-other-keys)
544 (let* ((out (assoc-ref outputs "out"))
545 (rc (string-append out "/lib/sbcl/sbclrc"))
546 (source-dir (string-append out "/share/sbcl")))
547 (for-each (lambda (p)
548 (copy-recursively p (string-append source-dir "/" p)))
549 '("src" "contrib"))
550 (mkdir-p (dirname rc))
551 (with-output-to-file rc
552 (lambda ()
553 (display
554 (string-append "(sb-ext:set-sbcl-source-location \""
555 source-dir "\")") )))
556 #t)))
557 (add-after 'install 'install-doc
558 (lambda* (#:key outputs #:allow-other-keys)
559 (let* ((out (assoc-ref outputs "out"))
560 (doc (assoc-ref outputs "doc"))
561 (old-doc-dir (string-append out "/share/doc"))
562 (new-doc/sbcl-dir (string-append doc "/share/doc/sbcl")))
563 (rmdir (string-append old-doc-dir "/sbcl/html"))
564 (mkdir-p new-doc/sbcl-dir)
565 (copy-recursively (string-append old-doc-dir "/sbcl")
566 new-doc/sbcl-dir)
567 (delete-file-recursively old-doc-dir)
568 #t))))
569 ;; No 'check' target, though "make.sh" (build phase) runs tests.
570 #:tests? #f))
571 (native-search-paths
572 (list (search-path-specification
573 (variable "XDG_DATA_DIRS")
574 (files '("share")))
575 (search-path-specification
576 (variable "XDG_CONFIG_DIRS")
577 (files '("etc")))))
578 (home-page "http://www.sbcl.org/")
579 (synopsis "Common Lisp implementation")
580 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
581 Lisp compiler. In addition to the compiler and runtime system for ANSI Common
582 Lisp, it provides an interactive environment including a debugger, a
583 statistical profiler, a code coverage tool, and many other extensions.")
584 ;; Public domain in jurisdictions that allow it, bsd-2 otherwise. MIT
585 ;; loop macro has its own license. See COPYING file for further notes.
586 (license (list license:public-domain license:bsd-2
587 (license:x11-style "file://src/code/loop.lisp")))))
588
589 (define-public ccl
590 ;; Warning: according to upstream, CCL is not bootstrappable.
591 ;; See https://github.com/Clozure/ccl/issues/222 from 2019-09-02:
592 ;;
593 ;; "As far as I know, there is no way to build CCL without an existing
594 ;; running CCL image. It was bootstrapped back in 1986 or so as
595 ;; Macintosh Common Lisp, by Gary Byers, I believe, who is no longer on
596 ;; the planet to tell us the story. It SHOULD be possible to port the
597 ;; CCL compiler to portable Common Lisp, so that ANY lisp could build
598 ;; it, as is the case for SBCL, but I know of no attempt to do so."
599 (package
600 (name "ccl")
601 (version "1.12")
602 (source (origin
603 (method git-fetch)
604 (uri (git-reference
605 (url "https://github.com/Clozure/ccl/")
606 (commit (string-append "v" version))))
607 (file-name (git-file-name "ccl" version))
608 (sha256
609 (base32
610 "0kxr24d2fzsmpsilijpwwfl6g89y7fcrwb80kai5nx9pwgxmjbp3"))))
611 (build-system gnu-build-system)
612 ;; CCL consists of a "lisp kernel" and "heap image", both of which are
613 ;; shipped in precompiled form in source tarballs. The former is a C
614 ;; program which we can rebuild from scratch, but the latter cannot be
615 ;; generated without an already working copy of CCL, and is platform
616 ;; dependent, so we need to fetch the correct tarball for the platform.
617 (inputs
618 `(("ccl-bootstrap"
619 ,(origin
620 (method url-fetch)
621 (uri (string-append
622 "https://github.com/Clozure/ccl/releases/download/v" version "/"
623 (match (%current-system)
624 ("armhf-linux" "linuxarm")
625 ;; XXX: This source only works on x86, but provide it as a
626 ;; catch-all to prevent errors when querying this package
627 ;; on unsupported platforms.
628 (_ "linuxx86"))
629 ".tar.gz"))
630 (sha256
631 (base32
632 (match (%current-system)
633 ("armhf-linux"
634 "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c")
635 (_ "15l7cfa4a7jkfwdzsfm4q3n22jnb57imxahpql3h77xin57v1gbz"))))))))
636 (native-inputs
637 `(("cl-asdf" ,cl-asdf)
638 ("m4" ,m4)))
639 (arguments
640 `(#:tests? #f ;no 'check' target
641 #:modules ((ice-9 match)
642 (srfi srfi-26)
643 (guix build utils)
644 (guix build gnu-build-system))
645 #:phases
646 (modify-phases %standard-phases
647 (add-after 'unpack 'unpack-image
648 (lambda* (#:key inputs #:allow-other-keys)
649 (invoke "tar" "xzvf" (assoc-ref inputs "ccl-bootstrap"))))
650 (add-after 'unpack 'replace-asdf
651 ;; Use system ASDF instead of bundled one.
652 (lambda* (#:key inputs #:allow-other-keys)
653 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
654 (guix-asdf (string-append
655 cl-asdf
656 "/share/common-lisp/source/asdf/asdf.lisp"))
657 (contrib-asdf "tools/asdf.lisp"))
658 (delete-file contrib-asdf)
659 (copy-file guix-asdf contrib-asdf))))
660 (delete 'configure)
661 (add-before 'build 'pre-build
662 ;; Enter the source directory for the current platform's lisp
663 ;; kernel, and run 'make clean' to remove the precompiled one.
664 (lambda* (#:key system #:allow-other-keys)
665 (substitute* "lisp-kernel/m4macros.m4"
666 (("/bin/pwd") (which "pwd")))
667 (chdir (string-append
668 "lisp-kernel/"
669 (match system
670 ("i686-linux" "linuxx8632")
671 ("x86_64-linux" "linuxx8664")
672 ("armhf-linux" "linuxarm")
673 (_ (string-append "unknown system: " system)))))
674 (substitute* '("Makefile")
675 (("/bin/rm") "rm"))
676 (setenv "CC" "gcc")
677 (invoke "make" "clean")))
678 ;; XXX Do we need to recompile the heap image as well for Guix?
679 ;; For now just use the one we already got in the tarball.
680 (replace 'install
681 (lambda* (#:key outputs inputs system #:allow-other-keys)
682 ;; The lisp kernel built by running 'make' in lisp-kernel/$system
683 ;; is put back into the original directory, so go back. The heap
684 ;; image is there as well.
685 (chdir "../..")
686 (let* ((out (assoc-ref outputs "out"))
687 (libdir (string-append out "/lib/"))
688 (bindir (string-append out "/bin/"))
689 (wrapper (string-append bindir "ccl"))
690 (bash (assoc-ref inputs "bash"))
691 (kernel
692 (match system
693 ("i686-linux" "lx86cl")
694 ("x86_64-linux" "lx86cl64")
695 ("armhf-linux" "armcl")
696 ;; Unlikely to work, but try it anyway...
697 (_ system)))
698 (heap (string-append kernel ".image")))
699 (install-file kernel libdir)
700 (install-file heap libdir)
701
702 (let ((dirs `("lib" "library" "examples" "tools" "objc-bridge"
703 ,@(match system
704 ("x86_64-linux"
705 '("x86-headers64"))
706 ("i686-linux"
707 '("x86-headers"))
708 (_ '())))))
709 (for-each copy-recursively
710 dirs
711 (map (cut string-append libdir <>) dirs)))
712
713 (mkdir-p bindir)
714 (with-output-to-file wrapper
715 (lambda ()
716 (display
717 (string-append
718 "#!" bash "/bin/sh\n"
719 "export CCL_DEFAULT_DIRECTORY=" libdir "\n"
720 "exec -a \"$0\" " libdir kernel " \"$@\"\n"))))
721 (chmod wrapper #o755))
722 #t)))))
723 (native-search-paths
724 (list (search-path-specification
725 (variable "XDG_DATA_DIRS")
726 (files '("share")))
727 (search-path-specification
728 (variable "XDG_CONFIG_DIRS")
729 (files '("etc")))))
730 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))
731 (home-page "https://ccl.clozure.com/")
732 (synopsis "Common Lisp implementation")
733 (description "Clozure CL (often called CCL for short) is a Common Lisp
734 implementation featuring fast compilation speed, native threads, a precise,
735 generational, compacting garbage collector, and a convenient foreign-function
736 interface.")
737 (license license:asl2.0)))
738
739 (define-public lush2
740 (package
741 (name "lush2")
742 (version "2.0.1")
743 (source
744 (origin
745 (method url-fetch)
746 (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
747 version ".tar.gz"))
748 (modules '((guix build utils)))
749 (snippet
750 '(begin
751 (substitute* "src/unix.c"
752 (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
753 (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
754 (substitute* "src/main.c"
755 (("\" \\(built \" __DATE__ \"\\)\"") ""))
756 #t))
757 (sha256
758 (base32
759 "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
760 (build-system gnu-build-system)
761 (arguments
762 `(;; We have to add these LIBS so that they are found.
763 #:configure-flags (list "LIBS=-lz"
764 "X_EXTRA_LIBS=-lfontconfig"
765 "--with-x")
766 #:tests? #f)) ; No make check.
767 (native-inputs `(("intltool" ,intltool)))
768 (inputs
769 `(("alsa-lib" ,alsa-lib)
770 ("sdl" ,sdl)
771 ("sdl-image" ,sdl-image)
772 ("sdl-mixer" ,sdl-mixer)
773 ("sdl-net" ,sdl-net)
774 ("sdl-ttf" ,sdl-ttf)
775 ("lapack" ,lapack)
776 ("libxft" ,libxft)
777 ("fontconfig" ,fontconfig)
778 ("gsl" ,gsl)
779 ("openblas" ,openblas)
780 ("glu" ,glu)
781 ("mesa" ,mesa)
782 ("mesa-utils" ,mesa-utils)
783 ("binutils" ,binutils)
784 ("libiberty" ,libiberty)
785 ("readline" ,readline)
786 ("zlib" ,zlib)
787 ("gettext-minimal" ,gettext-minimal)))
788 (synopsis "Lisp Universal Shell")
789 (description
790 "Lush is an object-oriented Lisp interpreter/compiler with features
791 designed to please people who want to prototype large numerical
792 applications. Lush includes an extensive library of
793 vector/matrix/tensor manipulation, numerous numerical libraries
794 (including GSL, LAPACK, and BLAS), a set of graphic functions, a
795 simple GUI toolkit, and interfaces to various graphic and multimedia
796 libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
797 grabbing), and others. Lush is an ideal frontend script language for
798 programming projects written in C or other languages. Lush also has
799 libraries for Machine Learning, Neural Nets and statistical estimation.")
800 (home-page "http://lush.sourceforge.net/")
801 (license license:lgpl2.1+)))
802
803 (define-public confusion-mdl
804 (let* ((commit "12a055581fc262225272df43287dae48281900f5"))
805 (package
806 (name "confusion-mdl")
807 (version "0.2")
808 (source (origin
809 (method git-fetch)
810 (uri (git-reference
811 (url (string-append "https://gitlab.com/emacsomancer/" name))
812 (commit commit)))
813 (sha256
814 (base32
815 "1zi8kflzvwqg97ha1sa5xjisbjs5z1mvbpa772vfxiv5ksnpxp0d"))
816 (file-name (git-file-name name version))))
817 (build-system gnu-build-system)
818 (arguments
819 `(#:tests? #f ; there are no tests
820 #:phases
821 (modify-phases %standard-phases
822 (delete 'configure)
823 (replace 'build
824 (lambda* (#:key (make-flags '()) #:allow-other-keys)
825 (apply invoke "make" "CC=gcc" make-flags)))
826 (replace 'install
827 (lambda* (#:key outputs #:allow-other-keys)
828 (let* ((out (assoc-ref outputs "out"))
829 (bin (string-append out "/bin")))
830 (install-file "mdli" bin)
831 #t))))))
832 (native-inputs
833 `(("perl" ,perl)))
834 (inputs
835 `(("libgc" ,libgc)))
836 (synopsis "Interpreter for the MIT Design Language (MDL)")
837 (description "MDL (the MIT Design Language) is a descendant of Lisp. It
838 was originally developed in 1971 on the PDP-10 computer under the Incompatible
839 Timesharing System (ITS) to provide high level language support for the
840 Dynamic Modeling Group at MIT's Project MAC. Infocom built the original
841 PDP-10 Zork in MDL and their later ZIL (Zork Implementation Language) was
842 based on a subset of MDL. Confusion is a MDL interpreter that works just well
843 enough to play the original mainframe Zork all the way through.")
844 (home-page "http://www.russotto.net/git/mrussotto/confusion/src/master/src/README")
845 (license license:gpl3+))))
846
847 (define-public txr
848 (package
849 (name "txr")
850 (version "255")
851 (source
852 (origin
853 (method git-fetch)
854 (uri (git-reference
855 (url "http://www.kylheku.com/git/txr/")
856 (commit (string-append "txr-" version))))
857 (file-name (git-file-name name version))
858 (sha256
859 (base32 "0fjca44761x29xg5hh60yf4i3k7462z7ysnadbk2wzisp42yxk6j"))))
860 (build-system gnu-build-system)
861 (arguments
862 `(#:configure-flags
863 (list ,(string-append "cc=" (cc-for-target))
864 (string-append "--prefix=" (assoc-ref %outputs "out")))
865 #:test-target "tests"
866 #:phases
867 (modify-phases %standard-phases
868 (replace 'configure
869 ;; ./configure is a hand-written script that can't handle standard
870 ;; autotools arguments like CONFIG_SHELL.
871 (lambda* (#:key configure-flags #:allow-other-keys)
872 (setenv "txr_shell" (which "bash"))
873 (apply invoke "./configure" configure-flags)
874 #t))
875 (add-after 'configure 'fix-tests
876 (lambda _
877 (substitute* (list "tests/017/realpath.tl"
878 "tests/017/realpath.expected")
879 (("/usr/bin") "/"))
880 #t)))))
881 (inputs
882 `(("libffi" ,libffi)))
883 (synopsis "General-purpose, multi-paradigm programming language")
884 (description
885 "TXR is a general-purpose, multi-paradigm programming language. It
886 comprises two languages integrated into a single tool: a text scanning and
887 extraction language referred to as the TXR Pattern Language (sometimes just
888 \"TXR\"), and a general-purpose dialect of Lisp called TXR Lisp. TXR can be
889 used for everything from \"one liner\" data transformation tasks at the
890 command line, to data scanning and extracting scripts, to full application
891 development in a wide-range of areas.")
892 (home-page "https://nongnu.org/txr/")
893 (license license:bsd-2)))
894
895 (define picolisp32
896 (package
897 (name "picolisp32")
898 (version "19.12")
899 (source
900 (origin
901 (method url-fetch)
902 (uri (string-append "https://software-lab.de/picoLisp-" version ".tgz"))
903 (sha256
904 (base32 "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j"))
905 (modules '((guix build utils)))
906 (snippet '(begin
907 ;; Delete the pre-compiled jar file.
908 (delete-file "ersatz/picolisp.jar")
909 #t))))
910 (build-system gnu-build-system)
911 (inputs
912 `(("openssl" ,openssl)))
913 (arguments
914 `(#:system ,(match (%current-system)
915 ((or "armhf-linux" "aarch64-linux")
916 "armhf-linux")
917 (_
918 "i686-linux"))
919 #:phases
920 (modify-phases %standard-phases
921 (delete 'configure)
922 (add-after 'unpack 'fix-paths
923 (lambda* (#:key outputs #:allow-other-keys)
924 (let* ((out (assoc-ref outputs "out"))
925 (shebang-line (string-append
926 "#!" out "/bin/picolisp "
927 out "/lib/picolisp/lib.l")))
928 (substitute* '("bin/pil"
929 "bin/pilIndent"
930 "bin/pilPretty"
931 "bin/psh"
932 "bin/replica"
933 "bin/vip"
934 "bin/watchdog"
935 "games/xchess"
936 "misc/bigtest"
937 "misc/calc"
938 "misc/chat"
939 "misc/mailing"
940 "src/mkVers")
941 (("#\\!bin/picolisp lib.l")
942 shebang-line)
943 (("#\\!\\.\\./bin/picolisp \\.\\./lib.l")
944 shebang-line)
945 (("#\\!/usr/bin/picolisp /usr/lib/picolisp/lib.l")
946 shebang-line)))
947 #t))
948 (add-after 'fix-paths 'make-build-reproducible
949 (lambda _
950 (substitute* "src64/lib/asm.l"
951 (("\\(prinl \"/\\* \" \\(datSym \\(date\\)\\) \" \\*/\\)")
952 ""))
953 #t))
954 (add-after 'make-build-reproducible 'fix-permissions
955 (lambda _
956 (for-each make-file-writable
957 '("doc/family.tgz"
958 "doc/family64.tgz"
959 "lib/map"
960 "src64/tags"))
961 #t))
962 (replace 'build
963 (lambda _
964 (invoke "make" "-C" "src" "picolisp" "tools" "gate")))
965 (add-before 'check 'set-home-for-tests
966 (lambda _
967 (setenv "HOME" "/tmp")
968 #t))
969 (replace 'check
970 (lambda _
971 (invoke "./pil" "test/lib.l" "-bye" "+")))
972 (replace 'install
973 (lambda* (#:key outputs #:allow-other-keys)
974 (let* ((out (assoc-ref outputs "out"))
975 (bin (string-append out "/bin"))
976 (man (string-append out "/share/man"))
977 (picolisp (string-append out "/lib/picolisp")))
978 (copy-recursively "man" man)
979 (copy-recursively "." picolisp)
980 (for-each (lambda (name)
981 (let ((path (string-append picolisp "/" name)))
982 (delete-file-recursively path)))
983 '("CHANGES" "COPYING" "CREDITS" "cygwin"
984 "INSTALL" "man" "pil" "README" "src" "src64"
985 "test"))
986 (mkdir-p bin)
987 (symlink (string-append picolisp "/bin/picolisp")
988 (string-append bin "/picolisp"))
989 (symlink (string-append picolisp "/bin/pil")
990 (string-append bin "/pil")))
991 #t)))))
992 (synopsis "Interpreter for the PicoLisp programming language")
993 (description
994 "PicoLisp is a programming language, or really a programming system,
995 including a built-in database engine and a GUI system.")
996 (home-page "https://picolisp.com/wiki/?home")
997 (license license:expat)))
998
999 (define-public picolisp
1000 (match (%current-system)
1001 ((or "aarch64-linux" "x86_64-linux")
1002 (package
1003 ;; Use the 32-bit picolisp to generate the assembly files required by
1004 ;; the 64-bit picolisp.
1005 (inherit picolisp32)
1006 (name "picolisp")
1007 (native-inputs
1008 `(("picolisp32" ,picolisp32)
1009 ("which" ,which)))
1010 (arguments
1011 (substitute-keyword-arguments (package-arguments picolisp32)
1012 ((#:system _ "") (%current-system))
1013 ((#:phases phases)
1014 `(modify-phases ,phases
1015 (delete 'fix-paths)
1016 (add-before 'build 'fix-paths
1017 ;; This must run after the other shebang-patching phases,
1018 ;; or they will override our changes.
1019 (lambda* (#:key inputs outputs #:allow-other-keys)
1020 (let* ((picolisp32 (assoc-ref inputs "picolisp32"))
1021 (out (assoc-ref outputs "out"))
1022 (shebang-line (string-append
1023 "#!" out "/bin/picolisp "
1024 out "/lib/picolisp/lib.l")))
1025 (substitute* '("bin/pil"
1026 "bin/pilIndent"
1027 "bin/pilPretty"
1028 "bin/psh"
1029 "bin/replica"
1030 "bin/vip"
1031 "bin/watchdog"
1032 "games/xchess"
1033 "misc/bigtest"
1034 "misc/calc"
1035 "misc/chat"
1036 "misc/mailing"
1037 "src/mkVers")
1038 (("#\\!.*picolisp32.*/bin/picolisp .*lib\\.l")
1039 shebang-line))
1040 (substitute* "src64/mkAsm"
1041 (("/usr/bin/")
1042 (string-append picolisp32 "/bin/"))))
1043 #t))
1044 (replace 'build
1045 (lambda _
1046 (invoke "make" "-C" "src" "tools" "gate")
1047 (invoke "make" "-C" "src64" "CC=gcc" "picolisp")))))))))
1048 (_
1049 (package
1050 (inherit picolisp32)
1051 (name "picolisp")))))
1052
1053 (define-public janet
1054 (package
1055 (name "janet")
1056 (version "1.12.2")
1057 (source
1058 (origin
1059 (method git-fetch)
1060 (uri (git-reference
1061 (url "https://github.com/janet-lang/janet")
1062 (commit (string-append "v" version))))
1063 (file-name (git-file-name name version))
1064 (sha256
1065 (base32 "0if514zdmbjvvrsa9x5yfvg2b14sz53yaka12g3yhwkq8ls3qk0c"))))
1066 (build-system gnu-build-system)
1067 (arguments
1068 `(#:make-flags (list
1069 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1070 (string-append "PREFIX=")
1071 (string-append "CC=" (assoc-ref %build-inputs "gcc")
1072 "/bin/gcc"))
1073 #:phases
1074 (modify-phases %standard-phases
1075 (delete 'configure)
1076 (replace 'check
1077 (lambda _
1078 (invoke "make" "test"))))))
1079 (home-page "https://janet-lang.org/")
1080 (synopsis "Functional, imperative and embeddable programming language")
1081 (description
1082 "Janet is a functional and imperative programming language. It can be
1083 used for rapid prototyping, dynamic systems, and other domains where dynamic
1084 languages shine. You can also add Janet scripting to an application by
1085 embedding a single C file and two headers. It can be easily ported to new
1086 platforms. The entire language (core library, interpreter, compiler,
1087 assembler, PEG) is less than 1MB.")
1088 (license license:expat)))
1089
1090 (define-public lisp-repl-core-dumper
1091 (package
1092 (name "lisp-repl-core-dumper")
1093 (version "0.7.0")
1094 (source
1095 (origin
1096 (method git-fetch)
1097 (uri (git-reference
1098 (url "https://gitlab.com/ambrevar/lisp-repl-core-dumper.git")
1099 (commit version)))
1100 (file-name (git-file-name name version))
1101 (sha256
1102 (base32 "0yfsyxj462yi3bx587yssp4gwb54jdm6fjk9q93gjrfv8a65ilp7"))))
1103 (build-system copy-build-system)
1104 (arguments
1105 '(#:install-plan
1106 '(("lisp-repl-core-dumper" "bin/"))
1107 #:phases
1108 (modify-phases %standard-phases
1109 (add-before 'install 'fix-utils-path
1110 (lambda* (#:key inputs #:allow-other-keys)
1111 (let* ((coreutils (string-append (assoc-ref inputs "coreutils") "/bin/"))
1112 (cat (string-append coreutils "cat"))
1113 (paste (string-append coreutils "paste"))
1114 (sort (string-append coreutils "sort"))
1115 (basename (string-append coreutils "basename"))
1116 (sed (string-append (assoc-ref inputs "sed") "/bin/sed")))
1117 (substitute* "lisp-repl-core-dumper"
1118 (("\\$\\(basename") (string-append "$(" basename))
1119 (("\\<cat\\>") cat)
1120 (("\\<paste\\>") paste)
1121 (("\\<sed\\>") sed)
1122 (("\\<sort\\>") sort))))))))
1123 (inputs
1124 `(("coreutils" ,coreutils-minimal)
1125 ("sed" ,sed)))
1126 (home-page "https://gitlab.com/ambrevar/lisp-repl-core-dumper")
1127 (synopsis "Generate REPL-optimized Lisp cores on demand")
1128 (description
1129 "This tool generates Lisp images that can embed the provided systems
1130 and make for REPLs that start blazing fast.
1131
1132 @itemize
1133 @item It’s portable and should work with any compiler.
1134 @item It works for any REPL.
1135 @item It allows you to include arbitrary libraries.
1136 @end itemize\n")
1137 (license license:gpl3+)))
1138
1139 (define-public buildapp
1140 (package
1141 (name "buildapp")
1142 (version "1.5.6")
1143 (source
1144 (origin
1145 (method git-fetch)
1146 (uri (git-reference
1147 (url "https://github.com/xach/buildapp")
1148 (commit (string-append "release-" version))))
1149 (file-name (git-file-name name version))
1150 (sha256
1151 (base32 "020ipjfqa3l8skd97cj5kq837wgpj28ygfxnkv64cnjrlbnzh161"))))
1152 (build-system gnu-build-system)
1153 (native-inputs
1154 `(("sbcl" ,sbcl)))
1155 (arguments
1156 `(#:tests? #f
1157 #:make-flags
1158 (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
1159 #:strip-binaries? #f
1160 #:phases
1161 (modify-phases %standard-phases
1162 (delete 'configure)
1163 (add-after 'unpack 'set-home
1164 (lambda _
1165 (setenv "HOME" "/tmp")
1166 #t))
1167 (add-before 'install 'create-target-directory
1168 (lambda* (#:key outputs #:allow-other-keys)
1169 (let* ((bin (string-append (assoc-ref outputs "out") "/bin")))
1170 (mkdir-p bin)
1171 #t))))))
1172 (home-page "https://www.xach.com/lisp/buildapp/")
1173 (synopsis "Makes easy to build application executables with SBCL")
1174 (description
1175 "Buildapp is an application for SBCL or CCL that configures and saves an
1176 executable Common Lisp image. It is similar to cl-launch and hu.dwim.build. ")
1177 (license license:bsd-2)))