gnu: guix: Update snapshot.
[jackhill/guix/guix.git] / gnu / packages / lisp.scm
CommitLineData
f842bbed
JD
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
00ab9458 3;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
e396976b 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
05f5ce0c 5;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
05c63898 6;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
54a43ff4 7;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
636c77d0 8;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
5c7815f2 9;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
f842bbed
JD
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages lisp)
27 #:use-module (gnu packages)
b5b73a82 28 #:use-module ((guix licenses) #:prefix license:)
f842bbed
JD
29 #:use-module (guix packages)
30 #:use-module (gnu packages readline)
31 #:use-module (gnu packages texinfo)
8f9ac901 32 #:use-module (gnu packages tex)
f842bbed
JD
33 #:use-module (gnu packages m4)
34 #:use-module (guix download)
423eef36 35 #:use-module (guix git-download)
f842bbed 36 #:use-module (guix utils)
00ab9458 37 #:use-module (guix build-system gnu)
a72debb7 38 #:use-module (guix build-system asdf)
e3e171ee 39 #:use-module (guix build-system trivial)
ce0614dd 40 #:use-module (gnu packages base)
05c63898 41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages maths)
00ab9458
TUBK
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages bdw-gc)
560f51d0
TUBK
46 #:use-module (gnu packages libffi)
47 #:use-module (gnu packages libffcall)
48 #:use-module (gnu packages readline)
05c63898 49 #:use-module (gnu packages sdl)
b702b52d 50 #:use-module (gnu packages libsigsegv)
05c63898 51 #:use-module (gnu packages linux)
b702b52d 52 #:use-module (gnu packages admin)
531a9aac 53 #:use-module (gnu packages ed)
05c63898 54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gettext)
531a9aac 58 #:use-module (gnu packages m4)
05c63898 59 #:use-module (gnu packages pkg-config)
531a9aac 60 #:use-module (gnu packages version-control)
05c63898 61 #:use-module (gnu packages xorg)
419fb3f1 62 #:use-module (ice-9 match)
63 #:use-module (srfi srfi-1))
f842bbed 64
8d0489ae
AP
65(define (asdf-substitutions lisp)
66 ;; Prepend XDG_DATA_DIRS/LISP-bundle-systems to ASDF's
67 ;; 'default-system-source-registry'.
68 `((("\\(,dir \"systems/\"\\)\\)")
69 (format #f
70 "(,dir \"~a-bundle-systems\")))
71
72 ,@(loop :for dir :in (xdg-data-dirs \"common-lisp/\")
73 :collect `(:directory (,dir \"systems\"))"
74 ,lisp))))
75
f842bbed
JD
76(define-public gcl
77 (package
78 (name "gcl")
e6c1e91d 79 (version "2.6.12")
f842bbed
JD
80 (source
81 (origin
82 (method url-fetch)
83 (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
84 (sha256
e6c1e91d 85 (base32 "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f"))))
f842bbed
JD
86 (build-system gnu-build-system)
87 (arguments
88 `(#:parallel-build? #f ; The build system seems not to be thread safe.
89 #:tests? #f ; There does not seem to be make check or anything similar.
90 #:configure-flags '("--enable-ansi") ; required for use by the maxima package
1803f249
EF
91 #:phases (modify-phases %standard-phases
92 (add-before 'configure 'pre-conf
93 (lambda _
94 (substitute*
95 (append
96 '("pcl/impl/kcl/makefile.akcl"
97 "add-defs"
98 "unixport/makefile.dos"
99 "add-defs.bat"
100 "gcl-tk/makefile.prev"
101 "add-defs1")
102 (find-files "h" "\\.defs"))
103 (("SHELL=/bin/bash")
104 (string-append "SHELL=" (which "bash")))
105 (("SHELL=/bin/sh")
106 (string-append "SHELL=" (which "sh"))))
107 #t))
108 ;; drop strip phase to make maxima build, see
109 ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
110 (delete 'strip))))
47fb74ae
EF
111 (inputs
112 `(("gmp" ,gmp)
113 ("readline" ,readline)))
f842bbed 114 (native-inputs
5c7815f2
EF
115 `(("gcc" ,gcc-4.9)
116 ("m4" ,m4)
f842bbed
JD
117 ("texinfo" ,texinfo)
118 ("texlive" ,texlive)))
6fd52309 119 (home-page "https://www.gnu.org/software/gcl/")
a2b63d58 120 (synopsis "A Common Lisp implementation")
f842bbed
JD
121 (description "GCL is an implementation of the Common Lisp language. It
122features the ability to compile to native object code and to load native
123object code modules directly into its lisp core. It also features a
124stratified garbage collection strategy, a source-level debugger and a built-in
125interface to the Tk widget system.")
126 (license license:lgpl2.0+)))
127
00ab9458
TUBK
128(define-public ecl
129 (package
130 (name "ecl")
108f69c4 131 (version "16.1.3")
00ab9458
TUBK
132 (source
133 (origin
134 (method url-fetch)
e0524511
AP
135 (uri (string-append
136 "https://common-lisp.net/project/ecl/static/files/release/"
137 name "-" version ".tgz"))
00ab9458 138 (sha256
108f69c4 139 (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))
fb7dc6d6
AP
140 (modules '((guix build utils)))
141 (snippet
142 ;; Add ecl-bundle-systems to 'default-system-source-registry'.
143 `(substitute* "contrib/asdf/asdf.lisp"
144 ,@(asdf-substitutions name)))))
00ab9458 145 (build-system gnu-build-system)
cb03a9b6 146 ;; src/configure uses 'which' to confirm the existence of 'gzip'.
00ab9458
TUBK
147 (native-inputs `(("which" ,which)))
148 (inputs `(("gmp" ,gmp)
149 ("libatomic-ops" ,libatomic-ops)
150 ("libgc" ,libgc)
151 ("libffi" ,libffi)))
152 (arguments
60474cd1 153 '(#:tests? #t
60474cd1
AP
154 #:parallel-tests? #f
155 #:phases
156 (modify-phases %standard-phases
157 (delete 'check)
54a43ff4
AP
158 (add-after 'install 'wrap
159 (lambda* (#:key inputs outputs #:allow-other-keys)
160 (let* ((ecl (assoc-ref outputs "out"))
161 (input-path (lambda (lib path)
162 (string-append
163 (assoc-ref inputs lib) path)))
164 (libraries '("gmp" "libatomic-ops" "libgc" "libffi" "libc"))
165 (binaries '("gcc" "ld-wrapper" "binutils"))
166 (library-directories
167 (map (lambda (lib) (input-path lib "/lib"))
168 libraries)))
169
170 (wrap-program (string-append ecl "/bin/ecl")
171 `("PATH" prefix
172 ,(map (lambda (binary)
173 (input-path binary "/bin"))
174 binaries))
175 `("CPATH" suffix
176 ,(map (lambda (lib)
177 (input-path lib "/include"))
932b2ea2 178 `("kernel-headers" ,@libraries)))
54a43ff4
AP
179 `("LIBRARY_PATH" suffix ,library-directories)
180 `("LD_LIBRARY_PATH" suffix ,library-directories)))))
108f69c4
AP
181 (add-after 'wrap 'check (assoc-ref %standard-phases 'check))
182 (add-before 'check 'fix-path-to-ecl
183 (lambda _
184 (substitute* "build/tests/Makefile"
185 (("\\$\\{exec_prefix\\}/") ""))
186 #t)))))
fb7dc6d6
AP
187 (native-search-paths
188 (list (search-path-specification
189 (variable "XDG_DATA_DIRS")
190 (files '("share")))))
00ab9458
TUBK
191 (home-page "http://ecls.sourceforge.net/")
192 (synopsis "Embeddable Common Lisp")
193 (description "ECL is an implementation of the Common Lisp language as
194defined by the ANSI X3J13 specification. Its most relevant features are: a
195bytecode compiler and interpreter, being able to compile Common Lisp with any
196C/C++ compiler, being able to build standalone executables and libraries, and
197supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
198 ;; Note that the file "Copyright" points to some files and directories
199 ;; which aren't under the lgpl2.0+ and instead contain many different,
200 ;; non-copyleft licenses.
201 (license license:lgpl2.0+)))
560f51d0
TUBK
202
203(define-public clisp
204 (package
205 (name "clisp")
206 (version "2.49")
207 (source
208 (origin
209 (method url-fetch)
210 (uri (string-append "mirror://gnu/clisp/release/" version
211 "/clisp-" version ".tar.gz"))
212 (sha256
213 (base32 "0rp82nqp5362isl9i34rwgg04cidz7izljd9d85pqcw1qr964bxx"))))
214 (build-system gnu-build-system)
215 (inputs `(("libffcall" ,libffcall)
c25a51d5 216 ("readline" ,readline-6.2)
560f51d0
TUBK
217 ("libsigsegv" ,libsigsegv)))
218 (arguments
f90ef3c3
MW
219 '(;; XXX The custom configure script does not cope well when passed
220 ;; --build=<triplet>.
221 #:build #f
222 #:phases
636c77d0
RW
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-sh-and-pwd
225 (lambda _
226 ;; The package is very messy with its references to "/bin/sh" and
227 ;; some other absolute paths to traditional tools. These appear in
228 ;; many places where our automatic patching misses them. Therefore
229 ;; we do the following, in this early (post-unpack) phase, to solve
230 ;; the problem from its root.
231 (substitute* (find-files "." "configure|Makefile")
232 (("/bin/sh") "sh"))
233 (substitute* '("src/clisp-link.in")
234 (("/bin/pwd") "pwd"))
235 #t))
c26ba570
RW
236 (add-after 'unpack 'remove-timestamps
237 (lambda _
238 (substitute* "src/constobj.d"
239 (("__DATE__ __TIME__") "\"1\""))
240 #t))
636c77d0
RW
241 (add-before 'build 'chdir-to-source
242 (lambda _
243 ;; We are supposed to call make under the src sub-directory.
244 (chdir "src")
245 #t)))
560f51d0
TUBK
246 ;; Makefiles seem to have race conditions.
247 #:parallel-build? #f))
248 (home-page "http://www.clisp.org/")
4cc78cb3
LC
249 (synopsis "A Common Lisp implementation")
250 (description
251 "GNU CLISP is an implementation of ANSI Common Lisp. Common Lisp is a
252high-level, object-oriented functional programming language. CLISP includes
253an interpreter, a compiler, a debugger, and much more.")
560f51d0
TUBK
254 ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source files have
255 ;; a lot of gpl3+. (Also some parts are under non-copyleft licenses, such
256 ;; as CLX by Texas Instruments.) In that case gpl3+ wins out.
257 (license license:gpl3+)))
b702b52d
TUBK
258
259(define-public sbcl
260 (package
261 (name "sbcl")
1925a879 262 (version "1.3.7")
b702b52d
TUBK
263 (source
264 (origin
265 (method url-fetch)
266 (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
267 version "-source.tar.bz2"))
268 (sha256
8d0489ae
AP
269 (base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5"))
270 (modules '((guix build utils)))
271 (snippet
272 ;; Add sbcl-bundle-systems to 'default-system-source-registry'.
273 `(substitute* "contrib/asdf/asdf.lisp"
274 ,@(asdf-substitutions name)))))
b702b52d 275 (build-system gnu-build-system)
05f5ce0c 276 (outputs '("out" "doc"))
b702b52d
TUBK
277 ;; Bootstrap with CLISP.
278 (native-inputs
279 `(("clisp" ,clisp)
280 ("which" ,which)
281 ("inetutils" ,inetutils) ;for hostname(1)
05f5ce0c
FB
282 ("ed" ,ed)
283 ("texlive" ,texlive)
284 ("texinfo" ,texinfo)))
b702b52d 285 (arguments
f0b7dc7e
ST
286 '(#:modules ((guix build gnu-build-system)
287 (guix build utils)
288 (srfi srfi-1))
289 #:phases
1ee131df
FB
290 (modify-phases %standard-phases
291 (delete 'configure)
292 (add-before 'build 'patch-unix-tool-paths
293 (lambda* (#:key outputs inputs #:allow-other-keys)
294 (let ((out (assoc-ref outputs "out"))
295 (bash (assoc-ref inputs "bash"))
296 (coreutils (assoc-ref inputs "coreutils"))
297 (ed (assoc-ref inputs "ed")))
298 (define (quoted-path input path)
299 (string-append "\"" input path "\""))
300 ;; Patch absolute paths in string literals. Note that this
301 ;; occurs in some .sh files too (which contain Lisp code). Use
302 ;; ISO-8859-1 because some of the files are ISO-8859-1 encoded.
303 (with-fluids ((%default-port-encoding #f))
1925a879
AP
304 ;; The removed file is utf-16-be encoded, which gives substitute*
305 ;; trouble. It does not contain references to the listed programs.
306 (substitute* (delete
307 "./tests/data/compile-file-pos-utf16be.lisp"
308 (find-files "." "\\.(lisp|sh)$"))
1ee131df
FB
309 (("\"/bin/sh\"") (quoted-path bash "/bin/sh"))
310 (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env"))
311 (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat"))
312 (("\"/bin/ed\"") (quoted-path ed "/bin/ed"))
313 (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo"))
314 (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))))
315 ;; This one script has a non-string occurrence of /bin/sh.
316 (substitute* '("tests/foreign.test.sh")
317 ;; Leave whitespace so we don't match the shebang.
318 ((" /bin/sh ") " sh "))
319 ;; This file contains a module that can create executable files
320 ;; which depend on the presence of SBCL. It generates shell
321 ;; scripts doing "exec sbcl ..." to achieve this. We patch both
322 ;; the shebang and the reference to "sbcl", tying the generated
323 ;; executables to the exact SBCL package that generated them.
324 (substitute* '("contrib/sb-executable/sb-executable.lisp")
325 (("/bin/sh") (string-append bash "/bin/sh"))
326 (("exec sbcl") (string-append "exec " out "/bin/sbcl")))
327 ;; Disable some tests that fail in our build environment.
328 (substitute* '("contrib/sb-bsd-sockets/tests.lisp")
329 ;; This requires /etc/protocols.
330 (("\\(deftest get-protocol-by-name/error" all)
331 (string-append "#+nil ;disabled by Guix\n" all)))
332 (substitute* '("contrib/sb-posix/posix-tests.lisp")
333 ;; These assume some users/groups which we don't have.
334 (("\\(deftest pwent\\.[12]" all)
335 (string-append "#+nil ;disabled by Guix\n" all))
336 (("\\(deftest grent\\.[12]" all)
337 (string-append "#+nil ;disabled by Guix\n" all))))))
338 (replace 'build
339 (lambda* (#:key outputs #:allow-other-keys)
340 (setenv "CC" "gcc")
341 (zero? (system* "sh" "make.sh" "clisp"
342 (string-append "--prefix="
343 (assoc-ref outputs "out"))))))
344 (replace 'install
b702b52d 345 (lambda _
05f5ce0c
FB
346 (zero? (system* "sh" "install.sh"))))
347 (add-after 'build 'build-doc
348 (lambda _
349 (with-directory-excursion "doc/manual"
350 (and (zero? (system* "make" "info"))
351 (zero? (system* "make" "dist"))))))
352 (add-after 'install 'install-doc
353 (lambda* (#:key outputs #:allow-other-keys)
354 (let* ((out (assoc-ref outputs "out"))
355 (doc (assoc-ref outputs "doc"))
356 (old-doc-dir (string-append out "/share/doc"))
357 (new-doc/sbcl-dir (string-append doc "/share/doc/sbcl")))
358 (rmdir (string-append old-doc-dir "/sbcl/html"))
359 (mkdir-p new-doc/sbcl-dir)
360 (copy-recursively (string-append old-doc-dir "/sbcl")
361 new-doc/sbcl-dir)
362 (delete-file-recursively old-doc-dir)
363 #t))))
1ee131df
FB
364 ;; No 'check' target, though "make.sh" (build phase) runs tests.
365 #:tests? #f))
8d0489ae
AP
366 (native-search-paths
367 (list (search-path-specification
368 (variable "XDG_DATA_DIRS")
369 (files '("share")))))
b702b52d
TUBK
370 (home-page "http://www.sbcl.org/")
371 (synopsis "Common Lisp implementation")
372 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
373Lisp compiler. In addition to the compiler and runtime system for ANSI Common
374Lisp, it provides an interactive environment including a debugger, a
375statistical profiler, a code coverage tool, and many other extensions.")
376 ;; Public domain in jurisdictions that allow it, bsd-2 otherwise. MIT
377 ;; loop macro has its own license. See COPYING file for further notes.
378 (license (list license:public-domain license:bsd-2
379 (license:x11-style "file://src/code/loop.lisp")))))
531a9aac
TUBK
380
381(define-public ccl
382 (package
383 (name "ccl")
3701f014 384 (version "1.11")
531a9aac
TUBK
385 (source #f)
386 (build-system gnu-build-system)
387 ;; CCL consists of a "lisp kernel" and "heap image", both of which are
388 ;; shipped in precompiled form in source tarballs. The former is a C
389 ;; program which we can rebuild from scratch, but the latter cannot be
390 ;; generated without an already working copy of CCL, and is platform
391 ;; dependent, so we need to fetch the correct tarball for the platform.
392 (inputs
393 `(("ccl"
394 ,(origin
395 (method url-fetch)
396 (uri (string-append
3701f014
CC
397 "ftp://ftp.clozure.com/pub/release/" version
398 "/ccl-" version "-"
531a9aac
TUBK
399 (match (%current-system)
400 ((or "i686-linux" "x86_64-linux") "linuxx86")
42f11801
MW
401 ("armhf-linux" "linuxarm")
402 ;; Prevent errors when querying this package on unsupported
403 ;; platforms, e.g. when running "guix package --search="
404 (_ "UNSUPPORTED"))
531a9aac
TUBK
405 ".tar.gz"))
406 (sha256
407 (base32
408 (match (%current-system)
409 ((or "i686-linux" "x86_64-linux")
3701f014 410 "0w3dmj7q9kqyra3yrf1lxclnjz151yvf5s5q8ayllvmvqbl8bs08")
42f11801 411 ("armhf-linux"
3701f014 412 "1x487aaz2rqcb6k301sy2p39a1m4qdhg6z9p9fb76ssipqgr38b4")
42f11801 413 (_ ""))))))))
531a9aac
TUBK
414 (native-inputs
415 `(("m4" ,m4)
416 ("subversion" ,subversion)))
417 (arguments
418 `(#:tests? #f ;no 'check' target
fc7d5a34
AP
419 #:modules ((srfi srfi-26)
420 (guix build utils)
421 (guix build gnu-build-system))
531a9aac
TUBK
422 #:phases
423 (alist-replace
424 'unpack
425 (lambda* (#:key inputs #:allow-other-keys)
426 (and (zero? (system* "tar" "xzvf" (assoc-ref inputs "ccl")))
427 (begin (chdir "ccl") #t)))
428 (alist-delete
429 'configure
430 (alist-cons-before
431 'build 'pre-build
432 ;; Enter the source directory for the current platform's lisp
433 ;; kernel, and run 'make clean' to remove the precompiled one.
434 (lambda _
435 (chdir (string-append
436 "lisp-kernel/"
437 ,(match (or (%current-target-system) (%current-system))
76eb7266 438 ("i686-linux" "linuxx8632")
531a9aac 439 ("x86_64-linux" "linuxx8664")
76eb7266
MW
440 ("armhf-linux" "linuxarm")
441 ;; Prevent errors when querying this package
442 ;; on unsupported platforms, e.g. when running
443 ;; "guix package --search="
444 (_ "UNSUPPORTED"))))
531a9aac
TUBK
445 (substitute* '("Makefile")
446 (("/bin/rm") "rm"))
447 (setenv "CC" "gcc")
448 (zero? (system* "make" "clean")))
449 ;; XXX Do we need to recompile the heap image as well for Guix?
450 ;; For now just use the one we already got in the tarball.
451 (alist-replace
452 'install
453 (lambda* (#:key outputs inputs #:allow-other-keys)
454 ;; The lisp kernel built by running 'make' in lisp-kernel/$system
455 ;; is put back into the original directory, so go back. The heap
456 ;; image is there as well.
457 (chdir "../..")
458 (let* ((out (assoc-ref outputs "out"))
459 (libdir (string-append out "/lib/"))
460 (bindir (string-append out "/bin/"))
461 (wrapper (string-append bindir "ccl"))
462 (bash (assoc-ref inputs "bash"))
463 (kernel
464 ,(match (or (%current-target-system) (%current-system))
76eb7266 465 ("i686-linux" "lx86cl")
531a9aac 466 ("x86_64-linux" "lx86cl64")
76eb7266
MW
467 ("armhf-linux" "armcl")
468 ;; Prevent errors when querying this package
469 ;; on unsupported platforms, e.g. when running
470 ;; "guix package --search="
471 (_ "UNSUPPORTED")))
531a9aac 472 (heap (string-append kernel ".image")))
fc7d5a34
AP
473 (install-file kernel libdir)
474 (install-file heap libdir)
475
476 (let ((dirs '("lib" "library" "examples" "contrib"
477 "tools" "objc-bridge")))
478 (for-each copy-recursively
479 dirs
480 (map (cut string-append libdir <>) dirs)))
481
531a9aac 482 (mkdir-p bindir)
531a9aac
TUBK
483 (with-output-to-file wrapper
484 (lambda ()
485 (display
486 (string-append
487 "#!" bash "/bin/sh\n"
58b24078 488 "CCL_DEFAULT_DIRECTORY=" libdir "\n"
531a9aac
TUBK
489 "export CCL_DEFAULT_DIRECTORY\n"
490 "exec " libdir kernel "\n"))))
491 (chmod wrapper #o755)))
492 %standard-phases))))))
493 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))
494 (home-page "http://ccl.clozure.com/")
495 (synopsis "Common Lisp implementation")
496 (description "Clozure CL (often called CCL for short) is a Common Lisp
497implementation featuring fast compilation speed, native threads, a precise,
498generational, compacting garbage collector, and a convenient foreign-function
499interface.")
500 ;; See file doc/LICENSE for clarifications it makes regarding how the LGPL
501 ;; applies to Lisp code according to them.
502 (license (list license:lgpl2.1
503 license:clarified-artistic)))) ;TRIVIAL-LDAP package
423eef36 504
995e5092 505(define-public femtolisp
506 (let ((commit "68c5b1225572ecf2c52baf62f928063e5a30511b")
507 (revision "1"))
508 (package
509 (name "femtolisp")
510 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
511 (source (origin
512 (method git-fetch)
513 (uri (git-reference
514 (url "https://github.com/JeffBezanson/femtolisp.git")
515 (commit commit)))
516 (file-name (string-append name "-" version "-checkout"))
517 (sha256
518 (base32
519 "04rnwllxnl86zw8c6pwxznn49bvkvh0f1lfliy085vjzvlq3rgja"))))
419fb3f1 520 ;; See "utils.h" for supported systems. Upstream bug:
521 ;; https://github.com/JeffBezanson/femtolisp/issues/25
522 (supported-systems
523 (fold delete %supported-systems
dc00f635 524 '("armhf-linux" "mips64el-linux" "aarch64-linux")))
995e5092 525 (build-system gnu-build-system)
526 (arguments
f7fe5f7a 527 `(#:make-flags '("CC=gcc" "release")
528 #:test-target "test"
995e5092 529 #:phases
530 (modify-phases %standard-phases
531 (delete 'configure) ; No configure script
995e5092 532 (replace 'install ; Makefile has no 'install phase
533 (lambda* (#:key outputs #:allow-other-keys)
534 (let* ((out (assoc-ref outputs "out"))
535 (bin (string-append out "/bin")))
536 (install-file "flisp" bin)
537 #t)))
538 ;; The flisp binary is now available, run bootstrap to
539 ;; generate flisp.boot and afterwards runs make test.
540 (add-after 'install 'bootstrap-gen-and-test
541 (lambda* (#:key outputs #:allow-other-keys)
542 (let* ((out (assoc-ref outputs "out"))
543 (bin (string-append out "/bin")))
544 (and
545 (zero? (system* "./bootstrap.sh"))
546 (install-file "flisp.boot" bin))))))))
547 (synopsis "Scheme-like lisp implementation")
548 (description
549 "@code{femtolisp} is a scheme-like lisp implementation with a
550simple, elegant Scheme dialect. It is a lisp-1 with lexical scope.
551The core is 12 builtin special forms and 33 builtin functions.")
552 (home-page "https://github.com/JeffBezanson/femtolisp")
553 (license license:bsd-3))))
a72debb7 554
05c63898 555(define-public lush2
556 (package
557 (name "lush2")
558 (version "2.0.1")
559 (source
560 (origin
561 (method url-fetch)
562 (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
563 version ".tar.gz"))
564 (modules '((guix build utils)))
565 (snippet
566 '(begin
567 (substitute* "src/unix.c"
568 (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
569 (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
570 (substitute* "src/main.c"
571 (("\" \\(built \" __DATE__ \"\\)\"") ""))))
572 (sha256
573 (base32
574 "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
575 (build-system gnu-build-system)
576 (arguments
577 `(;; We have to add these LIBS so that they are found.
578 #:configure-flags (list "LIBS=-lz"
579 "X_EXTRA_LIBS=-lfontconfig"
580 "--with-x")
581 #:tests? #f)) ; No make check.
582 (native-inputs `(("intltool" ,intltool)))
583 (inputs
584 `(("alsa-lib" ,alsa-lib)
585 ("sdl" ,sdl)
586 ("sdl-image" ,sdl-image)
587 ("sdl-mixer" ,sdl-mixer)
588 ("sdl-net" ,sdl-net)
589 ("sdl-ttf" ,sdl-ttf)
590 ("lapack" ,lapack)
591 ("libxft" ,libxft)
592 ("fontconfig" ,fontconfig)
593 ("gsl" ,gsl)
594 ("openblas" ,openblas)
595 ("glu" ,glu)
596 ("mesa" ,mesa)
597 ("mesa-utils" ,mesa-utils)
598 ("binutils" ,binutils)
599 ("libiberty" ,libiberty)
600 ("readline" ,readline)
601 ("zlib" ,zlib)
602 ("gettext-minimal" ,gettext-minimal)))
603 (synopsis "Lisp Universal Shell")
604 (description
605 "Lush is an object-oriented Lisp interpreter/compiler with features
606designed to please people who want to prototype large numerical
607applications. Lush includes an extensive library of
608vector/matrix/tensor manipulation, numerous numerical libraries
609(including GSL, LAPACK, and BLAS), a set of graphic functions, a
610simple GUI toolkit, and interfaces to various graphic and multimedia
611libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
612grabbing), and others. Lush is an ideal frontend script language for
613programming projects written in C or other languages. Lush also has
614libraries for Machine Learning, Neural Nets and statistical estimation.")
615 (home-page "http://lush.sourceforge.net/")
616 (license license:lgpl2.1+)))
617
a72debb7
AP
618(define-public sbcl-alexandria
619 (let ((revision "1")
620 (commit "926a066611b7b11cb71e26c827a271e500888c30"))
621 (package
622 (name "sbcl-alexandria")
623 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
624 (source
625 (origin
626 (method git-fetch)
627 (uri (git-reference
628 (url "https://gitlab.common-lisp.net/alexandria/alexandria.git")
629 (commit commit)))
630 (sha256
631 (base32
632 "18yncicdkh294j05rhgm23gzi36y9qy6vrfba8vg69jrxjp1hx8l"))
633 (file-name (string-append "alexandria-" version "-checkout"))))
634 (build-system asdf-build-system/sbcl)
635 (synopsis "Collection of portable utilities for Common Lisp")
636 (description
637 "Alexandria is a collection of portable utilities. It does not contain
638conceptual extensions to Common Lisp. It is conservative in scope, and
639portable between implementations.")
640 (home-page "https://common-lisp.net/project/alexandria/")
641 (license license:public-domain))))
642
643(define-public cl-alexandria
644 (sbcl-package->cl-source-package sbcl-alexandria))
645
646(define-public ecl-alexandria
647 (sbcl-package->ecl-package sbcl-alexandria))
86022c92
AP
648
649(define-public sbcl-fiveam
650 (package
651 (name "sbcl-fiveam")
652 (version "1.2")
653 (source
654 (origin
655 (method url-fetch)
656 (uri (string-append
657 "https://github.com/sionescu/fiveam/archive/v"
658 version ".tar.gz"))
659 (sha256
660 (base32 "0f48pcbhqs3wwwzjl5nk57d4hcbib4l9xblxc66b8c2fhvhmhxnv"))
661 (file-name (string-append "fiveam-" version ".tar.gz"))))
662 (inputs `(("sbcl-alexandria" ,sbcl-alexandria)))
663 (build-system asdf-build-system/sbcl)
664 (synopsis "Common Lisp testing framework")
665 (description "FiveAM is a simple (as far as writing and running tests
666goes) regression testing framework. It has been designed with Common Lisp's
667interactive development model in mind.")
668 (home-page "https://common-lisp.net/project/fiveam/")
669 (license license:bsd-3)))
670
671(define-public cl-fiveam
672 (sbcl-package->cl-source-package sbcl-fiveam))
673
674(define-public ecl-fiveam
675 (sbcl-package->ecl-package sbcl-fiveam))
8662809d
AP
676
677(define-public sbcl-bordeaux-threads
678 (package
679 (name "sbcl-bordeaux-threads")
680 (version "0.8.5")
681 (source (origin
682 (method url-fetch)
683 (uri (string-append
684 "https://github.com/sionescu/bordeaux-threads/archive/v"
685 version ".tar.gz"))
686 (sha256
687 (base32 "10ryrcx832fwqdawb6jmknymi7wpdzhi30qzx7cbrk0cpnka71w2"))
688 (file-name
689 (string-append "bordeaux-threads-" version ".tar.gz"))))
690 (inputs `(("sbcl-alexandria" ,sbcl-alexandria)))
691 (native-inputs `(("tests:cl-fiveam" ,sbcl-fiveam)))
692 (build-system asdf-build-system/sbcl)
693 (synopsis "Portable shared-state concurrency library for Common Lisp")
694 (description "BORDEAUX-THREADS is a proposed standard for a minimal
695MP/Threading interface. It is similar to the CLIM-SYS threading and lock
696support.")
697 (home-page "https://common-lisp.net/project/bordeaux-threads/")
698 (license license:x11)))
699
700(define-public cl-bordeaux-threads
701 (sbcl-package->cl-source-package sbcl-bordeaux-threads))
702
703(define-public ecl-bordeaux-threads
704 (sbcl-package->ecl-package sbcl-bordeaux-threads))
059cab30
AP
705
706(define-public sbcl-trivial-gray-streams
707 (let ((revision "1")
708 (commit "0483ade330508b4b2edeabdb47d16ec9437ee1cb"))
709 (package
710 (name "sbcl-trivial-gray-streams")
711 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
712 (source
713 (origin
714 (method git-fetch)
715 (uri
716 (git-reference
717 (url "https://github.com/trivial-gray-streams/trivial-gray-streams.git")
718 (commit commit)))
719 (sha256
720 (base32 "0m3rpf2x0zmdk3nf1qfa01j6a55vj7gkwhyw78qslcgbjlgh8p4d"))
721 (file-name
722 (string-append "trivial-gray-streams-" version "-checkout"))))
723 (build-system asdf-build-system/sbcl)
724 (synopsis "Compatibility layer for Gray streams implementations")
725 (description "Gray streams is an interface proposed for inclusion with
726ANSI CL by David N. Gray. The proposal did not make it into ANSI CL, but most
727popular CL implementations implement it. This package provides an extremely
728thin compatibility layer for gray streams.")
729 (home-page "http://www.cliki.net/trivial-gray-streams")
730 (license license:x11))))
731
732(define-public cl-trivial-gray-streams
733 (sbcl-package->cl-source-package sbcl-trivial-gray-streams))
734
735(define-public ecl-trivial-gray-streams
736 (sbcl-package->ecl-package sbcl-trivial-gray-streams))
3c55c780
AP
737
738(define-public sbcl-flexi-streams
739 (package
740 (name "sbcl-flexi-streams")
741 (version "1.0.12")
742 (source
743 (origin
744 (method url-fetch)
745 (uri (string-append
746 "https://github.com/edicl/flexi-streams/archive/v"
747 version ".tar.gz"))
748 (sha256
749 (base32 "16grnxvs7vqm5s6myf8a5s7vwblzq1kgwj8i7ahz8vwvihm9gzfi"))
750 (file-name (string-append "flexi-streams-" version ".tar.gz"))))
751 (build-system asdf-build-system/sbcl)
752 (inputs `(("sbcl-trivial-gray-streams" ,sbcl-trivial-gray-streams)))
753 (synopsis "Implementation of virtual bivalent streams for Common Lisp")
754 (description "Flexi-streams is an implementation of \"virtual\" bivalent
755streams that can be layered atop real binary or bivalent streams and that can
756be used to read and write character data in various single- or multi-octet
757encodings which can be changed on the fly. It also supplies in-memory binary
758streams which are similar to string streams.")
759 (home-page "http://weitz.de/flexi-streams/")
760 (license license:bsd-3)))
761
762(define-public cl-flexi-streams
763 (sbcl-package->cl-source-package sbcl-flexi-streams))
764
765(define-public ecl-flexi-streams
766 (sbcl-package->ecl-package sbcl-flexi-streams))
5aa608a7
AP
767
768(define-public sbcl-cl-ppcre
769 (package
770 (name "sbcl-cl-ppcre")
771 (version "2.0.11")
772 (source
773 (origin
774 (method url-fetch)
775 (uri (string-append
776 "https://github.com/edicl/cl-ppcre/archive/v"
777 version ".tar.gz"))
778 (sha256
779 (base32 "1i7daxf0wnydb0pgwiym7qh2wy70n14lxd6dyv28sy0naa8p31gd"))
780 (file-name (string-append "cl-ppcre-" version ".tar.gz"))))
781 (build-system asdf-build-system/sbcl)
782 (native-inputs `(("tests:cl-flexi-streams" ,sbcl-flexi-streams)))
783 (synopsis "Portable regular expression library for Common Lisp")
784 (description "CL-PPCRE is a portable regular expression library for Common
785Lisp, which is compatible with perl. It is pretty fast, thread-safe, and
786compatible with ANSI-compliant Common Lisp implementations.")
787 (home-page "http://weitz.de/cl-ppcre/")
788 (license license:bsd-2)))
789
790(define-public cl-ppcre
791 (sbcl-package->cl-source-package sbcl-cl-ppcre))
792
793(define-public ecl-cl-ppcre
794 (sbcl-package->ecl-package sbcl-cl-ppcre))
4b51b21c
AP
795
796(define-public sbcl-clx
797 (let ((revision "1")
798 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
799 (package
800 (name "sbcl-clx")
801 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
802 (source
803 (origin
804 (method git-fetch)
805 (uri
806 (git-reference
807 (url "https://github.com/sharplispers/clx.git")
808 (commit commit)))
809 (sha256
810 (base32 "0qffag03ns52kwq9xjns2qg1yr0bf3ba507iwq5cmx5xz0b0rmjm"))
811 (file-name (string-append "clx-" version "-checkout"))
812 (patches
813 (list
814 (search-patch "clx-remove-demo.patch")))
815 (modules '((guix build utils)))
816 (snippet
817 '(begin
818 ;; These removed files cause the compiled system to crash when
819 ;; loading.
820 (delete-file-recursively "demo")
821 (delete-file "test/trapezoid.lisp")
822 (substitute* "clx.asd"
823 (("\\(:file \"trapezoid\"\\)") ""))))))
824 (build-system asdf-build-system/sbcl)
825 (arguments
826 '(#:special-dependencies '("sb-bsd-sockets")))
827 (home-page "http://www.cliki.net/portable-clx")
828 (synopsis "X11 client library for Common Lisp")
829 (description "CLX is an X11 client library for Common Lisp. The code was
830originally taken from a CMUCL distribution, was modified somewhat in order to
831make it compile and run under SBCL, then a selection of patches were added
832from other CLXes around the net.")
833 (license license:x11))))
834
835(define-public cl-clx
836 (sbcl-package->cl-source-package sbcl-clx))
837
838(define-public ecl-clx
839 (sbcl-package->ecl-package sbcl-clx))
d075960f
AP
840
841(define-public sbcl-stumpwm
842 (package
843 (name "sbcl-stumpwm")
bdeecf56 844 (version "1.0.0")
d075960f
AP
845 (source (origin
846 (method url-fetch)
847 (uri (string-append
848 "https://github.com/stumpwm/stumpwm/archive/"
849 version ".tar.gz"))
850 (sha256
bdeecf56 851 (base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i"))
d075960f
AP
852 (file-name (string-append "stumpwm-" version ".tar.gz"))))
853 (build-system asdf-build-system/sbcl)
854 (inputs `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
855 ("sbcl-clx" ,sbcl-clx)))
856 (outputs '("out" "bin"))
857 (arguments
858 '(#:special-dependencies '("sb-posix")
859 #:phases
860 (modify-phases %standard-phases
861 (add-after 'create-symlinks 'build-program
862 (lambda* (#:key lisp outputs inputs #:allow-other-keys)
863 (build-program
864 lisp
865 (string-append (assoc-ref outputs "bin") "/bin/stumpwm")
866 #:inputs inputs
867 #:entry-program '((stumpwm:stumpwm) 0))))
868 (add-after 'build-program 'create-desktop-file
869 (lambda* (#:key outputs lisp binary? #:allow-other-keys)
870 (let ((output (or (assoc-ref outputs "bin")
871 (assoc-ref outputs "out")))
872 (xsessions "/share/xsessions"))
873 (mkdir-p (string-append output xsessions))
874 (with-output-to-file
875 (string-append output xsessions
876 "/stumpwm.desktop")
877 (lambda _
878 (format #t
879 "[Desktop Entry]~@
880 Name=stumpwm~@
881 Comment=The Stump Window Manager~@
882 Exec=~a/bin/stumpwm~@
883 TryExec=~@*~a/bin/stumpwm~@
884 Icon=~@
885 Type=Application~%"
886 output)))
887 #t))))))
888 (synopsis "Window manager written in Common Lisp")
889 (description "Stumpwm is a window manager written entirely in Common Lisp.
890It attempts to be highly customizable while relying entirely on the keyboard
891for input. These design decisions reflect the growing popularity of
892productive, customizable lisp based systems.")
7bf837fd 893 (home-page "https://github.com/stumpwm/stumpwm")
d075960f
AP
894 (license license:gpl2+)
895 (properties `((ecl-variant . ,(delay ecl-stumpwm))))))
896
897(define-public cl-stumpwm
898 (sbcl-package->cl-source-package sbcl-stumpwm))
899
900(define-public ecl-stumpwm
901 (let ((base (sbcl-package->ecl-package sbcl-stumpwm)))
902 (package
903 (inherit base)
904 (outputs '("out"))
905 (arguments '()))))
e3e171ee
AP
906
907(define sbcl-slynk-boot0
908 (let ((revision "1")
909 (commit "5706cd45d484a4f25795abe8e643509d31968aa2"))
910 (package
911 (name "sbcl-slynk")
912 (version (string-append "1.0.0-beta-" revision "." (string-take commit 7)))
913 (source
914 (origin
915 (method git-fetch)
916 (uri
917 (git-reference
918 (url "https://github.com/joaotavora/sly.git")
919 (commit commit)))
920 (sha256
921 (base32 "0h4gg3sndl2bf6jdnx9nrf14p9hhi43hagrl0f4v4l11hczl8w81"))
922 (file-name (string-append "slynk-" version "-checkout"))
923 (modules '((guix build utils)
924 (ice-9 ftw)))
925 (snippet
926 '(begin
927 ;; Move the contribs into the main source directory for easier
928 ;; access
929 (substitute* "slynk/slynk.asd"
930 (("\\.\\./contrib")
931 "contrib")
932 (("\\(defsystem :slynk-util")
933 "(defsystem :slynk-util :depends-on (:slynk)"))
934 (substitute* "contrib/slynk-trace-dialog.lisp"
935 (("\\(slynk::reset-inspector\\)") ; Causes problems on load
936 "nil"))
937 (substitute* "contrib/slynk-profiler.lisp"
938 (("slynk:to-line")
939 "slynk-pprint-to-line"))
940 (rename-file "contrib" "slynk/contrib")
941 ;; Move slynk's contents into the base directory for easier
942 ;; access
943 (for-each
944 (lambda (file)
945 (unless (string-prefix? "." file)
946 (rename-file (string-append "slynk/" file)
947 (string-append "./" (basename file)))))
948 (scandir "slynk"))))))
949 (build-system asdf-build-system/sbcl)
950 (arguments
951 `(#:tests? #f)) ; No test suite
952 (synopsis "Common Lisp IDE for Emacs")
953 (description "SLY is a fork of SLIME. It also features a completely
954redesigned REPL based on Emacs's own full-featured comint.el, live code
955annotations, and a consistent interactive button interface. Everything can be
956copied to the REPL. One can create multiple inspectors with independent
957history.")
958 (home-page "https://github.com/joaotavora/sly")
959 (license license:public-domain)
960 (properties `((cl-source-variant . ,(delay cl-slynk)))))))
961
962(define-public cl-slynk
963 (sbcl-package->cl-source-package sbcl-slynk-boot0))
964
965(define ecl-slynk-boot0
966 (sbcl-package->ecl-package sbcl-slynk-boot0))
967
968(define sbcl-slynk-arglists
969 (package
970 (inherit sbcl-slynk-boot0)
971 (name "sbcl-slynk-arglists")
972 (inputs `(("sbcl-slynk" ,sbcl-slynk-boot0)))
973 (arguments
974 `(#:asd-file "slynk.asd"
975 ,@(package-arguments sbcl-slynk-boot0)))))
976
977(define ecl-slynk-arglists
978 (sbcl-package->ecl-package sbcl-slynk-arglists))
979
980(define sbcl-slynk-util
981 (package
982 (inherit sbcl-slynk-arglists)
983 (name "sbcl-slynk-util")))
984
985(define ecl-slynk-util
986 (sbcl-package->ecl-package sbcl-slynk-util))
987
988(define sbcl-slynk-fancy-inspector
989 (package
990 (inherit sbcl-slynk-arglists)
991 (name "sbcl-slynk-fancy-inspector")
992 (inputs `(("sbcl-slynk-util" ,sbcl-slynk-util)
993 ,@(package-inputs sbcl-slynk-arglists)))))
994
995(define ecl-slynk-fancy-inspector
996 (sbcl-package->ecl-package sbcl-slynk-fancy-inspector))
997
998(define sbcl-slynk-package-fu
999 (package
1000 (inherit sbcl-slynk-arglists)
1001 (name "sbcl-slynk-package-fu")))
1002
1003(define ecl-slynk-package-fu
1004 (sbcl-package->ecl-package sbcl-slynk-package-fu))
1005
1006(define sbcl-slynk-mrepl
1007 (package
1008 (inherit sbcl-slynk-arglists)
1009 (name "sbcl-slynk-mrepl")))
1010
1011(define ecl-slynk-mrepl
1012 (sbcl-package->ecl-package sbcl-slynk-mrepl))
1013
1014(define sbcl-slynk-trace-dialog
1015 (package
1016 (inherit sbcl-slynk-arglists)
1017 (name "sbcl-slynk-trace-dialog")))
1018
1019(define ecl-slynk-trace-dialog
1020 (sbcl-package->ecl-package sbcl-slynk-trace-dialog))
1021
1022(define sbcl-slynk-profiler
1023 (package
1024 (inherit sbcl-slynk-arglists)
1025 (name "sbcl-slynk-profiler")))
1026
1027(define ecl-slynk-profiler
1028 (sbcl-package->ecl-package sbcl-slynk-profiler))
1029
1030(define sbcl-slynk-stickers
1031 (package
1032 (inherit sbcl-slynk-arglists)
1033 (name "sbcl-slynk-stickers")))
1034
1035(define ecl-slynk-stickers
1036 (sbcl-package->ecl-package sbcl-slynk-stickers))
1037
1038(define sbcl-slynk-indentation
1039 (package
1040 (inherit sbcl-slynk-arglists)
1041 (name "sbcl-slynk-indentation")))
1042
1043(define ecl-slynk-indentation
1044 (sbcl-package->ecl-package sbcl-slynk-indentation))
1045
1046(define sbcl-slynk-retro
1047 (package
1048 (inherit sbcl-slynk-arglists)
1049 (name "sbcl-slynk-retro")))
1050
1051(define ecl-slynk-retro
1052 (sbcl-package->ecl-package sbcl-slynk-retro))
1053
1054(define slynk-systems
1055 '("slynk"
1056 "slynk-util"
1057 "slynk-arglists"
1058 "slynk-fancy-inspector"
1059 "slynk-package-fu"
1060 "slynk-mrepl"
1061 "slynk-profiler"
1062 "slynk-trace-dialog"
1063 "slynk-stickers"
1064 "slynk-indentation"
1065 "slynk-retro"))
1066
1067(define-public sbcl-slynk
1068 (package
1069 (inherit sbcl-slynk-boot0)
1070 (inputs
1071 `(("slynk" ,sbcl-slynk-boot0)
1072 ("slynk-util" ,sbcl-slynk-util)
1073 ("slynk-arglists" ,sbcl-slynk-arglists)
1074 ("slynk-fancy-inspector" ,sbcl-slynk-fancy-inspector)
1075 ("slynk-package-fu" ,sbcl-slynk-package-fu)
1076 ("slynk-mrepl" ,sbcl-slynk-mrepl)
1077 ("slynk-profiler" ,sbcl-slynk-profiler)
1078 ("slynk-trace-dialog" ,sbcl-slynk-trace-dialog)
1079 ("slynk-stickers" ,sbcl-slynk-stickers)
1080 ("slynk-indentation" ,sbcl-slynk-indentation)
1081 ("slynk-retro" ,sbcl-slynk-retro)))
1082 (native-inputs `(("sbcl" ,sbcl)))
1083 (build-system trivial-build-system)
1084 (source #f)
1085 (outputs '("out" "image"))
1086 (arguments
1087 `(#:modules ((guix build union)
1088 (guix build utils)
1089 (guix build lisp-utils))
1090 #:builder
1091 (begin
1092 (use-modules (ice-9 match)
1093 (srfi srfi-1)
1094 (guix build union)
1095 (guix build lisp-utils))
1096
1097 (union-build
1098 (assoc-ref %outputs "out")
1099 (filter-map
1100 (match-lambda
1101 ((name . path)
1102 (if (string-prefix? "slynk" name) path #f)))
1103 %build-inputs))
1104
1105 (prepend-to-source-registry
1106 (string-append (assoc-ref %outputs "out") "//"))
1107 (build-image "sbcl"
1108 (string-append
1109 (assoc-ref %outputs "image")
1110 "/bin/slynk")
1111 #:inputs %build-inputs
1112 #:dependencies ',slynk-systems))))))
1113
1114(define-public ecl-slynk
1115 (package
1116 (inherit sbcl-slynk)
1117 (name "ecl-slynk")
1118 (inputs
1119 (map (match-lambda
1120 ((name pkg . _)
1121 (list name (sbcl-package->ecl-package pkg))))
1122 (package-inputs sbcl-slynk)))
1123 (native-inputs '())
1124 (outputs '("out"))
1125 (arguments
1126 '(#:modules ((guix build union))
1127 #:builder
1128 (begin
1129 (use-modules (ice-9 match)
1130 (guix build union))
1131 (match %build-inputs
1132 (((names . paths) ...)
1133 (union-build (assoc-ref %outputs "out")
1134 paths))))))))
96784438
AP
1135
1136(define-public sbcl-stumpwm+slynk
1137 (package
1138 (inherit sbcl-stumpwm)
1139 (name "sbcl-stumpwm-with-slynk")
1140 (outputs '("out"))
1141 (native-inputs
1142 `(("stumpwm" ,sbcl-stumpwm)
1143 ("slynk" ,sbcl-slynk)))
1144 (arguments
1145 (substitute-keyword-arguments (package-arguments sbcl-stumpwm)
1146 ((#:phases phases)
1147 `(modify-phases ,phases
1148 (replace 'build-program
1149 (lambda* (#:key lisp inputs outputs #:allow-other-keys)
1150 (let* ((out (assoc-ref outputs "out"))
1151 (program (string-append out "/bin/stumpwm")))
1152 (build-program lisp program
1153 #:inputs inputs
1154 #:entry-program '((stumpwm:stumpwm) 0)
1155 #:dependencies '("stumpwm"
1156 ,@slynk-systems))
1157 ;; Remove unneeded file.
1158 (delete-file (string-append out "/bin/stumpwm-exec.fasl"))
1159 #t)))
1160 (delete 'copy-source)
1161 (delete 'build)
1162 (delete 'check)
1163 (delete 'link-dependencies)
1164 (delete 'cleanup)
1165 (delete 'create-symlinks)))))))