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