1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
6 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
7 ;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
26 (define-module (gnu packages lisp)
27 #:use-module (gnu packages)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (gnu packages readline)
31 #:use-module (gnu packages texinfo)
32 #:use-module (gnu packages tex)
33 #:use-module (gnu packages m4)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system asdf)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages maths)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages bdw-gc)
46 #:use-module (gnu packages libffi)
47 #:use-module (gnu packages libffcall)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages sdl)
50 #:use-module (gnu packages libsigsegv)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages admin)
53 #:use-module (gnu packages ed)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages m4)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages version-control)
61 #:use-module (gnu packages xorg)
62 #:use-module (ice-9 match)
63 #:use-module (srfi srfi-1))
65 (define (asdf-substitutions lisp)
66 ;; Prepend XDG_DATA_DIRS/LISP-bundle-systems to ASDF's
67 ;; 'default-system-source-registry'.
68 `((("\\(,dir \"systems/\"\\)\\)")
70 "(,dir \"~a-bundle-systems\")))
72 ,@(loop :for dir :in (xdg-data-dirs \"common-lisp/\")
73 :collect `(:directory (,dir \"systems\"))"
83 (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
85 (base32 "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f"))))
86 (build-system gnu-build-system)
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
91 #:phases (modify-phases %standard-phases
92 (add-before 'configure 'pre-conf
96 '("pcl/impl/kcl/makefile.akcl"
98 "unixport/makefile.dos"
100 "gcl-tk/makefile.prev"
102 (find-files "h" "\\.defs"))
104 (string-append "SHELL=" (which "bash")))
106 (string-append "SHELL=" (which "sh"))))
108 ;; drop strip phase to make maxima build, see
109 ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
113 ("readline" ,readline)))
118 ("texlive" ,texlive)))
119 (home-page "https://www.gnu.org/software/gcl/")
120 (synopsis "A Common Lisp implementation")
121 (description "GCL is an implementation of the Common Lisp language. It
122 features the ability to compile to native object code and to load native
123 object code modules directly into its lisp core. It also features a
124 stratified garbage collection strategy, a source-level debugger and a built-in
125 interface to the Tk widget system.")
126 (license license:lgpl2.0+)))
136 "https://common-lisp.net/project/ecl/static/files/release/"
137 name "-" version ".tgz"))
139 (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))
140 (modules '((guix build utils)))
142 ;; Add ecl-bundle-systems to 'default-system-source-registry'.
143 `(substitute* "contrib/asdf/asdf.lisp"
144 ,@(asdf-substitutions name)))))
145 (build-system gnu-build-system)
146 ;; src/configure uses 'which' to confirm the existence of 'gzip'.
147 (native-inputs `(("which" ,which)))
148 (inputs `(("gmp" ,gmp)
149 ("libatomic-ops" ,libatomic-ops)
156 (modify-phases %standard-phases
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)
163 (assoc-ref inputs lib) path)))
164 (libraries '("gmp" "libatomic-ops" "libgc" "libffi" "libc"))
165 (binaries '("gcc" "ld-wrapper" "binutils"))
167 (map (lambda (lib) (input-path lib "/lib"))
170 (wrap-program (string-append ecl "/bin/ecl")
172 ,(map (lambda (binary)
173 (input-path binary "/bin"))
177 (input-path lib "/include"))
178 `("kernel-headers" ,@libraries)))
179 `("LIBRARY_PATH" suffix ,library-directories)
180 `("LD_LIBRARY_PATH" suffix ,library-directories)))))
181 (add-after 'wrap 'check (assoc-ref %standard-phases 'check))
182 (add-before 'check 'fix-path-to-ecl
184 (substitute* "build/tests/Makefile"
185 (("\\$\\{exec_prefix\\}/") ""))
188 (list (search-path-specification
189 (variable "XDG_DATA_DIRS")
190 (files '("share")))))
191 (home-page "http://ecls.sourceforge.net/")
192 (synopsis "Embeddable Common Lisp")
193 (description "ECL is an implementation of the Common Lisp language as
194 defined by the ANSI X3J13 specification. Its most relevant features are: a
195 bytecode compiler and interpreter, being able to compile Common Lisp with any
196 C/C++ compiler, being able to build standalone executables and libraries, and
197 supporting 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+)))
210 (uri (string-append "mirror://gnu/clisp/release/" version
211 "/clisp-" version ".tar.gz"))
213 (base32 "0rp82nqp5362isl9i34rwgg04cidz7izljd9d85pqcw1qr964bxx"))))
214 (build-system gnu-build-system)
215 (inputs `(("libffcall" ,libffcall)
216 ("readline" ,readline-6.2)
217 ("libsigsegv" ,libsigsegv)))
219 '(;; XXX The custom configure script does not cope well when passed
220 ;; --build=<triplet>.
223 (modify-phases %standard-phases
224 (add-after 'unpack 'patch-sh-and-pwd
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")
233 (substitute* '("src/clisp-link.in")
234 (("/bin/pwd") "pwd"))
236 (add-after 'unpack 'remove-timestamps
238 (substitute* "src/constobj.d"
239 (("__DATE__ __TIME__") "\"1\""))
241 (add-before 'build 'chdir-to-source
243 ;; We are supposed to call make under the src sub-directory.
246 ;; Makefiles seem to have race conditions.
247 #:parallel-build? #f))
248 (home-page "http://www.clisp.org/")
249 (synopsis "A Common Lisp implementation")
251 "GNU CLISP is an implementation of ANSI Common Lisp. Common Lisp is a
252 high-level, object-oriented functional programming language. CLISP includes
253 an interpreter, a compiler, a debugger, and much more.")
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+)))
266 (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
267 version "-source.tar.bz2"))
269 (base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5"))
270 (modules '((guix build utils)))
272 ;; Add sbcl-bundle-systems to 'default-system-source-registry'.
273 `(substitute* "contrib/asdf/asdf.lisp"
274 ,@(asdf-substitutions name)))))
275 (build-system gnu-build-system)
276 (outputs '("out" "doc"))
277 ;; Bootstrap with CLISP.
281 ("inetutils" ,inetutils) ;for hostname(1)
284 ("texinfo" ,texinfo)))
286 '(#:modules ((guix build gnu-build-system)
290 (modify-phases %standard-phases
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))
304 ;; The removed file is utf-16-be encoded, which gives substitute*
305 ;; trouble. It does not contain references to the listed programs.
307 "./tests/data/compile-file-pos-utf16be.lisp"
308 (find-files "." "\\.(lisp|sh)$"))
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))))))
339 (lambda* (#:key outputs #:allow-other-keys)
341 (zero? (system* "sh" "make.sh" "clisp"
342 (string-append "--prefix="
343 (assoc-ref outputs "out"))))))
346 (zero? (system* "sh" "install.sh"))))
347 (add-after 'build 'build-doc
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")
362 (delete-file-recursively old-doc-dir)
364 ;; No 'check' target, though "make.sh" (build phase) runs tests.
367 (list (search-path-specification
368 (variable "XDG_DATA_DIRS")
369 (files '("share")))))
370 (home-page "http://www.sbcl.org/")
371 (synopsis "Common Lisp implementation")
372 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
373 Lisp compiler. In addition to the compiler and runtime system for ANSI Common
374 Lisp, it provides an interactive environment including a debugger, a
375 statistical 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")))))
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.
397 "ftp://ftp.clozure.com/pub/release/" version
399 (match (%current-system)
400 ((or "i686-linux" "x86_64-linux") "linuxx86")
401 ("armhf-linux" "linuxarm")
402 ;; Prevent errors when querying this package on unsupported
403 ;; platforms, e.g. when running "guix package --search="
408 (match (%current-system)
409 ((or "i686-linux" "x86_64-linux")
410 "0w3dmj7q9kqyra3yrf1lxclnjz151yvf5s5q8ayllvmvqbl8bs08")
412 "1x487aaz2rqcb6k301sy2p39a1m4qdhg6z9p9fb76ssipqgr38b4")
416 ("subversion" ,subversion)))
418 `(#:tests? #f ;no 'check' target
419 #:modules ((srfi srfi-26)
421 (guix build gnu-build-system))
425 (lambda* (#:key inputs #:allow-other-keys)
426 (and (zero? (system* "tar" "xzvf" (assoc-ref inputs "ccl")))
427 (begin (chdir "ccl") #t)))
432 ;; Enter the source directory for the current platform's lisp
433 ;; kernel, and run 'make clean' to remove the precompiled one.
435 (chdir (string-append
437 ,(match (or (%current-target-system) (%current-system))
438 ("i686-linux" "linuxx8632")
439 ("x86_64-linux" "linuxx8664")
440 ("armhf-linux" "linuxarm")
441 ;; Prevent errors when querying this package
442 ;; on unsupported platforms, e.g. when running
443 ;; "guix package --search="
445 (substitute* '("Makefile")
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.
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.
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"))
464 ,(match (or (%current-target-system) (%current-system))
465 ("i686-linux" "lx86cl")
466 ("x86_64-linux" "lx86cl64")
467 ("armhf-linux" "armcl")
468 ;; Prevent errors when querying this package
469 ;; on unsupported platforms, e.g. when running
470 ;; "guix package --search="
472 (heap (string-append kernel ".image")))
473 (install-file kernel libdir)
474 (install-file heap libdir)
476 (let ((dirs '("lib" "library" "examples" "contrib"
477 "tools" "objc-bridge")))
478 (for-each copy-recursively
480 (map (cut string-append libdir <>) dirs)))
483 (with-output-to-file wrapper
487 "#!" bash "/bin/sh\n"
488 "CCL_DEFAULT_DIRECTORY=" libdir "\n"
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
497 implementation featuring fast compilation speed, native threads, a precise,
498 generational, compacting garbage collector, and a convenient foreign-function
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
505 (define-public femtolisp
506 (let ((commit "68c5b1225572ecf2c52baf62f928063e5a30511b")
510 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
514 (url "https://github.com/JeffBezanson/femtolisp.git")
516 (file-name (string-append name "-" version "-checkout"))
519 "04rnwllxnl86zw8c6pwxznn49bvkvh0f1lfliy085vjzvlq3rgja"))))
520 ;; See "utils.h" for supported systems. Upstream bug:
521 ;; https://github.com/JeffBezanson/femtolisp/issues/25
523 (fold delete %supported-systems
524 '("armhf-linux" "mips64el-linux" "aarch64-linux")))
525 (build-system gnu-build-system)
527 `(#:make-flags '("CC=gcc" "release")
530 (modify-phases %standard-phases
531 (delete 'configure) ; No configure script
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)
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")))
545 (zero? (system* "./bootstrap.sh"))
546 (install-file "flisp.boot" bin))))))))
547 (synopsis "Scheme-like lisp implementation")
549 "@code{femtolisp} is a scheme-like lisp implementation with a
550 simple, elegant Scheme dialect. It is a lisp-1 with lexical scope.
551 The core is 12 builtin special forms and 33 builtin functions.")
552 (home-page "https://github.com/JeffBezanson/femtolisp")
553 (license license:bsd-3))))
562 (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
564 (modules '((guix build utils)))
567 (substitute* "src/unix.c"
568 (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
569 (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
570 (substitute* "src/main.c"
571 (("\" \\(built \" __DATE__ \"\\)\"") ""))))
574 "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
575 (build-system gnu-build-system)
577 `(;; We have to add these LIBS so that they are found.
578 #:configure-flags (list "LIBS=-lz"
579 "X_EXTRA_LIBS=-lfontconfig"
581 #:tests? #f)) ; No make check.
582 (native-inputs `(("intltool" ,intltool)))
584 `(("alsa-lib" ,alsa-lib)
586 ("sdl-image" ,sdl-image)
587 ("sdl-mixer" ,sdl-mixer)
592 ("fontconfig" ,fontconfig)
594 ("openblas" ,openblas)
597 ("mesa-utils" ,mesa-utils)
598 ("binutils" ,binutils)
599 ("libiberty" ,libiberty)
600 ("readline" ,readline)
602 ("gettext-minimal" ,gettext-minimal)))
603 (synopsis "Lisp Universal Shell")
605 "Lush is an object-oriented Lisp interpreter/compiler with features
606 designed to please people who want to prototype large numerical
607 applications. Lush includes an extensive library of
608 vector/matrix/tensor manipulation, numerous numerical libraries
609 (including GSL, LAPACK, and BLAS), a set of graphic functions, a
610 simple GUI toolkit, and interfaces to various graphic and multimedia
611 libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
612 grabbing), and others. Lush is an ideal frontend script language for
613 programming projects written in C or other languages. Lush also has
614 libraries for Machine Learning, Neural Nets and statistical estimation.")
615 (home-page "http://lush.sourceforge.net/")
616 (license license:lgpl2.1+)))
618 (define-public sbcl-alexandria
620 (commit "926a066611b7b11cb71e26c827a271e500888c30"))
622 (name "sbcl-alexandria")
623 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
628 (url "https://gitlab.common-lisp.net/alexandria/alexandria.git")
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")
637 "Alexandria is a collection of portable utilities. It does not contain
638 conceptual extensions to Common Lisp. It is conservative in scope, and
639 portable between implementations.")
640 (home-page "https://common-lisp.net/project/alexandria/")
641 (license license:public-domain))))
643 (define-public cl-alexandria
644 (sbcl-package->cl-source-package sbcl-alexandria))
646 (define-public ecl-alexandria
647 (sbcl-package->ecl-package sbcl-alexandria))
649 (define-public sbcl-fiveam
657 "https://github.com/sionescu/fiveam/archive/v"
660 (base32 "0f48pcbhqs3wwwzjl5nk57d4hcbib4l9xblxc66b8c2fhvhmhxnv"))
661 (file-name (string-append "fiveam-" version ".tar.gz"))))
662 (inputs `(("alexandria" ,sbcl-alexandria)))
663 (build-system asdf-build-system/sbcl)
664 (synopsis "Common Lisp testing framework")
665 (description "FiveAM is a simple (as far as writing and running tests
666 goes) regression testing framework. It has been designed with Common Lisp's
667 interactive development model in mind.")
668 (home-page "https://common-lisp.net/project/fiveam/")
669 (license license:bsd-3)))
671 (define-public cl-fiveam
672 (sbcl-package->cl-source-package sbcl-fiveam))
674 (define-public ecl-fiveam
675 (sbcl-package->ecl-package sbcl-fiveam))
677 (define-public sbcl-bordeaux-threads
679 (name "sbcl-bordeaux-threads")
684 "https://github.com/sionescu/bordeaux-threads/archive/v"
687 (base32 "10ryrcx832fwqdawb6jmknymi7wpdzhi30qzx7cbrk0cpnka71w2"))
689 (string-append "bordeaux-threads-" version ".tar.gz"))))
690 (inputs `(("alexandria" ,sbcl-alexandria)))
691 (native-inputs `(("fiveam" ,sbcl-fiveam)))
692 (build-system asdf-build-system/sbcl)
693 (synopsis "Portable shared-state concurrency library for Common Lisp")
694 (description "BORDEAUX-THREADS is a proposed standard for a minimal
695 MP/Threading interface. It is similar to the CLIM-SYS threading and lock
697 (home-page "https://common-lisp.net/project/bordeaux-threads/")
698 (license license:x11)))
700 (define-public cl-bordeaux-threads
701 (sbcl-package->cl-source-package sbcl-bordeaux-threads))
703 (define-public ecl-bordeaux-threads
704 (sbcl-package->ecl-package sbcl-bordeaux-threads))
706 (define-public sbcl-trivial-gray-streams
708 (commit "0483ade330508b4b2edeabdb47d16ec9437ee1cb"))
710 (name "sbcl-trivial-gray-streams")
711 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
717 (url "https://github.com/trivial-gray-streams/trivial-gray-streams.git")
720 (base32 "0m3rpf2x0zmdk3nf1qfa01j6a55vj7gkwhyw78qslcgbjlgh8p4d"))
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
726 ANSI CL by David N. Gray. The proposal did not make it into ANSI CL, but most
727 popular CL implementations implement it. This package provides an extremely
728 thin compatibility layer for gray streams.")
729 (home-page "http://www.cliki.net/trivial-gray-streams")
730 (license license:x11))))
732 (define-public cl-trivial-gray-streams
733 (sbcl-package->cl-source-package sbcl-trivial-gray-streams))
735 (define-public ecl-trivial-gray-streams
736 (sbcl-package->ecl-package sbcl-trivial-gray-streams))
738 (define-public sbcl-flexi-streams
740 (name "sbcl-flexi-streams")
746 "https://github.com/edicl/flexi-streams/archive/v"
749 (base32 "16grnxvs7vqm5s6myf8a5s7vwblzq1kgwj8i7ahz8vwvihm9gzfi"))
750 (file-name (string-append "flexi-streams-" version ".tar.gz"))))
751 (build-system asdf-build-system/sbcl)
752 (inputs `(("trivial-gray-streams" ,sbcl-trivial-gray-streams)))
753 (synopsis "Implementation of virtual bivalent streams for Common Lisp")
754 (description "Flexi-streams is an implementation of \"virtual\" bivalent
755 streams that can be layered atop real binary or bivalent streams and that can
756 be used to read and write character data in various single- or multi-octet
757 encodings which can be changed on the fly. It also supplies in-memory binary
758 streams which are similar to string streams.")
759 (home-page "http://weitz.de/flexi-streams/")
760 (license license:bsd-3)))
762 (define-public cl-flexi-streams
763 (sbcl-package->cl-source-package sbcl-flexi-streams))
765 (define-public ecl-flexi-streams
766 (sbcl-package->ecl-package sbcl-flexi-streams))
768 (define-public sbcl-cl-ppcre
770 (name "sbcl-cl-ppcre")
776 "https://github.com/edicl/cl-ppcre/archive/v"
779 (base32 "1i7daxf0wnydb0pgwiym7qh2wy70n14lxd6dyv28sy0naa8p31gd"))
780 (file-name (string-append "cl-ppcre-" version ".tar.gz"))))
781 (build-system asdf-build-system/sbcl)
782 (native-inputs `(("flexi-streams" ,sbcl-flexi-streams)))
783 (synopsis "Portable regular expression library for Common Lisp")
784 (description "CL-PPCRE is a portable regular expression library for Common
785 Lisp, which is compatible with perl. It is pretty fast, thread-safe, and
786 compatible with ANSI-compliant Common Lisp implementations.")
787 (home-page "http://weitz.de/cl-ppcre/")
788 (license license:bsd-2)))
790 (define-public cl-ppcre
791 (sbcl-package->cl-source-package sbcl-cl-ppcre))
793 (define-public ecl-cl-ppcre
794 (sbcl-package->ecl-package sbcl-cl-ppcre))
796 (define sbcl-cl-unicode-base
798 (commit "9fcd06fba1ddc9e66aed2f2d6c32dc9b764f03ea"))
800 (name "sbcl-cl-unicode-base")
801 (version (string-append "0.1.5-" revision "." (string-take commit 7)))
805 (url "https://github.com/edicl/cl-unicode.git")
807 (file-name (string-append "cl-unicode-" version "-checkout"))
810 "1jicprb5b3bv57dy1kg03572gxkcaqdjhak00426s76g0plmx5ki"))))
811 (build-system asdf-build-system/sbcl)
813 '(#:asd-file "cl-unicode.asd"
814 #:asd-system-name "cl-unicode/base"))
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
820 is compatible with perl. It is pretty fast, thread-safe, and compatible with
821 ANSI-compliant Common Lisp implementations.")
822 (license license:bsd-2))))
824 (define-public sbcl-cl-unicode
826 (inherit sbcl-cl-unicode-base)
827 (name "sbcl-cl-unicode")
829 `(("cl-unicode/base" ,sbcl-cl-unicode-base)
830 ,@(package-inputs sbcl-cl-unicode-base)))
832 `(("flexi-streams" ,sbcl-flexi-streams)))
835 (define-public ecl-cl-unicode
836 (sbcl-package->ecl-package sbcl-cl-unicode))
838 (define-public cl-unicode
839 (sbcl-package->cl-source-package sbcl-cl-unicode))
841 (define-public sbcl-clx
843 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
846 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
852 (url "https://github.com/sharplispers/clx.git")
855 (base32 "0qffag03ns52kwq9xjns2qg1yr0bf3ba507iwq5cmx5xz0b0rmjm"))
856 (file-name (string-append "clx-" version "-checkout"))
859 (search-patch "clx-remove-demo.patch")))
860 (modules '((guix build utils)))
863 ;; These removed files cause the compiled system to crash when
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)
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
873 originally taken from a CMUCL distribution, was modified somewhat in order to
874 make it compile and run under SBCL, then a selection of patches were added
875 from other CLXes around the net.")
876 (license license:x11))))
878 (define-public cl-clx
879 (sbcl-package->cl-source-package sbcl-clx))
881 (define-public ecl-clx
882 (sbcl-package->ecl-package sbcl-clx))
884 (define-public sbcl-cl-ppcre-unicode
885 (package (inherit sbcl-cl-ppcre)
886 (name "sbcl-cl-ppcre-unicode")
888 `(#:tests? #f ; tests fail with "Component :CL-PPCRE-TEST not found"
889 #:asd-file "cl-ppcre-unicode.asd"))
891 `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
892 ("sbcl-cl-unicode" ,sbcl-cl-unicode)))))
894 (define-public sbcl-stumpwm
896 (name "sbcl-stumpwm")
901 "https://github.com/stumpwm/stumpwm/archive/"
904 (base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i"))
905 (file-name (string-append "stumpwm-" version ".tar.gz"))))
906 (build-system asdf-build-system/sbcl)
907 (inputs `(("cl-ppcre" ,sbcl-cl-ppcre)
909 (outputs '("out" "lib"))
912 (modify-phases %standard-phases
913 (add-after 'create-symlinks 'build-program
914 (lambda* (#:key outputs #:allow-other-keys)
916 (string-append (assoc-ref outputs "out") "/bin/stumpwm")
918 #:entry-program '((stumpwm:stumpwm) 0))))
919 (add-after 'build-program 'create-desktop-file
920 (lambda* (#:key outputs #:allow-other-keys)
921 (let* ((out (assoc-ref outputs "out"))
922 (xsessions (string-append out "/share/xsessions")))
924 (call-with-output-file
925 (string-append xsessions "/stumpwm.desktop")
930 Comment=The Stump Window Manager~@
931 Exec=~a/bin/stumpwm~@
932 TryExec=~@*~a/bin/stumpwm~@
937 (synopsis "Window manager written in Common Lisp")
938 (description "Stumpwm is a window manager written entirely in Common Lisp.
939 It attempts to be highly customizable while relying entirely on the keyboard
940 for input. These design decisions reflect the growing popularity of
941 productive, customizable lisp based systems.")
942 (home-page "https://github.com/stumpwm/stumpwm")
943 (license license:gpl2+)
944 (properties `((ecl-variant . ,(delay ecl-stumpwm))))))
946 (define-public cl-stumpwm
947 (sbcl-package->cl-source-package sbcl-stumpwm))
949 (define-public ecl-stumpwm
950 (let ((base (sbcl-package->ecl-package sbcl-stumpwm)))
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.
960 (define sbcl-slynk-boot0
962 (commit "5706cd45d484a4f25795abe8e643509d31968aa2"))
964 (name "sbcl-slynk-boot0")
965 (version (string-append "1.0.0-beta-" revision "." (string-take commit 7)))
971 (url "https://github.com/joaotavora/sly.git")
974 (base32 "0h4gg3sndl2bf6jdnx9nrf14p9hhi43hagrl0f4v4l11hczl8w81"))
975 (file-name (string-append "slynk-" version "-checkout"))
976 (modules '((guix build utils)
980 ;; Move the contribs into the main source directory for easier
982 (substitute* "slynk/slynk.asd"
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
990 (substitute* "contrib/slynk-profiler.lisp"
992 "slynk-pprint-to-line"))
993 (rename-file "contrib" "slynk/contrib")
994 ;; Move slynk's contents into the base directory for easier
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)
1004 `(#:tests? #f ; No test suite
1005 #:asd-system-name "slynk"))
1006 (synopsis "Common Lisp IDE for Emacs")
1007 (description "SLY is a fork of SLIME, an IDE backend for Common Lisp.
1008 It also features a completely redesigned REPL based on Emacs's own
1009 full-featured comint.el, live code annotations, and a consistent interactive
1010 button interface. Everything can be copied to the REPL. One can create
1011 multiple inspectors with independent history.")
1012 (home-page "https://github.com/joaotavora/sly")
1013 (license license:public-domain)
1014 (properties `((cl-source-variant . ,(delay cl-slynk)))))))
1016 (define-public cl-slynk
1018 (inherit (sbcl-package->cl-source-package sbcl-slynk-boot0))
1021 (define ecl-slynk-boot0
1022 (sbcl-package->ecl-package sbcl-slynk-boot0))
1024 (define sbcl-slynk-arglists
1026 (inherit sbcl-slynk-boot0)
1027 (name "sbcl-slynk-arglists")
1028 (inputs `(("slynk" ,sbcl-slynk-boot0)))
1030 (substitute-keyword-arguments (package-arguments sbcl-slynk-boot0)
1031 ((#:asd-file _ "") "slynk.asd")
1032 ((#:asd-system-name _ #f) #f)))))
1034 (define ecl-slynk-arglists
1035 (sbcl-package->ecl-package sbcl-slynk-arglists))
1037 (define sbcl-slynk-util
1039 (inherit sbcl-slynk-arglists)
1040 (name "sbcl-slynk-util")))
1042 (define ecl-slynk-util
1043 (sbcl-package->ecl-package sbcl-slynk-util))
1045 (define sbcl-slynk-fancy-inspector
1047 (inherit sbcl-slynk-arglists)
1048 (name "sbcl-slynk-fancy-inspector")
1049 (inputs `(("slynk-util" ,sbcl-slynk-util)
1050 ,@(package-inputs sbcl-slynk-arglists)))))
1052 (define ecl-slynk-fancy-inspector
1053 (sbcl-package->ecl-package sbcl-slynk-fancy-inspector))
1055 (define sbcl-slynk-package-fu
1057 (inherit sbcl-slynk-arglists)
1058 (name "sbcl-slynk-package-fu")))
1060 (define ecl-slynk-package-fu
1061 (sbcl-package->ecl-package sbcl-slynk-package-fu))
1063 (define sbcl-slynk-mrepl
1065 (inherit sbcl-slynk-arglists)
1066 (name "sbcl-slynk-mrepl")))
1068 (define ecl-slynk-mrepl
1069 (sbcl-package->ecl-package sbcl-slynk-mrepl))
1071 (define sbcl-slynk-trace-dialog
1073 (inherit sbcl-slynk-arglists)
1074 (name "sbcl-slynk-trace-dialog")))
1076 (define ecl-slynk-trace-dialog
1077 (sbcl-package->ecl-package sbcl-slynk-trace-dialog))
1079 (define sbcl-slynk-profiler
1081 (inherit sbcl-slynk-arglists)
1082 (name "sbcl-slynk-profiler")))
1084 (define ecl-slynk-profiler
1085 (sbcl-package->ecl-package sbcl-slynk-profiler))
1087 (define sbcl-slynk-stickers
1089 (inherit sbcl-slynk-arglists)
1090 (name "sbcl-slynk-stickers")))
1092 (define ecl-slynk-stickers
1093 (sbcl-package->ecl-package sbcl-slynk-stickers))
1095 (define sbcl-slynk-indentation
1097 (inherit sbcl-slynk-arglists)
1098 (name "sbcl-slynk-indentation")))
1100 (define ecl-slynk-indentation
1101 (sbcl-package->ecl-package sbcl-slynk-indentation))
1103 (define sbcl-slynk-retro
1105 (inherit sbcl-slynk-arglists)
1106 (name "sbcl-slynk-retro")))
1108 (define ecl-slynk-retro
1109 (sbcl-package->ecl-package sbcl-slynk-retro))
1111 (define slynk-systems
1115 "slynk-fancy-inspector"
1119 "slynk-trace-dialog"
1124 (define-public sbcl-slynk
1126 (inherit sbcl-slynk-boot0)
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)
1143 (outputs '("out" "image"))
1145 `(#:modules ((guix build union)
1147 (guix build lisp-utils))
1150 (use-modules (ice-9 match)
1153 (guix build lisp-utils))
1156 (assoc-ref %outputs "out")
1160 (if (string-prefix? "slynk" name) path #f)))
1163 (prepend-to-source-registry
1164 (string-append (assoc-ref %outputs "out") "//"))
1166 (parameterize ((%lisp-type "sbcl")
1167 (%lisp (string-append (assoc-ref %build-inputs "sbcl")
1169 (build-image (string-append
1170 (assoc-ref %outputs "image")
1173 #:dependencies ',slynk-systems)))))))
1175 (define-public ecl-slynk
1177 (inherit sbcl-slynk)
1182 (list name (sbcl-package->ecl-package pkg))))
1183 (package-inputs sbcl-slynk)))
1187 '(#:modules ((guix build union))
1190 (use-modules (ice-9 match)
1192 (match %build-inputs
1193 (((names . paths) ...)
1194 (union-build (assoc-ref %outputs "out")
1197 (define-public sbcl-stumpwm+slynk
1199 (inherit sbcl-stumpwm)
1200 (name "sbcl-stumpwm-with-slynk")
1203 `(("stumpwm" ,sbcl-stumpwm "lib")
1204 ("slynk" ,sbcl-slynk)))
1206 (substitute-keyword-arguments (package-arguments sbcl-stumpwm)
1208 `(modify-phases ,phases
1209 (replace 'build-program
1210 (lambda* (#:key inputs outputs #:allow-other-keys)
1211 (let* ((out (assoc-ref outputs "out"))
1212 (program (string-append out "/bin/stumpwm")))
1213 (build-program program outputs
1214 #:entry-program '((stumpwm:stumpwm) 0)
1215 #:dependencies '("stumpwm"
1217 #:dependency-prefixes
1218 (map (lambda (input) (assoc-ref inputs input))
1219 '("stumpwm" "slynk")))
1220 ;; Remove unneeded file.
1221 (delete-file (string-append out "/bin/stumpwm-exec.fasl"))
1223 (delete 'copy-source)
1226 (delete 'create-asd-file)
1228 (delete 'create-symlinks)))))))
1230 (define-public sbcl-parse-js
1231 (let ((commit "fbadc6029bec7039602abfc06c73bb52970998f6")
1234 (name "sbcl-parse-js")
1235 (version (string-append "0.0.0-" revision "." (string-take commit 9)))
1240 (url "http://marijn.haverbeke.nl/git/parse-js")
1242 (file-name (string-append name "-" commit "-checkout"))
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
1250 JavaScript (ECMAScript 3). It has basic support for ECMAScript 5.")
1251 (license license:zlib))))
1253 (define-public sbcl-parse-number
1255 (name "sbcl-parse-number")
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"))
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
1270 strings into one of the standard Common Lisp number types without using the
1271 reader. @code{parse-number} accepts an arbitrary string and attempts to parse
1272 the string into one of the standard Common Lisp number types, if possible, or
1273 else @code{parse-number} signals an error of type @code{invalid-number}.")
1274 (license license:bsd-3)))
1276 (define-public sbcl-iterate
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")
1285 (uri (string-append "http://beta.quicklisp.org/archive/iterate/"
1286 "2016-08-25/iterate-"
1287 version "-darcs.tgz"))
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.
1295 It is similar to the @code{CL:LOOP} macro, with these distinguishing marks:
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.
1303 (license license:expat)))