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-2019, 2022 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2017, 2019–2022 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, 2022 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 ;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
22 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson@protonmail.com>
23 ;;; Copyright © 2021 jgart <jgart@dismail.de>
24 ;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
26 ;;; This file is part of GNU Guix.
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41 ;;; This file only contains Common Lisp compilers and tooling.
42 ;;; Common Lisp libraries go to lisp-xyz.scm.
43 ;;; Common Lisp applications should go to the most appropriate file,
44 ;;; e.g. StumpWM is in wm.scm.
46 (define-module (gnu packages lisp)
47 #:use-module (gnu packages)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix git-download)
52 #:use-module (guix gexp)
53 #:use-module (guix utils)
54 #:use-module (guix build-system copy)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system ant)
57 #:use-module (guix build-system asdf)
58 #:use-module (guix build-system trivial)
59 #:use-module (gnu packages admin)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bash)
62 #:use-module (gnu packages bdw-gc)
63 #:use-module (gnu packages check)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages dbm)
66 #:use-module (gnu packages ed)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages gcc)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages ghostscript)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages glib)
73 #:use-module (gnu packages groff)
74 #:use-module (gnu packages libffcall)
75 #:use-module (gnu packages libffi)
76 #:use-module (gnu packages libsigsegv)
77 #:use-module (gnu packages linux)
78 #:use-module (gnu packages m4)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages multiprecision)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages onc-rpc)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages readline)
85 #:use-module (gnu packages sdl)
86 #:use-module (gnu packages tcl)
87 #:use-module (gnu packages tex)
88 #:use-module (gnu packages texinfo)
89 #:use-module (gnu packages tls)
90 #:use-module (gnu packages version-control)
91 #:use-module (gnu packages xorg)
92 #:use-module (ice-9 match))
94 (define-public cl-asdf
102 (string-append "https://common-lisp.net/project/asdf/archives/asdf-"
105 (base32 "1mydyrii3f0aig1q5admj6hyf59vjn4a5x1q8hqgh483987ilz6h"))))
106 (build-system trivial-build-system)
108 `(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch"))
111 `(#:modules ((guix build utils)
112 (guix build lisp-utils))
115 (use-modules (guix build utils)
116 (guix build lisp-utils))
117 (let* ((out (string-append (assoc-ref %outputs "out")))
118 (asdf-install (string-append out %source-install-prefix
120 (src-asdf (string-append (assoc-ref %build-inputs "source")))
121 (dst-asdf (string-append asdf-install "asdf.lisp"))
122 (patch (string-append (assoc-ref %build-inputs "patch")
124 (config-patch (assoc-ref %build-inputs "config-patch")))
125 (mkdir-p asdf-install)
126 (copy-file src-asdf dst-asdf)
127 (invoke patch "-p1" "-i" config-patch dst-asdf)))))
128 (home-page "https://common-lisp.net/project/asdf/")
129 (synopsis "Another System Definition Facility")
131 "ASDF is what Common Lisp hackers use to build and load software. It is
132 the successor of the Lisp DEFSYSTEM of yore. ASDF stands for Another System
133 Definition Facility.")
135 (license license:expat)))
138 (let ((commit "ff7ef981765cc0efdb4b1db27c292f5c11a72753")
139 (revision "3")) ;Guix package revision
142 (version (git-version "2.6.12" revision commit))
147 (url "https://git.savannah.gnu.org/r/gcl.git")
149 (file-name (git-file-name name version))
151 (base32 "0z64fxxcaial2i1s1hms8r095dm1ff3wd8ivwdx894a3yln9c0an"))))
152 (build-system gnu-build-system)
154 `(#:parallel-build? #f ; The build system seems not to be thread safe.
155 #:test-target "ansi-tests/test_results"
156 #:configure-flags ,#~(list
157 "--enable-ansi" ; required by the maxima package
158 (string-append "CFLAGS=-I"
159 #$(this-package-input "libtirpc")
161 (string-append "LDFLAGS=-L"
162 #$(this-package-input "libtirpc")
165 #:make-flags ,#~(let ((gcc (search-input-file %build-inputs "/bin/gcc")))
166 (list (string-append "GCL_CC=" gcc)
167 (string-append "CC=" gcc)))
169 (modify-phases %standard-phases
170 (add-after 'unpack 'realpath-workaround
171 ;; Calls to the realpath function can set errno even if the return
172 ;; value of the function indicates that there is no error, which
173 ;; make massert consider that there was an error.
175 (substitute* "gcl/o/main.c"
176 (("massert\\(realpath\\(s,o\\)\\);" all)
177 "massert((realpath(s, o) != NULL) && ((errno = 0) == 0));"))))
178 (add-after 'unpack 'fix-makefile
179 ;; The "final" target doesn't exist.
181 (substitute* "gcl/makefile"
182 (("\\$\\(MAKE\\) -C \\$\\(PORTDIR\\) final")
183 "$(MAKE) -C $(PORTDIR)"))))
184 (add-before 'configure 'pre-conf
185 (lambda* (#:key inputs #:allow-other-keys)
189 '("pcl/impl/kcl/makefile.akcl"
191 "unixport/makefile.dos"
193 "gcl-tk/makefile.prev"
195 (find-files "h" "\\.defs"))
197 (string-append "SHELL=" (which "bash")))
199 (string-append "SHELL=" (which "sh"))))
200 (substitute* "h/linux.defs"
202 (("-fwritable-strings") "")
204 (substitute* "lsp/gcl_top.lsp"
206 (string-append "\"" (assoc-ref %build-inputs "gcc")
208 (("\\(or \\(get-path \\*cc\\*\\) \\*cc\\*\\)") "*cc*")
210 (string-append "\"" (assoc-ref %build-inputs "binutils")
212 (("\\(or \\(get-path \\*ld\\*\\) \\*ld\\*\\)") "*ld*")
213 (("\\(get-path \"objdump --source \"\\)")
214 (string-append "\"" (assoc-ref %build-inputs "binutils")
215 "/bin/objdump --source \"")))
217 (add-after 'install 'wrap
218 (lambda* (#:key inputs outputs #:allow-other-keys)
219 (let* ((gcl (assoc-ref outputs "out"))
220 (input-path (lambda (lib path)
222 (assoc-ref inputs lib) path)))
223 (binaries '("binutils")))
224 ;; GCC and the GNU binutils are necessary for GCL to be
225 ;; able to compile Lisp functions and programs (this is
226 ;; a standard feature in Common Lisp). While the
227 ;; the location of GCC is specified in the make-flags,
228 ;; the GNU binutils must be available in GCL's $PATH.
229 (wrap-program (string-append gcl "/bin/gcl")
230 `("PATH" prefix ,(map (lambda (binary)
231 (input-path binary "/bin"))
234 ;; drop strip phase to make maxima build, see
235 ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
238 (list bash-minimal gmp libtirpc readline))
241 (home-page "https://www.gnu.org/software/gcl/")
242 (synopsis "Common Lisp implementation")
243 (description "GCL is an implementation of the Common Lisp language. It
244 features the ability to compile to native object code and to load native
245 object code modules directly into its lisp core. It also features a
246 stratified garbage collection strategy, a source-level debugger and a built-in
247 interface to the Tk widget system.")
248 (license license:lgpl2.0+))))
258 "https://ecl.common-lisp.dev/static/files/release/"
259 name "-" version ".tgz"))
261 (base32 "000906nnq25177bgsfndiw3iqqgrjc9spk10hzk653sbz3f7anmi"))))
262 (build-system gnu-build-system)
263 ;; src/configure uses 'which' to confirm the existence of 'gzip'.
265 (list cl-asdf which texinfo))
266 (inputs (list bash-minimal))
267 ;; When ECL is embedded in a program that wants to use Common Lisp as an
268 ;; extension language, libgmp, libatomic-ops, libgc and libffi must be
269 ;; present when compiling the program because they are required by ECL's
271 ;; Therefore we put these libraries in 'propagated-inputs' instead
274 (list gmp libatomic-ops libgc libffi))
276 `(#:configure-flags '("--without-rt")
279 (modify-phases %standard-phases
280 ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
281 ;; 2-3 tests may be due to FHS assumptions.
283 (add-after 'unpack 'replace-asdf
284 ;; Use system ASDF instead of bundled one.
285 (lambda* (#:key inputs #:allow-other-keys)
286 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
287 (guix-asdf (string-append
289 "/share/common-lisp/source/asdf/asdf.lisp"))
290 (contrib-asdf "contrib/asdf/asdf.lisp"))
291 (copy-file guix-asdf contrib-asdf))))
292 (add-after 'install 'remove-build-stamp
293 (lambda* (#:key outputs #:allow-other-keys)
294 (delete-file (string-append (assoc-ref outputs "out")
295 "/lib/ecl-" ,version "/build-stamp"))))
296 (add-after 'remove-build-stamp 'wrap
297 (lambda* (#:key inputs outputs #:allow-other-keys)
298 (let* ((ecl (assoc-ref outputs "out"))
299 (input-path (lambda (lib path)
301 (assoc-ref inputs lib) path)))
302 (libraries '("gmp" "libatomic-ops" "libgc" "libffi" "libc"))
303 (binaries '("gcc" "ld-wrapper" "binutils"))
305 (map (lambda (lib) (input-path lib "/lib"))
308 (wrap-program (string-append ecl "/bin/ecl")
310 ,(map (lambda (binary)
311 (input-path binary "/bin"))
315 (input-path lib "/include"))
316 `("kernel-headers" ,@libraries)))
317 `("LIBRARY_PATH" suffix ,library-directories)
318 `("LD_LIBRARY_PATH" suffix ,library-directories)))))
319 (add-after 'wrap 'check (assoc-ref %standard-phases 'check))
320 (add-before 'check 'fix-path-to-ecl
322 (substitute* "build/tests/Makefile"
323 (("\\$\\{exec_prefix\\}/") "")))))))
325 (list (search-path-specification
326 (variable "XDG_DATA_DIRS")
328 (search-path-specification
329 (variable "XDG_CONFIG_DIRS")
331 (home-page "https://ecl.common-lisp.dev/")
332 (synopsis "Embeddable Common Lisp")
333 (description "ECL is an implementation of the Common Lisp language as
334 defined by the ANSI X3J13 specification. Its most relevant features are: a
335 bytecode compiler and interpreter, being able to compile Common Lisp with any
336 C/C++ compiler, being able to build standalone executables and libraries, and
337 supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
338 ;; Note that the file "Copyright" points to some files and directories
339 ;; which aren't under the lgpl2.1+ and instead contain many different,
340 ;; non-copyleft licenses.
341 ;; See https://common-lisp.net/project/ecl/posts/ECL-license.html.
342 (license license:lgpl2.1+)))
352 (url "https://gitlab.com/gnu-clisp/clisp")
353 (commit "clisp-2.49.92-2018-02-18")))
354 (file-name (git-file-name name version))
356 (base32 "0k2dmgl0miz3767iks4p0mvp6xw0ysyxhjpklyh11j010rmh6hqb"))))
357 (build-system gnu-build-system)
360 (inputs (list libffcall ncurses readline libsigsegv))
362 `(#:configure-flags '(,@(if (string-prefix? "armhf-linux"
363 (or (%current-system)
364 (%current-target-system)))
365 '("CFLAGS=-falign-functions=4")
368 "--with-dynamic-modules"
373 "--with-module=rawsock")
375 (modify-phases %standard-phases
376 (add-after 'unpack 'patch-sh-and-pwd
378 ;; The package is very messy with its references to "/bin/sh" and
379 ;; some other absolute paths to traditional tools. These appear in
380 ;; many places where our automatic patching misses them. Therefore
381 ;; we do the following, in this early (post-unpack) phase, to solve
382 ;; the problem from its root.
383 (substitute* '("src/clisp-link.in"
386 (("/bin/sh") (which "sh")))
387 (substitute* (find-files "." "configure|Makefile")
389 (substitute* '("src/clisp-link.in")
390 (("/bin/pwd") "pwd"))
392 (add-after 'unpack 'replace-asdf
393 ;; Use system ASDF instead of bundled one.
394 (lambda* (#:key inputs #:allow-other-keys)
395 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
396 (guix-asdf (string-append
398 "/share/common-lisp/source/asdf/asdf.lisp"))
399 (contrib-asdf "modules/asdf/asdf.lisp"))
400 (delete-file contrib-asdf)
401 (copy-file guix-asdf contrib-asdf)))))))
403 (list (search-path-specification
404 (variable "XDG_DATA_DIRS")
406 (search-path-specification
407 (variable "XDG_CONFIG_DIRS")
409 (home-page "https://clisp.sourceforge.io/")
410 (synopsis "Common Lisp implementation")
412 "GNU CLISP is an implementation of ANSI Common Lisp. Common Lisp is a
413 high-level, object-oriented functional programming language. CLISP includes
414 an interpreter, a compiler, a debugger, and much more.")
415 (license license:gpl2+)))
424 (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
425 version "-source.tar.bz2"))
427 (base32 "18044dqx37mkipnrzs7jrp0cbnwp6snb5gi06a8zn9m8iy6088ry"))))
428 (build-system gnu-build-system)
429 (outputs '("out" "doc"))
432 ;; Supported build hosts are:
435 ;; CCL (formerly known as OpenMCL)
436 ;; ABCL (recent versions only)
437 ;; CLISP (only some versions: 2.44.1 is OK, 2.47 is not)
441 ;; * build enhancement: new host quirks mechanism, support for building under
442 ;; ABCL and ECL (as well as CCL, CMUCL, CLISP and SBCL itself)
444 ;; CCL is not bootstrappable so it won't do. CLISP 2.49 seems to work.
445 ;; ECL too. As of 2020-07-01, ECL was last updated in 2020 while CLISP
446 ;; was last updated in 2010, and both take about the same time to build SBCL.
448 ;; For now we stick to CLISP as the default for all systems. In any event, keep
449 ;; the `match' here to make it easier to change the host compiler for various
450 ;; architectures. Consider switching to ECL if it gets faster than CLISP
451 ;; (maybe post 2020 release).
452 (list (match (%current-system)
453 ("powerpc-linux" ; CLISP fails to build, needs investigating.
459 inetutils ;for hostname(1)
461 (texlive-updmap.cfg (list texlive-tex-texinfo))
464 (list gmp ; for sb-gmp
468 `(#:modules ((guix build gnu-build-system)
472 (modify-phases %standard-phases
473 ,@(if (target-arm32?)
474 ;; TODO: Move to snippet in staging.
475 `((add-after 'unpack 'dont-force-armv5
477 (substitute* "src/runtime/Config.arm-linux"
478 (("-march=armv5") "")))))
481 (add-after 'unpack 'fix-build-id
482 ;; One of the build scripts makes a build id using the current date.
483 ;; Replace it with a reproducible id using a part of the output hash.
484 (lambda* (#:key outputs #:allow-other-keys)
485 (let ((hash (substring (assoc-ref outputs "out")
486 (+ (string-length (%store-directory)) 1)
487 (+ (string-length (%store-directory)) 9))))
488 (substitute* "make-config.sh"
489 (("echo .* > output/build-id.inc")
490 (string-append "echo '\"'guix-sbcl-"
492 "'\"' > output/build-id.inc"))))))
493 (add-after 'unpack 'replace-asdf
494 ;; SBCL developers have not committed to keeping ASDF up to date
495 ;; due to breaking changes [1]. Guix can handle this situation
496 ;; easily, and it behooves us to have more control over what version
497 ;; of ASDF we use to build software; therefore, replace the contrib
498 ;; ASDF with the version packaged into Guix.
499 ;; [1] - https://bugs.launchpad.net/sbcl/+bug/1823442
500 (lambda* (#:key inputs #:allow-other-keys)
501 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
502 (guix-asdf (string-append
504 "/share/common-lisp/source/asdf/asdf.lisp"))
505 (contrib-asdf "contrib/asdf/asdf.lisp"))
506 (copy-file guix-asdf contrib-asdf))
508 (add-before 'build 'patch-unix-tool-paths
509 (lambda* (#:key outputs inputs #:allow-other-keys)
510 (let ((out (assoc-ref outputs "out"))
511 (bash (assoc-ref inputs "bash"))
512 (coreutils (assoc-ref inputs "coreutils"))
513 (ed (assoc-ref inputs "ed")))
514 (define (quoted-path input path)
515 (string-append "\"" input path "\""))
516 ;; Patch absolute paths in string literals. Note that this
517 ;; occurs in some .sh files too (which contain Lisp code). Use
518 ;; ISO-8859-1 because some of the files are ISO-8859-1 encoded.
519 (with-fluids ((%default-port-encoding #f))
520 ;; The removed file is utf-16-be encoded, which gives substitute*
521 ;; trouble. It does not contain references to the listed programs.
523 "./tests/data/compile-file-pos-utf16be.lisp"
524 (find-files "." "\\.(lisp|sh)$"))
525 (("\"/bin/sh\"") (quoted-path bash "/bin/sh"))
526 (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env"))
527 (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat"))
528 (("\"/bin/ed\"") (quoted-path ed "/bin/ed"))
529 (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo"))
530 (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))))
531 ;; This one script has a non-string occurrence of /bin/sh.
532 (substitute* '("tests/foreign.test.sh")
533 ;; Leave whitespace so we don't match the shebang.
534 ((" /bin/sh ") " sh "))
535 ;; This file contains a module that can create executable files
536 ;; which depend on the presence of SBCL. It generates shell
537 ;; scripts doing "exec sbcl ..." to achieve this. We patch both
538 ;; the shebang and the reference to "sbcl", tying the generated
539 ;; executables to the exact SBCL package that generated them.
540 (substitute* '("contrib/sb-executable/sb-executable.lisp")
541 (("/bin/sh") (string-append bash "/bin/sh"))
542 (("exec sbcl") (string-append "exec " out "/bin/sbcl")))
543 ;; Disable some tests that fail in our build environment.
544 (substitute* '("contrib/sb-bsd-sockets/tests.lisp")
545 ;; This requires /etc/protocols.
546 (("\\(deftest get-protocol-by-name/error" all)
547 (string-append "#+nil ;disabled by Guix\n" all)))
548 (substitute* '("contrib/sb-posix/posix-tests.lisp")
549 ;; These assume some users/groups which we don't have.
550 (("\\(deftest pwent\\.[12]" all)
551 (string-append "#+nil ;disabled by Guix\n" all))
552 (("\\(deftest grent\\.[12]" all)
553 (string-append "#+nil ;disabled by Guix\n" all))))
555 (add-before 'build 'fix-shared-library-makefile
557 (substitute* '("src/runtime/GNUmakefile")
560 (add-before 'build 'fix-contrib-library-path
561 (lambda* (#:key inputs #:allow-other-keys)
562 (let ((gmp (assoc-ref inputs "gmp"))
563 (mpfr (assoc-ref inputs "mpfr")))
564 (substitute* '("contrib/sb-gmp/gmp.lisp")
565 (("\"libgmp\\.so") (string-append "\"" gmp "/lib/libgmp.so")))
566 (substitute* '("contrib/sb-mpfr/mpfr.lisp")
567 (("\"libmpfr\\.so") (string-append "\"" mpfr "/lib/libmpfr.so"))))
570 (lambda* (#:key outputs #:allow-other-keys)
572 (invoke "sh" "make.sh" ,@(match (%current-system)
577 (string-append "--prefix="
578 (assoc-ref outputs "out"))
579 ,@(if (target-ppc32?)
580 ;; 3072 is too much for this architecture.
581 `("--dynamic-space-size=2048")
582 `("--dynamic-space-size=3072"))
583 "--with-sb-core-compression"
584 "--with-sb-xref-for-internals"
585 ;; SB-SIMD will only be built on x86_64 CPUs supporting
586 ;; AVX2 instructions. Some x86_64 CPUs don't, so for reproducibility
587 ;; we disable it and we don't build its documentation (see the
588 ;; 'build-doc' phase).
589 "--without-sb-simd")))
590 (add-after 'build 'build-shared-library
591 (lambda* (#:key outputs #:allow-other-keys)
593 (invoke "sh" "make-shared-library.sh")))
596 (invoke "sh" "install.sh")))
597 (add-after 'build 'build-doc
599 ;; Don't build the documentation for SB-SIMD as it is disabled in
600 ;; the 'build' phase.
601 (substitute* "doc/manual/generate-texinfo.lisp"
602 (("exclude '\\(\"asdf\"\\)")
603 "exclude '(\"asdf\" \"sb-simd\")"))
604 (with-directory-excursion "doc/manual"
605 (and (invoke "make" "info")
606 (invoke "make" "dist")))))
607 (add-after 'build 'build-source
608 (lambda* (#:key outputs #:allow-other-keys)
609 (let* ((out (assoc-ref outputs "out"))
610 (rc (string-append out "/lib/sbcl/sbclrc"))
611 (source-dir (string-append out "/share/sbcl")))
612 (for-each (lambda (p)
613 (copy-recursively p (string-append source-dir "/" p)))
615 (mkdir-p (dirname rc))
616 (with-output-to-file rc
619 (string-append "(sb-ext:set-sbcl-source-location \""
620 source-dir "\")") )))
622 (add-after 'install 'remove-coreutils-references
623 ;; They are only useful on non-Linux, non-SBCL.
624 (lambda* (#:key outputs #:allow-other-keys)
625 (let* ((out (assoc-ref outputs "out"))
626 (share-dir (string-append out "/share/sbcl/")))
627 (substitute* (string-append share-dir "src/code/run-program.lisp")
628 (("\\(run-program \".*uname\"")
629 "(run-program \"uname\""))
630 (substitute* (string-append share-dir "contrib/asdf/asdf.lisp")
631 (("\\(\".*/usr/bin/env\"")
632 "(\"/usr/bin/env\""))
633 (substitute* (string-append share-dir "contrib/asdf/uiop.lisp")
634 (("\\(\".*/usr/bin/env\"")
635 "(\"/usr/bin/env\""))
637 (add-after 'install 'install-shared-library
638 (lambda* (#:key outputs #:allow-other-keys)
639 (let* ((out (assoc-ref outputs "out"))
640 (lib-dir (string-append out "/lib")))
641 (install-file "src/runtime/libsbcl.so" lib-dir)
643 (add-after 'install 'install-doc
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let* ((out (assoc-ref outputs "out"))
646 (doc (assoc-ref outputs "doc"))
647 (old-doc-dir (string-append out "/share/doc"))
648 (new-doc/sbcl-dir (string-append doc "/share/doc/sbcl")))
649 (rmdir (string-append old-doc-dir "/sbcl/html"))
650 (mkdir-p new-doc/sbcl-dir)
651 (copy-recursively (string-append old-doc-dir "/sbcl")
653 (delete-file-recursively old-doc-dir)
655 ;; No 'check' target, though "make.sh" (build phase) runs tests.
658 (list (search-path-specification
659 (variable "XDG_DATA_DIRS")
661 (search-path-specification
662 (variable "XDG_CONFIG_DIRS")
664 (home-page "http://www.sbcl.org/")
665 (synopsis "Common Lisp implementation")
666 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
667 Lisp compiler. In addition to the compiler and runtime system for ANSI Common
668 Lisp, it provides an interactive environment including a debugger, a
669 statistical profiler, a code coverage tool, and many other extensions.")
670 ;; Public domain in jurisdictions that allow it, bsd-2 otherwise. MIT
671 ;; loop macro has its own license. See COPYING file for further notes.
672 (license (list license:public-domain license:bsd-2
673 (license:x11-style "file://src/code/loop.lisp")))))
676 ;; Warning: according to upstream, CCL is not bootstrappable.
677 ;; See https://github.com/Clozure/ccl/issues/222 from 2019-09-02:
679 ;; "As far as I know, there is no way to build CCL without an existing
680 ;; running CCL image. It was bootstrapped back in 1986 or so as
681 ;; Macintosh Common Lisp, by Gary Byers, I believe, who is no longer on
682 ;; the planet to tell us the story. It SHOULD be possible to port the
683 ;; CCL compiler to portable Common Lisp, so that ANY lisp could build
684 ;; it, as is the case for SBCL, but I know of no attempt to do so."
687 ;; XXX When updating this package, check whether we can simply append
688 ;; VERSION to the ccl-bootstrap URL again, instead of per architecture.
693 (url "https://github.com/Clozure/ccl/")
694 (commit (string-append "v" version))))
695 (file-name (git-file-name "ccl" version))
698 "1zz291lvsrr7pps8wfl2kdxsnzjngqi4v3mil14pga4r5zanmsi7"))))
699 (build-system gnu-build-system)
700 ;; CCL consists of a "lisp kernel" and "heap image", both of which are
701 ;; shipped in precompiled form in source tarballs. The former is a C
702 ;; program which we can rebuild from scratch, but the latter cannot be
703 ;; generated without an already working copy of CCL, and is platform
704 ;; dependent, so we need to fetch the correct tarball for the platform.
710 "https://github.com/Clozure/ccl/releases/download/v"
711 (match (%current-system)
712 ("armhf-linux" "1.12/linuxarm")
713 ;; XXX: This source only works on x86, but provide it as a
714 ;; catch-all to prevent errors when querying this package
715 ;; on unsupported platforms.
716 (_ "1.12.1/linuxx86"))
720 (match (%current-system)
722 "0x4bjx6cxsjvxyagijhlvmc7jkyxifdvz5q5zvz37028va65243c")
723 (_ "0ll017ajcfsyx8f7zsy4394y8xxvz40iz0gcsmznp0n3mf0xi67c"))))))))
727 `(#:tests? #f ;no 'check' target
728 #:modules ((ice-9 match)
731 (guix build gnu-build-system))
733 (modify-phases %standard-phases
734 (add-after 'unpack 'unpack-image
735 (lambda* (#:key inputs #:allow-other-keys)
736 (invoke "tar" "xzvf" (assoc-ref inputs "ccl-bootstrap"))))
737 (add-after 'unpack 'replace-asdf
738 ;; Use system ASDF instead of bundled one.
739 (lambda* (#:key inputs #:allow-other-keys)
740 (let* ((cl-asdf (assoc-ref inputs "cl-asdf"))
741 (guix-asdf (string-append
743 "/share/common-lisp/source/asdf/asdf.lisp"))
744 (contrib-asdf "tools/asdf.lisp"))
745 (delete-file contrib-asdf)
746 (copy-file guix-asdf contrib-asdf))))
748 (add-before 'build 'pre-build
749 ;; Enter the source directory for the current platform's lisp
750 ;; kernel, and run 'make clean' to remove the precompiled one.
751 (lambda* (#:key system #:allow-other-keys)
752 (substitute* "lisp-kernel/m4macros.m4"
753 (("/bin/pwd") (which "pwd")))
754 (chdir (string-append
757 ("i686-linux" "linuxx8632")
758 ("x86_64-linux" "linuxx8664")
759 ("armhf-linux" "linuxarm")
760 (_ (string-append "unknown system: " system)))))
761 (substitute* '("Makefile")
764 (invoke "make" "clean")))
765 ;; XXX Do we need to recompile the heap image as well for Guix?
766 ;; For now just use the one we already got in the tarball.
768 (lambda* (#:key outputs inputs system #:allow-other-keys)
769 ;; The lisp kernel built by running 'make' in lisp-kernel/$system
770 ;; is put back into the original directory, so go back. The heap
771 ;; image is there as well.
773 (let* ((out (assoc-ref outputs "out"))
774 (libdir (string-append out "/lib/"))
775 (bindir (string-append out "/bin/"))
776 (wrapper (string-append bindir "ccl"))
777 (bash (assoc-ref inputs "bash"))
780 ("i686-linux" "lx86cl")
781 ("x86_64-linux" "lx86cl64")
782 ("armhf-linux" "armcl")
783 ;; Unlikely to work, but try it anyway...
785 (heap (string-append kernel ".image")))
786 (install-file kernel libdir)
787 (install-file heap libdir)
789 (let ((dirs `("lib" "library" "examples" "tools" "objc-bridge"
796 (for-each copy-recursively
798 (map (cut string-append libdir <>) dirs)))
801 (with-output-to-file wrapper
805 "#!" bash "/bin/sh\n"
806 "export CCL_DEFAULT_DIRECTORY=" libdir "\n"
807 "exec -a \"$0\" " libdir kernel " \"$@\"\n"))))
808 (chmod wrapper #o755))
811 (list (search-path-specification
812 (variable "XDG_DATA_DIRS")
814 (search-path-specification
815 (variable "XDG_CONFIG_DIRS")
817 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))
818 (home-page "https://ccl.clozure.com/")
819 (synopsis "Common Lisp implementation")
820 (description "Clozure CL (often called CCL for short) is a Common Lisp
821 implementation featuring fast compilation speed, native threads, a precise,
822 generational, compacting garbage collector, and a convenient foreign-function
824 (license license:asl2.0)))
833 (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
835 (modules '((guix build utils)))
838 (substitute* "src/unix.c"
839 (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
840 (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
841 (substitute* "src/main.c"
842 (("\" \\(built \" __DATE__ \"\\)\"") ""))
846 "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
847 (build-system gnu-build-system)
849 `(;; We have to add these LIBS so that they are found.
850 #:configure-flags (list "LIBS=-lz"
851 "X_EXTRA_LIBS=-lfontconfig"
853 #:tests? #f)) ; No make check.
854 (native-inputs (list intltool))
856 `(("alsa-lib" ,alsa-lib)
858 ("sdl-image" ,sdl-image)
859 ("sdl-mixer" ,sdl-mixer)
864 ("fontconfig" ,fontconfig)
866 ("openblas" ,openblas)
869 ("mesa-utils" ,mesa-utils)
870 ("binutils" ,binutils)
871 ("libiberty" ,libiberty)
872 ("readline" ,readline)
874 ("gettext-minimal" ,gettext-minimal)))
875 (synopsis "Lisp Universal Shell")
877 "Lush is an object-oriented Lisp interpreter/compiler with features
878 designed to please people who want to prototype large numerical
879 applications. Lush includes an extensive library of
880 vector/matrix/tensor manipulation, numerous numerical libraries
881 (including GSL, LAPACK, and BLAS), a set of graphic functions, a
882 simple GUI toolkit, and interfaces to various graphic and multimedia
883 libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
884 grabbing), and others. Lush is an ideal frontend script language for
885 programming projects written in C or other languages. Lush also has
886 libraries for Machine Learning, Neural Nets and statistical estimation.")
887 (home-page "http://lush.sourceforge.net/")
888 (license license:lgpl2.1+)))
890 (define-public confusion-mdl
891 (let* ((commit "12a055581fc262225272df43287dae48281900f5"))
893 (name "confusion-mdl")
898 (url (string-append "https://gitlab.com/emacsomancer/" name))
902 "1zi8kflzvwqg97ha1sa5xjisbjs5z1mvbpa772vfxiv5ksnpxp0d"))
903 (file-name (git-file-name name version))))
904 (build-system gnu-build-system)
906 `(#:tests? #f ; there are no tests
908 (modify-phases %standard-phases
911 (lambda* (#:key (make-flags '()) #:allow-other-keys)
912 (apply invoke "make" "CC=gcc" make-flags)))
914 (lambda* (#:key outputs #:allow-other-keys)
915 (let* ((out (assoc-ref outputs "out"))
916 (bin (string-append out "/bin")))
917 (install-file "mdli" bin)
923 (synopsis "Interpreter for the MIT Design Language (MDL)")
924 (description "MDL (the MIT Design Language) is a descendant of Lisp. It
925 was originally developed in 1971 on the PDP-10 computer under the Incompatible
926 Timesharing System (ITS) to provide high level language support for the
927 Dynamic Modeling Group at MIT's Project MAC. Infocom built the original
928 PDP-10 Zork in MDL and their later ZIL (Zork Implementation Language) was
929 based on a subset of MDL. Confusion is a MDL interpreter that works just well
930 enough to play the original mainframe Zork all the way through.")
931 (home-page "http://www.russotto.net/git/mrussotto/confusion/src/master/src/README")
932 (license license:gpl3+))))
935 (let ((commit "dfbf19b9a96474b8c1bacac85e43605e5691ceb2")
936 ;; Number of additional commits since the last tag (see the output of
937 ;; "git describe --tags").
941 (version (git-version "1.6g" revision commit))
946 (url "http://www.kylheku.com/git/man/")
948 (file-name (git-file-name name version))
950 (base32 "1zy0g8fj9nsfwzvg88hyaiy94r8j14xhs8vy2ln2niqdm6x2lvy2"))))
951 (build-system gnu-build-system)
953 `(#:tests? #f ; There are no tests.
955 (modify-phases %standard-phases
956 (add-after 'unpack 'fix-man2html-makefile
958 (substitute* "man2html/Makefile.in"
959 ;; It inadvertently ignores @bindir@.
960 (("^(bindir = \\$\\(DESTDIR\\)\\$\\(PREFIX\\)).*" _ prefix)
961 (string-append prefix "@bindir@\n")))
963 (add-after 'unpack 'delete-generated-files
965 (for-each delete-file
968 (map (lambda (d) (string-append d "/Makefile"))
969 '("." "man" "man2html" "src"))
970 (map (lambda (f) (string-append "src/" f))
971 '("makewhatis.in" "man.conf"
972 "paths.h" "version.h"))))
975 (lambda* (#:key outputs #:allow-other-keys)
976 (setenv "CC" ,(cc-for-target))
977 ;; Humor the manually written configure script.
978 (invoke "./configure" "+lang" "en" "+fhs"
979 (string-append "-prefix=" (assoc-ref outputs "out")))
981 (home-page "http://www.kylheku.com/cgit/man/")
982 (synopsis "Modifications to the man utilities, specifically man2html")
984 "This is a fork of the man utilities intended specifically for building
985 the HTML documentation of TXR.")
986 (license license:gpl2))))
996 (url "https://www.kylheku.com/git/txr/")
997 (commit (string-append "txr-" version))))
998 (file-name (git-file-name name version))
1000 (base32 "1hzni1v9qlh1vy8spz8prink7v9hp2bin15vnyfha2ax306w6dq5"))))
1001 (build-system gnu-build-system)
1004 (list ,(string-append "cc=" (cc-for-target))
1005 (string-append "--prefix=" (assoc-ref %outputs "out")))
1006 #:test-target "tests"
1008 (modify-phases %standard-phases
1009 (add-after 'unpack 'fix-license-installation
1010 (lambda* (#:key outputs #:allow-other-keys)
1011 (substitute* "Makefile"
1012 (("INSTALL(,.*LICENSE,.*)\\$\\(datadir\\)" _ match)
1013 (string-append "INSTALL" match
1014 (assoc-ref outputs "out")
1015 "/share/doc/" ,name "-" ,version)))))
1016 (delete 'install-license-files)
1017 (add-after 'unpack 'inhibit-doc-syms-generation
1019 (substitute* "genman.txr"
1020 ;; Exit from genman.txr before it tries to write to
1021 ;; stdlib/doc-syms.tl, which is anyway kept up to date with
1022 ;; each release (and is already compiled to stdlib/doc-syms.tlo
1023 ;; when genman.txr is run).
1024 (("^@\\(output \"stdlib/doc-syms\\.tl\"\\).*" line)
1025 (string-append "@(do (exit))\n" line)))))
1026 (add-after 'unpack 'fix-paths
1027 (lambda* (#:key inputs #:allow-other-keys)
1028 (substitute* "stream.c"
1030 (string-append (assoc-ref inputs "bash") "/bin/bash")))))
1031 (add-after 'unpack 'fix-tests
1033 (substitute* (list "tests/017/realpath.tl"
1034 "tests/017/realpath.expected")
1035 (("/usr/bin") "/"))))
1037 ;; ./configure is a hand-written script that can't handle standard
1038 ;; autotools arguments like CONFIG_SHELL.
1039 (lambda* (#:key configure-flags #:allow-other-keys)
1040 (setenv "txr_shell" (which "bash"))
1041 (apply invoke "./configure" configure-flags)))
1042 (add-after 'build 'build-doc
1044 (setenv "GS_GENERATE_UUIDS" "0")
1045 (invoke "make" "txr-manpage.html" "txr-manpage.pdf")))
1046 (add-after 'install 'install-doc
1047 (lambda* (#:key outputs #:allow-other-keys)
1048 (let ((doc (string-append (assoc-ref outputs "out")
1049 "/share/doc/" ,name "-" ,version)))
1050 (for-each (lambda (f) (install-file f doc))
1051 '("txr-manpage.html" "txr-manpage.pdf")))))
1052 (add-after 'install 'install-vim-files
1053 (lambda* (#:key outputs #:allow-other-keys)
1054 (let* ((out (assoc-ref outputs "out"))
1055 (syntax (string-append out "/share/vim/vimfiles/syntax")))
1056 (install-file "tl.vim" syntax)
1057 (install-file "txr.vim" syntax)))))))
1059 ;; Required to build the documentation.
1067 (synopsis "General-purpose, multi-paradigm programming language")
1069 "TXR is a general-purpose, multi-paradigm programming language. It
1070 comprises two languages integrated into a single tool: a text scanning and
1071 extraction language referred to as the TXR Pattern Language (sometimes just
1072 \"TXR\"), and a general-purpose dialect of Lisp called TXR Lisp. TXR can be
1073 used for everything from \"one liner\" data transformation tasks at the
1074 command line, to data scanning and extracting scripts, to full application
1075 development in a wide-range of areas.")
1076 (home-page "https://nongnu.org/txr/")
1077 (license license:bsd-2)))
1086 (uri (string-append "https://software-lab.de/picoLisp-" version ".tgz"))
1088 (base32 "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j"))
1089 (modules '((guix build utils)))
1091 ;; Delete the pre-compiled jar file.
1092 (delete-file "ersatz/picolisp.jar")
1094 (build-system gnu-build-system)
1096 `(("openssl" ,openssl)))
1098 `(#:system ,(match (%current-system)
1099 ((or "armhf-linux" "aarch64-linux")
1104 (modify-phases %standard-phases
1106 (add-after 'unpack 'fix-paths
1107 (lambda* (#:key outputs #:allow-other-keys)
1108 (let* ((out (assoc-ref outputs "out"))
1109 (shebang-line (string-append
1110 "#!" out "/bin/picolisp "
1111 out "/lib/picolisp/lib.l")))
1112 (substitute* '("bin/pil"
1125 (("#\\!bin/picolisp lib.l")
1127 (("#\\!\\.\\./bin/picolisp \\.\\./lib.l")
1129 (("#\\!/usr/bin/picolisp /usr/lib/picolisp/lib.l")
1132 (add-after 'fix-paths 'make-build-reproducible
1134 (substitute* "src64/lib/asm.l"
1135 (("\\(prinl \"/\\* \" \\(datSym \\(date\\)\\) \" \\*/\\)")
1138 (add-after 'make-build-reproducible 'fix-permissions
1140 (for-each make-file-writable
1148 (invoke "make" "-C" "src" "picolisp" "tools" "gate")))
1149 (add-before 'check 'set-home-for-tests
1151 (setenv "HOME" "/tmp")
1155 (invoke "./pil" "test/lib.l" "-bye" "+")))
1157 (lambda* (#:key outputs #:allow-other-keys)
1158 (let* ((out (assoc-ref outputs "out"))
1159 (bin (string-append out "/bin"))
1160 (man (string-append out "/share/man"))
1161 (picolisp (string-append out "/lib/picolisp")))
1162 (copy-recursively "man" man)
1163 (copy-recursively "." picolisp)
1164 (for-each (lambda (name)
1165 (let ((path (string-append picolisp "/" name)))
1166 (delete-file-recursively path)))
1167 '("CHANGES" "COPYING" "CREDITS" "cygwin"
1168 "INSTALL" "man" "pil" "README" "src" "src64"
1171 (symlink (string-append picolisp "/bin/picolisp")
1172 (string-append bin "/picolisp"))
1173 (symlink (string-append picolisp "/bin/pil")
1174 (string-append bin "/pil")))
1176 (synopsis "Interpreter for the PicoLisp programming language")
1178 "PicoLisp is a programming language, or really a programming system,
1179 including a built-in database engine and a GUI system.")
1180 (home-page "https://picolisp.com/wiki/?home")
1181 (license license:expat)))
1183 (define-public picolisp
1184 (match (%current-system)
1185 ((or "aarch64-linux" "x86_64-linux")
1187 ;; Use the 32-bit picolisp to generate the assembly files required by
1188 ;; the 64-bit picolisp.
1189 (inherit picolisp32)
1192 (list picolisp32 which))
1194 (substitute-keyword-arguments (package-arguments picolisp32)
1195 ((#:system _ "") (%current-system))
1197 `(modify-phases ,phases
1199 (add-before 'build 'fix-paths
1200 ;; This must run after the other shebang-patching phases,
1201 ;; or they will override our changes.
1202 (lambda* (#:key inputs outputs #:allow-other-keys)
1203 (let* ((picolisp32 (assoc-ref inputs "picolisp32"))
1204 (out (assoc-ref outputs "out"))
1205 (shebang-line (string-append
1206 "#!" out "/bin/picolisp "
1207 out "/lib/picolisp/lib.l")))
1208 (substitute* '("bin/pil"
1221 (("#\\!.*picolisp32.*/bin/picolisp .*lib\\.l")
1223 (substitute* "src64/mkAsm"
1225 (string-append picolisp32 "/bin/"))))
1229 (invoke "make" "-C" "src" "tools" "gate")
1230 (invoke "make" "-C" "src64" "CC=gcc" "picolisp")))))))))
1233 (inherit picolisp32)
1234 (name "picolisp")))))
1236 (define-public janet
1244 (url "https://github.com/janet-lang/janet")
1245 (commit (string-append "v" version))))
1246 (file-name (git-file-name name version))
1248 (base32 "1zaf2z2x5mgfp2nwj3q6pmcj558mw1772a09xn8b8na0cahxlrmq"))))
1249 (build-system gnu-build-system)
1253 (string-append "DESTDIR=" #$output)
1254 (string-append "PREFIX=")
1255 (string-append "CC=" #$(cc-for-target)))
1256 #:test-target "test"
1258 #~(modify-phases %standard-phases
1259 (delete 'configure))))
1260 (home-page "https://janet-lang.org/")
1261 (synopsis "Functional, imperative and embeddable programming language")
1263 "Janet is a functional and imperative programming language. It can be
1264 used for rapid prototyping, dynamic systems, and other domains where dynamic
1265 languages shine. You can also add Janet scripting to an application by
1266 embedding a single C file and two headers. It can be easily ported to new
1267 platforms. The entire language (core library, interpreter, compiler,
1268 assembler, PEG) is less than 1MB.")
1269 (license license:expat)))
1271 (define-public lisp-repl-core-dumper
1273 (name "lisp-repl-core-dumper")
1279 (url "https://gitlab.com/ambrevar/lisp-repl-core-dumper.git")
1281 (file-name (git-file-name name version))
1283 (base32 "0yfsyxj462yi3bx587yssp4gwb54jdm6fjk9q93gjrfv8a65ilp7"))))
1284 (build-system copy-build-system)
1287 '(("lisp-repl-core-dumper" "bin/"))
1289 (modify-phases %standard-phases
1290 (add-before 'install 'fix-utils-path
1291 (lambda* (#:key inputs #:allow-other-keys)
1292 (let* ((cat (search-input-file inputs "/bin/cat"))
1293 (paste (search-input-file inputs "/bin/paste"))
1294 (sort (search-input-file inputs "/bin/sort"))
1295 (basename (search-input-file inputs "/bin/basename"))
1296 (sed (search-input-file inputs "/bin/sed")))
1297 (substitute* "lisp-repl-core-dumper"
1298 (("\\$\\(basename") (string-append "$(" basename))
1300 (("\\<paste\\>") paste)
1302 (("\\<sort\\>") sort))))))))
1304 `(("coreutils" ,coreutils-minimal)
1306 (home-page "https://gitlab.com/ambrevar/lisp-repl-core-dumper")
1307 (synopsis "Generate REPL-optimized Lisp cores on demand")
1309 "This tool generates Lisp images that can embed the provided systems
1310 and make for REPLs that start blazing fast.
1313 @item It’s portable and should work with any compiler.
1314 @item It works for any REPL.
1315 @item It allows you to include arbitrary libraries.
1317 (license license:gpl3+)))
1319 (define-public buildapp
1327 (url "https://github.com/xach/buildapp")
1328 (commit (string-append "release-" version))))
1329 (file-name (git-file-name name version))
1331 (base32 "020ipjfqa3l8skd97cj5kq837wgpj28ygfxnkv64cnjrlbnzh161"))))
1332 (build-system gnu-build-system)
1338 (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
1339 #:strip-binaries? #f
1341 (modify-phases %standard-phases
1343 (add-after 'unpack 'set-home
1345 (setenv "HOME" "/tmp")
1347 (add-before 'install 'create-target-directory
1348 (lambda* (#:key outputs #:allow-other-keys)
1349 (let* ((bin (string-append (assoc-ref outputs "out") "/bin")))
1352 (home-page "https://www.xach.com/lisp/buildapp/")
1353 (synopsis "Makes easy to build application executables with SBCL")
1355 "Buildapp is an application for SBCL or CCL that configures and saves an
1356 executable Common Lisp image. It is similar to cl-launch and hu.dwim.build.")
1357 (license license:bsd-2)))
1367 (url "https://github.com/sasagawa888/eisl")
1368 (commit (string-append "v" version))))
1369 (file-name (git-file-name name version))
1371 (base32 "01fwffk71c1cvq7pf50xwpl2a32rbghcymllg67wvm07yfw3gi0q"))))
1372 (build-system gnu-build-system)
1374 (list bash-minimal freeglut gdbm libiconv ncurses tcl tk))
1379 #~(list (string-append "PREFIX=" #$output)
1380 (string-append "CC=" #$(cc-for-target)))
1382 #~(modify-phases %standard-phases
1383 (add-after 'unpack 'fix-paths
1384 (lambda* (#:key inputs #:allow-other-keys)
1385 (substitute* "library/compiler.lsp"
1388 (substitute* "library/tcltk.lsp"
1389 (("c-include \"<tcl/tcl\\.h>\"")
1390 "c-include \"<tcl.h>\"")
1391 (("c-option \"-ltcl -ltk\" linux")
1392 "c-option \"-ltcl8.6 -ltk8.6\" linux"))))
1394 (add-after 'install 'wrap
1395 (lambda* (#:key inputs #:allow-other-keys)
1396 (wrap-program (string-append #$output "/bin/eisl")
1399 (string-append (assoc-ref inputs bin) "/bin"))
1400 '("binutils" "coreutils" "gcc" "ld-wrapper")))
1401 `("LIBRARY_PATH" suffix
1403 (string-append (assoc-ref inputs lib) "/lib"))
1405 (home-page "https://github.com/sasagawa888/eisl")
1406 (synopsis "Implementation of ISLisp")
1407 (description "Easy ISLISP (eisl) is an implementation of ISLisp which
1408 includes a compiler as well as an interpreter.")
1409 (license (list license:bsd-2 ;; documents/license.txt
1410 license:expat ;; cii/LICENSE
1411 license:gpl2+ ;; nana/gdb/test.c and others under nana/
1412 license:bsd-3)))) ;; bench/*