gnu: Add sbcl-cl-uglify-js.
[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>
14afc7b8 7;;; Copyright © 2016, 2017 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"))))
0e1371be 662 (inputs `(("alexandria" ,sbcl-alexandria)))
86022c92
AP
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"))))
0e1371be
AP
690 (inputs `(("alexandria" ,sbcl-alexandria)))
691 (native-inputs `(("fiveam" ,sbcl-fiveam)))
8662809d
AP
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)
0e1371be 752 (inputs `(("trivial-gray-streams" ,sbcl-trivial-gray-streams)))
3c55c780
AP
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)
0e1371be 782 (native-inputs `(("flexi-streams" ,sbcl-flexi-streams)))
5aa608a7
AP
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 795
ac259253
RW
796(define sbcl-cl-unicode-base
797 (let ((revision "1")
798 (commit "9fcd06fba1ddc9e66aed2f2d6c32dc9b764f03ea"))
799 (package
800 (name "sbcl-cl-unicode-base")
801 (version (string-append "0.1.5-" revision "." (string-take commit 7)))
802 (source (origin
803 (method git-fetch)
804 (uri (git-reference
805 (url "https://github.com/edicl/cl-unicode.git")
806 (commit commit)))
807 (file-name (string-append "cl-unicode-" version "-checkout"))
808 (sha256
809 (base32
810 "1jicprb5b3bv57dy1kg03572gxkcaqdjhak00426s76g0plmx5ki"))))
811 (build-system asdf-build-system/sbcl)
812 (arguments
813 '(#:asd-file "cl-unicode.asd"
814 #:asd-system-name "cl-unicode/base"))
815 (inputs
816 `(("cl-ppcre" ,sbcl-cl-ppcre)))
817 (home-page "http://weitz.de/cl-unicode/")
818 (synopsis "Portable Unicode library for Common Lisp")
819 (description "CL-UNICODE is a portable Unicode library Common Lisp, which
820is compatible with perl. It is pretty fast, thread-safe, and compatible with
821ANSI-compliant Common Lisp implementations.")
822 (license license:bsd-2))))
823
824(define-public sbcl-cl-unicode
825 (package
826 (inherit sbcl-cl-unicode-base)
827 (name "sbcl-cl-unicode")
828 (inputs
829 `(("cl-unicode/base" ,sbcl-cl-unicode-base)
830 ,@(package-inputs sbcl-cl-unicode-base)))
831 (native-inputs
832 `(("flexi-streams" ,sbcl-flexi-streams)))
833 (arguments '())))
834
835(define-public ecl-cl-unicode
836 (sbcl-package->ecl-package sbcl-cl-unicode))
837
838(define-public cl-unicode
839 (sbcl-package->cl-source-package sbcl-cl-unicode))
840
4b51b21c
AP
841(define-public sbcl-clx
842 (let ((revision "1")
843 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
844 (package
845 (name "sbcl-clx")
846 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
847 (source
848 (origin
849 (method git-fetch)
850 (uri
851 (git-reference
852 (url "https://github.com/sharplispers/clx.git")
853 (commit commit)))
854 (sha256
855 (base32 "0qffag03ns52kwq9xjns2qg1yr0bf3ba507iwq5cmx5xz0b0rmjm"))
856 (file-name (string-append "clx-" version "-checkout"))
857 (patches
858 (list
859 (search-patch "clx-remove-demo.patch")))
860 (modules '((guix build utils)))
861 (snippet
862 '(begin
863 ;; These removed files cause the compiled system to crash when
864 ;; loading.
865 (delete-file-recursively "demo")
866 (delete-file "test/trapezoid.lisp")
867 (substitute* "clx.asd"
868 (("\\(:file \"trapezoid\"\\)") ""))))))
869 (build-system asdf-build-system/sbcl)
4b51b21c
AP
870 (home-page "http://www.cliki.net/portable-clx")
871 (synopsis "X11 client library for Common Lisp")
872 (description "CLX is an X11 client library for Common Lisp. The code was
873originally taken from a CMUCL distribution, was modified somewhat in order to
874make it compile and run under SBCL, then a selection of patches were added
875from other CLXes around the net.")
876 (license license:x11))))
877
878(define-public cl-clx
879 (sbcl-package->cl-source-package sbcl-clx))
880
881(define-public ecl-clx
882 (sbcl-package->ecl-package sbcl-clx))
d075960f 883
b693aa6e
RW
884(define-public sbcl-cl-ppcre-unicode
885 (package (inherit sbcl-cl-ppcre)
886 (name "sbcl-cl-ppcre-unicode")
887 (arguments
888 `(#:tests? #f ; tests fail with "Component :CL-PPCRE-TEST not found"
889 #:asd-file "cl-ppcre-unicode.asd"))
890 (inputs
891 `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
892 ("sbcl-cl-unicode" ,sbcl-cl-unicode)))))
893
d075960f
AP
894(define-public sbcl-stumpwm
895 (package
896 (name "sbcl-stumpwm")
bdeecf56 897 (version "1.0.0")
d075960f
AP
898 (source (origin
899 (method url-fetch)
900 (uri (string-append
901 "https://github.com/stumpwm/stumpwm/archive/"
902 version ".tar.gz"))
903 (sha256
bdeecf56 904 (base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i"))
d075960f
AP
905 (file-name (string-append "stumpwm-" version ".tar.gz"))))
906 (build-system asdf-build-system/sbcl)
0e1371be
AP
907 (inputs `(("cl-ppcre" ,sbcl-cl-ppcre)
908 ("clx" ,sbcl-clx)))
290bf612 909 (outputs '("out" "lib"))
d075960f 910 (arguments
35189728 911 '(#:phases
d075960f
AP
912 (modify-phases %standard-phases
913 (add-after 'create-symlinks 'build-program
b4c9f0c5 914 (lambda* (#:key outputs #:allow-other-keys)
d075960f 915 (build-program
290bf612 916 (string-append (assoc-ref outputs "out") "/bin/stumpwm")
4209c31b 917 outputs
d075960f
AP
918 #:entry-program '((stumpwm:stumpwm) 0))))
919 (add-after 'build-program 'create-desktop-file
290bf612
AP
920 (lambda* (#:key outputs #:allow-other-keys)
921 (let* ((out (assoc-ref outputs "out"))
922 (xsessions (string-append out "/share/xsessions")))
923 (mkdir-p xsessions)
924 (call-with-output-file
925 (string-append xsessions "/stumpwm.desktop")
926 (lambda (file)
927 (format file
d075960f
AP
928 "[Desktop Entry]~@
929 Name=stumpwm~@
930 Comment=The Stump Window Manager~@
931 Exec=~a/bin/stumpwm~@
932 TryExec=~@*~a/bin/stumpwm~@
933 Icon=~@
934 Type=Application~%"
290bf612 935 out)))
d075960f
AP
936 #t))))))
937 (synopsis "Window manager written in Common Lisp")
938 (description "Stumpwm is a window manager written entirely in Common Lisp.
939It attempts to be highly customizable while relying entirely on the keyboard
940for input. These design decisions reflect the growing popularity of
941productive, customizable lisp based systems.")
7bf837fd 942 (home-page "https://github.com/stumpwm/stumpwm")
d075960f
AP
943 (license license:gpl2+)
944 (properties `((ecl-variant . ,(delay ecl-stumpwm))))))
945
946(define-public cl-stumpwm
947 (sbcl-package->cl-source-package sbcl-stumpwm))
948
949(define-public ecl-stumpwm
950 (let ((base (sbcl-package->ecl-package sbcl-stumpwm)))
951 (package
952 (inherit base)
953 (outputs '("out"))
954 (arguments '()))))
e3e171ee 955
75e8b3af
AP
956;; The slynk that users expect to install includes all of slynk's contrib
957;; modules. Therefore, we build the base module and all contribs first; then
958;; we expose the union of these as `sbcl-slynk'. The following variable
959;; describes the base module.
e3e171ee
AP
960(define sbcl-slynk-boot0
961 (let ((revision "1")
962 (commit "5706cd45d484a4f25795abe8e643509d31968aa2"))
963 (package
f56da605 964 (name "sbcl-slynk-boot0")
e3e171ee
AP
965 (version (string-append "1.0.0-beta-" revision "." (string-take commit 7)))
966 (source
967 (origin
968 (method git-fetch)
969 (uri
970 (git-reference
971 (url "https://github.com/joaotavora/sly.git")
972 (commit commit)))
973 (sha256
974 (base32 "0h4gg3sndl2bf6jdnx9nrf14p9hhi43hagrl0f4v4l11hczl8w81"))
975 (file-name (string-append "slynk-" version "-checkout"))
976 (modules '((guix build utils)
977 (ice-9 ftw)))
978 (snippet
979 '(begin
980 ;; Move the contribs into the main source directory for easier
981 ;; access
982 (substitute* "slynk/slynk.asd"
983 (("\\.\\./contrib")
984 "contrib")
985 (("\\(defsystem :slynk-util")
986 "(defsystem :slynk-util :depends-on (:slynk)"))
987 (substitute* "contrib/slynk-trace-dialog.lisp"
988 (("\\(slynk::reset-inspector\\)") ; Causes problems on load
989 "nil"))
990 (substitute* "contrib/slynk-profiler.lisp"
991 (("slynk:to-line")
992 "slynk-pprint-to-line"))
993 (rename-file "contrib" "slynk/contrib")
994 ;; Move slynk's contents into the base directory for easier
995 ;; access
996 (for-each
997 (lambda (file)
998 (unless (string-prefix? "." file)
999 (rename-file (string-append "slynk/" file)
1000 (string-append "./" (basename file)))))
1001 (scandir "slynk"))))))
1002 (build-system asdf-build-system/sbcl)
1003 (arguments
f56da605
AP
1004 `(#:tests? #f ; No test suite
1005 #:asd-system-name "slynk"))
e3e171ee 1006 (synopsis "Common Lisp IDE for Emacs")
14afc7b8
AP
1007 (description "SLY is a fork of SLIME, an IDE backend for Common Lisp.
1008It also features a completely redesigned REPL based on Emacs's own
1009full-featured comint.el, live code annotations, and a consistent interactive
1010button interface. Everything can be copied to the REPL. One can create
1011multiple inspectors with independent history.")
e3e171ee
AP
1012 (home-page "https://github.com/joaotavora/sly")
1013 (license license:public-domain)
1014 (properties `((cl-source-variant . ,(delay cl-slynk)))))))
1015
1016(define-public cl-slynk
f56da605
AP
1017 (package
1018 (inherit (sbcl-package->cl-source-package sbcl-slynk-boot0))
1019 (name "cl-slynk")))
e3e171ee
AP
1020
1021(define ecl-slynk-boot0
1022 (sbcl-package->ecl-package sbcl-slynk-boot0))
1023
1024(define sbcl-slynk-arglists
1025 (package
1026 (inherit sbcl-slynk-boot0)
1027 (name "sbcl-slynk-arglists")
0e1371be 1028 (inputs `(("slynk" ,sbcl-slynk-boot0)))
e3e171ee 1029 (arguments
f56da605
AP
1030 (substitute-keyword-arguments (package-arguments sbcl-slynk-boot0)
1031 ((#:asd-file _ "") "slynk.asd")
1032 ((#:asd-system-name _ #f) #f)))))
e3e171ee
AP
1033
1034(define ecl-slynk-arglists
1035 (sbcl-package->ecl-package sbcl-slynk-arglists))
1036
1037(define sbcl-slynk-util
1038 (package
1039 (inherit sbcl-slynk-arglists)
1040 (name "sbcl-slynk-util")))
1041
1042(define ecl-slynk-util
1043 (sbcl-package->ecl-package sbcl-slynk-util))
1044
1045(define sbcl-slynk-fancy-inspector
1046 (package
1047 (inherit sbcl-slynk-arglists)
1048 (name "sbcl-slynk-fancy-inspector")
0e1371be 1049 (inputs `(("slynk-util" ,sbcl-slynk-util)
e3e171ee
AP
1050 ,@(package-inputs sbcl-slynk-arglists)))))
1051
1052(define ecl-slynk-fancy-inspector
1053 (sbcl-package->ecl-package sbcl-slynk-fancy-inspector))
1054
1055(define sbcl-slynk-package-fu
1056 (package
1057 (inherit sbcl-slynk-arglists)
1058 (name "sbcl-slynk-package-fu")))
1059
1060(define ecl-slynk-package-fu
1061 (sbcl-package->ecl-package sbcl-slynk-package-fu))
1062
1063(define sbcl-slynk-mrepl
1064 (package
1065 (inherit sbcl-slynk-arglists)
1066 (name "sbcl-slynk-mrepl")))
1067
1068(define ecl-slynk-mrepl
1069 (sbcl-package->ecl-package sbcl-slynk-mrepl))
1070
1071(define sbcl-slynk-trace-dialog
1072 (package
1073 (inherit sbcl-slynk-arglists)
1074 (name "sbcl-slynk-trace-dialog")))
1075
1076(define ecl-slynk-trace-dialog
1077 (sbcl-package->ecl-package sbcl-slynk-trace-dialog))
1078
1079(define sbcl-slynk-profiler
1080 (package
1081 (inherit sbcl-slynk-arglists)
1082 (name "sbcl-slynk-profiler")))
1083
1084(define ecl-slynk-profiler
1085 (sbcl-package->ecl-package sbcl-slynk-profiler))
1086
1087(define sbcl-slynk-stickers
1088 (package
1089 (inherit sbcl-slynk-arglists)
1090 (name "sbcl-slynk-stickers")))
1091
1092(define ecl-slynk-stickers
1093 (sbcl-package->ecl-package sbcl-slynk-stickers))
1094
1095(define sbcl-slynk-indentation
1096 (package
1097 (inherit sbcl-slynk-arglists)
1098 (name "sbcl-slynk-indentation")))
1099
1100(define ecl-slynk-indentation
1101 (sbcl-package->ecl-package sbcl-slynk-indentation))
1102
1103(define sbcl-slynk-retro
1104 (package
1105 (inherit sbcl-slynk-arglists)
1106 (name "sbcl-slynk-retro")))
1107
1108(define ecl-slynk-retro
1109 (sbcl-package->ecl-package sbcl-slynk-retro))
1110
1111(define slynk-systems
1112 '("slynk"
1113 "slynk-util"
1114 "slynk-arglists"
1115 "slynk-fancy-inspector"
1116 "slynk-package-fu"
1117 "slynk-mrepl"
1118 "slynk-profiler"
1119 "slynk-trace-dialog"
1120 "slynk-stickers"
1121 "slynk-indentation"
1122 "slynk-retro"))
1123
1124(define-public sbcl-slynk
1125 (package
1126 (inherit sbcl-slynk-boot0)
f56da605 1127 (name "sbcl-slynk")
e3e171ee
AP
1128 (inputs
1129 `(("slynk" ,sbcl-slynk-boot0)
1130 ("slynk-util" ,sbcl-slynk-util)
1131 ("slynk-arglists" ,sbcl-slynk-arglists)
1132 ("slynk-fancy-inspector" ,sbcl-slynk-fancy-inspector)
1133 ("slynk-package-fu" ,sbcl-slynk-package-fu)
1134 ("slynk-mrepl" ,sbcl-slynk-mrepl)
1135 ("slynk-profiler" ,sbcl-slynk-profiler)
1136 ("slynk-trace-dialog" ,sbcl-slynk-trace-dialog)
1137 ("slynk-stickers" ,sbcl-slynk-stickers)
1138 ("slynk-indentation" ,sbcl-slynk-indentation)
1139 ("slynk-retro" ,sbcl-slynk-retro)))
1140 (native-inputs `(("sbcl" ,sbcl)))
1141 (build-system trivial-build-system)
1142 (source #f)
1143 (outputs '("out" "image"))
1144 (arguments
1145 `(#:modules ((guix build union)
1146 (guix build utils)
1147 (guix build lisp-utils))
1148 #:builder
1149 (begin
1150 (use-modules (ice-9 match)
1151 (srfi srfi-1)
1152 (guix build union)
1153 (guix build lisp-utils))
1154
1155 (union-build
1156 (assoc-ref %outputs "out")
1157 (filter-map
1158 (match-lambda
1159 ((name . path)
1160 (if (string-prefix? "slynk" name) path #f)))
1161 %build-inputs))
1162
1163 (prepend-to-source-registry
1164 (string-append (assoc-ref %outputs "out") "//"))
b4c9f0c5
AP
1165
1166 (parameterize ((%lisp-type "sbcl")
1167 (%lisp (string-append (assoc-ref %build-inputs "sbcl")
1168 "/bin/sbcl")))
1169 (build-image (string-append
1170 (assoc-ref %outputs "image")
1171 "/bin/slynk")
4209c31b 1172 %outputs
b4c9f0c5 1173 #:dependencies ',slynk-systems)))))))
e3e171ee
AP
1174
1175(define-public ecl-slynk
1176 (package
1177 (inherit sbcl-slynk)
1178 (name "ecl-slynk")
1179 (inputs
1180 (map (match-lambda
1181 ((name pkg . _)
1182 (list name (sbcl-package->ecl-package pkg))))
1183 (package-inputs sbcl-slynk)))
1184 (native-inputs '())
1185 (outputs '("out"))
1186 (arguments
1187 '(#:modules ((guix build union))
1188 #:builder
1189 (begin
1190 (use-modules (ice-9 match)
1191 (guix build union))
1192 (match %build-inputs
1193 (((names . paths) ...)
1194 (union-build (assoc-ref %outputs "out")
1195 paths))))))))
96784438
AP
1196
1197(define-public sbcl-stumpwm+slynk
1198 (package
1199 (inherit sbcl-stumpwm)
1200 (name "sbcl-stumpwm-with-slynk")
1201 (outputs '("out"))
4209c31b 1202 (inputs
290bf612 1203 `(("stumpwm" ,sbcl-stumpwm "lib")
96784438
AP
1204 ("slynk" ,sbcl-slynk)))
1205 (arguments
1206 (substitute-keyword-arguments (package-arguments sbcl-stumpwm)
1207 ((#:phases phases)
1208 `(modify-phases ,phases
1209 (replace 'build-program
4209c31b 1210 (lambda* (#:key inputs outputs #:allow-other-keys)
96784438
AP
1211 (let* ((out (assoc-ref outputs "out"))
1212 (program (string-append out "/bin/stumpwm")))
4209c31b 1213 (build-program program outputs
96784438
AP
1214 #:entry-program '((stumpwm:stumpwm) 0)
1215 #:dependencies '("stumpwm"
4209c31b
AP
1216 ,@slynk-systems)
1217 #:dependency-prefixes
1218 (map (lambda (input) (assoc-ref inputs input))
1219 '("stumpwm" "slynk")))
96784438
AP
1220 ;; Remove unneeded file.
1221 (delete-file (string-append out "/bin/stumpwm-exec.fasl"))
1222 #t)))
1223 (delete 'copy-source)
1224 (delete 'build)
1225 (delete 'check)
290bf612 1226 (delete 'create-asd-file)
96784438
AP
1227 (delete 'cleanup)
1228 (delete 'create-symlinks)))))))
d00c96d7
RW
1229
1230(define-public sbcl-parse-js
1231 (let ((commit "fbadc6029bec7039602abfc06c73bb52970998f6")
1232 (revision "1"))
1233 (package
1234 (name "sbcl-parse-js")
1235 (version (string-append "0.0.0-" revision "." (string-take commit 9)))
1236 (source
1237 (origin
1238 (method git-fetch)
1239 (uri (git-reference
1240 (url "http://marijn.haverbeke.nl/git/parse-js")
1241 (commit commit)))
1242 (file-name (string-append name "-" commit "-checkout"))
1243 (sha256
1244 (base32
1245 "1wddrnr5kiya5s3gp4cdq6crbfy9fqcz7fr44p81502sj3bvdv39"))))
1246 (build-system asdf-build-system/sbcl)
1247 (home-page "http://marijnhaverbeke.nl/parse-js/")
1248 (synopsis "Parse JavaScript")
1249 (description "Parse-js is a Common Lisp package for parsing
1250JavaScript (ECMAScript 3). It has basic support for ECMAScript 5.")
1251 (license license:zlib))))
d0eec99a
RW
1252
1253(define-public sbcl-parse-number
1254 (package
1255 (name "sbcl-parse-number")
1256 (version "1.5")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (string-append "https://github.com/sharplispers/parse-number/"
1261 "archive/v" version ".tar.gz"))
1262 (file-name (string-append name "-" version ".tar.gz"))
1263 (sha256
1264 (base32
1265 "1k6s4v65ksc1j5i0dprvzfvj213v6nah7i0rgd0726ngfjisj9ir"))))
1266 (build-system asdf-build-system/sbcl)
1267 (home-page "http://www.cliki.net/PARSE-NUMBER")
1268 (synopsis "Parse numbers")
1269 (description "@code{parse-number} is a library of functions for parsing
1270strings into one of the standard Common Lisp number types without using the
1271reader. @code{parse-number} accepts an arbitrary string and attempts to parse
1272the string into one of the standard Common Lisp number types, if possible, or
1273else @code{parse-number} signals an error of type @code{invalid-number}.")
1274 (license license:bsd-3)))
1275
476b583f
RW
1276(define-public sbcl-iterate
1277 (package
1278 (name "sbcl-iterate")
1279 ;; The latest official release (1.4.3) fails to build so we have to take
1280 ;; the current darcs tarball from quicklisp.
1281 (version "20160825")
1282 (source
1283 (origin
1284 (method url-fetch)
1285 (uri (string-append "http://beta.quicklisp.org/archive/iterate/"
1286 "2016-08-25/iterate-"
1287 version "-darcs.tgz"))
1288 (sha256
1289 (base32
1290 "0kvz16gnxnkdz0fy1x8y5yr28nfm7i2qpvix7mgwccdpjmsb4pgm"))))
1291 (build-system asdf-build-system/sbcl)
1292 (home-page "https://common-lisp.net/project/iterate/")
1293 (synopsis "Iteration construct for Common Lisp")
1294 (description "@code{iterate} is an iteration construct for Common Lisp.
1295It is similar to the @code{CL:LOOP} macro, with these distinguishing marks:
1296
1297@itemize
1298@item it is extensible,
1299@item it helps editors like Emacs indent iterate forms by having a more
1300 lisp-like syntax, and
1301@item it isn't part of the ANSI standard for Common Lisp.
1302@end itemize\n")
1303 (license license:expat)))
52650a4d
RW
1304
1305(define-public sbcl-cl-uglify-js
1306 ;; There have been many bug fixes since the 2010 release.
1307 (let ((commit "429c5e1d844e2f96b44db8fccc92d6e8e28afdd5")
1308 (revision "1"))
1309 (package
1310 (name "sbcl-cl-uglify-js")
1311 (version (string-append "0.1-" revision "." (string-take commit 9)))
1312 (source
1313 (origin
1314 (method git-fetch)
1315 (uri (git-reference
1316 (url "https://github.com/mishoo/cl-uglify-js.git")
1317 (commit commit)))
1318 (sha256
1319 (base32
1320 "0k39y3c93jgxpr7gwz7w0d8yknn1fdnxrjhd03057lvk5w8js27a"))))
1321 (build-system asdf-build-system/sbcl)
1322 (inputs
1323 `(("sbcl-parse-js" ,sbcl-parse-js)
1324 ("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
1325 ("sbcl-cl-ppcre-unicode" ,sbcl-cl-ppcre-unicode)
1326 ("sbcl-parse-number" ,sbcl-parse-number)
1327 ("sbcl-iterate" ,sbcl-iterate)))
1328 (home-page "https://github.com/mishoo/cl-uglify-js")
1329 (synopsis "JavaScript compressor library for Common Lisp")
1330 (description "This is a Common Lisp version of UglifyJS, a JavaScript
1331compressor. It works on data produced by @code{parse-js} to generate a
1332@dfn{minified} version of the code. Currently it can:
1333
1334@itemize
1335@item reduce variable names (usually to single letters)
1336@item join consecutive @code{var} statements
1337@item resolve simple binary expressions
1338@item group most consecutive statements using the ``sequence'' operator (comma)
1339@item remove unnecessary blocks
1340@item convert @code{IF} expressions in various ways that result in smaller code
1341@item remove some unreachable code
1342@end itemize\n")
1343 (license license:zlib))))