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 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
25 (define-module (gnu packages lisp)
26 #:use-module (gnu packages)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (gnu packages readline)
30 #:use-module (gnu packages texinfo)
31 #:use-module (gnu packages tex)
32 #:use-module (gnu packages m4)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system asdf)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages maths)
43 #:use-module (gnu packages multiprecision)
44 #:use-module (gnu packages bdw-gc)
45 #:use-module (gnu packages libffi)
46 #:use-module (gnu packages libffcall)
47 #:use-module (gnu packages readline)
48 #:use-module (gnu packages sdl)
49 #:use-module (gnu packages libsigsegv)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages admin)
52 #:use-module (gnu packages ed)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages m4)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages version-control)
60 #:use-module (gnu packages xorg)
61 #:use-module (ice-9 match)
62 #:use-module (srfi srfi-1))
64 (define (asdf-substitutions lisp)
65 ;; Prepend XDG_DATA_DIRS/LISP-bundle-systems to ASDF's
66 ;; 'default-system-source-registry'.
67 `((("\\(,dir \"systems/\"\\)\\)")
69 "(,dir \"~a-bundle-systems\")))
71 ,@(loop :for dir :in (xdg-data-dirs \"common-lisp/\")
72 :collect `(:directory (,dir \"systems\"))"
82 (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
84 (base32 "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f"))))
85 (build-system gnu-build-system)
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
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"
97 (("rl_attempted_completion_function = \
98 \\(CPPFunction \\*\\)rl_completion;")
99 "rl_attempted_completion_function = rl_completion;"))
102 '("pcl/impl/kcl/makefile.akcl"
104 "unixport/makefile.dos"
106 "gcl-tk/makefile.prev"
108 (find-files "h" "\\.defs"))
109 (("SHELL=/bin/(ba)?sh")
110 (string-append "SHELL=" (which "bash")))))
111 ;; drop strip phase to make maxima build, see
112 ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
117 ("readline" ,readline)
119 ("texlive" ,texlive)))
120 (home-page "https://www.gnu.org/software/gcl/")
121 (synopsis "A Common Lisp implementation")
122 (description "GCL is an implementation of the Common Lisp language. It
123 features the ability to compile to native object code and to load native
124 object code modules directly into its lisp core. It also features a
125 stratified garbage collection strategy, a source-level debugger and a built-in
126 interface to the Tk widget system.")
127 (license license:lgpl2.0+)))
137 "https://common-lisp.net/project/ecl/static/files/release/"
138 name "-" version ".tgz"))
140 (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))
141 (modules '((guix build utils)))
143 ;; Add ecl-bundle-systems to 'default-system-source-registry'.
144 `(substitute* "contrib/asdf/asdf.lisp"
145 ,@(asdf-substitutions name)))))
146 (build-system gnu-build-system)
147 ;; src/configure uses 'which' to confirm the existence of 'gzip'.
148 (native-inputs `(("which" ,which)))
149 (inputs `(("gmp" ,gmp)
150 ("libatomic-ops" ,libatomic-ops)
157 (modify-phases %standard-phases
159 (add-after 'install 'wrap
160 (lambda* (#:key inputs outputs #:allow-other-keys)
161 (let* ((ecl (assoc-ref outputs "out"))
162 (input-path (lambda (lib path)
164 (assoc-ref inputs lib) path)))
165 (libraries '("gmp" "libatomic-ops" "libgc" "libffi" "libc"))
166 (binaries '("gcc" "ld-wrapper" "binutils"))
168 (map (lambda (lib) (input-path lib "/lib"))
171 (wrap-program (string-append ecl "/bin/ecl")
173 ,(map (lambda (binary)
174 (input-path binary "/bin"))
178 (input-path lib "/include"))
179 `("kernel-headers" ,@libraries)))
180 `("LIBRARY_PATH" suffix ,library-directories)
181 `("LD_LIBRARY_PATH" suffix ,library-directories)))))
182 (add-after 'wrap 'check (assoc-ref %standard-phases 'check))
183 (add-before 'check 'fix-path-to-ecl
185 (substitute* "build/tests/Makefile"
186 (("\\$\\{exec_prefix\\}/") ""))
189 (list (search-path-specification
190 (variable "XDG_DATA_DIRS")
191 (files '("share")))))
192 (home-page "http://ecls.sourceforge.net/")
193 (synopsis "Embeddable Common Lisp")
194 (description "ECL is an implementation of the Common Lisp language as
195 defined by the ANSI X3J13 specification. Its most relevant features are: a
196 bytecode compiler and interpreter, being able to compile Common Lisp with any
197 C/C++ compiler, being able to build standalone executables and libraries, and
198 supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
199 ;; Note that the file "Copyright" points to some files and directories
200 ;; which aren't under the lgpl2.0+ and instead contain many different,
201 ;; non-copyleft licenses.
202 (license license:lgpl2.0+)))
211 (uri (string-append "mirror://gnu/clisp/release/" version
212 "/clisp-" version ".tar.gz"))
214 (base32 "0rp82nqp5362isl9i34rwgg04cidz7izljd9d85pqcw1qr964bxx"))))
215 (build-system gnu-build-system)
216 (inputs `(("libffcall" ,libffcall)
217 ("readline" ,readline-6.2)
218 ("libsigsegv" ,libsigsegv)))
220 '(;; XXX The custom configure script does not cope well when passed
221 ;; --build=<triplet>.
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-sh-and-pwd
227 ;; The package is very messy with its references to "/bin/sh" and
228 ;; some other absolute paths to traditional tools. These appear in
229 ;; many places where our automatic patching misses them. Therefore
230 ;; we do the following, in this early (post-unpack) phase, to solve
231 ;; the problem from its root.
232 (substitute* (find-files "." "configure|Makefile")
234 (substitute* '("src/clisp-link.in")
235 (("/bin/pwd") "pwd"))
237 (add-after 'unpack 'remove-timestamps
239 (substitute* "src/constobj.d"
240 (("__DATE__ __TIME__") "\"1\""))
242 (add-before 'build 'chdir-to-source
244 ;; We are supposed to call make under the src sub-directory.
247 ;; Makefiles seem to have race conditions.
248 #:parallel-build? #f))
249 (home-page "http://www.clisp.org/")
250 (synopsis "A Common Lisp implementation")
252 "GNU CLISP is an implementation of ANSI Common Lisp. Common Lisp is a
253 high-level, object-oriented functional programming language. CLISP includes
254 an interpreter, a compiler, a debugger, and much more.")
255 ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source files have
256 ;; a lot of gpl3+. (Also some parts are under non-copyleft licenses, such
257 ;; as CLX by Texas Instruments.) In that case gpl3+ wins out.
258 (license license:gpl3+)))
267 (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
268 version "-source.tar.bz2"))
270 (base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5"))
271 (modules '((guix build utils)))
273 ;; Add sbcl-bundle-systems to 'default-system-source-registry'.
274 `(substitute* "contrib/asdf/asdf.lisp"
275 ,@(asdf-substitutions name)))))
276 (build-system gnu-build-system)
277 (outputs '("out" "doc"))
278 ;; Bootstrap with CLISP.
282 ("inetutils" ,inetutils) ;for hostname(1)
285 ("texinfo" ,texinfo)))
288 (modify-phases %standard-phases
290 (add-before 'build 'patch-unix-tool-paths
291 (lambda* (#:key outputs inputs #:allow-other-keys)
292 (let ((out (assoc-ref outputs "out"))
293 (bash (assoc-ref inputs "bash"))
294 (coreutils (assoc-ref inputs "coreutils"))
295 (ed (assoc-ref inputs "ed")))
296 (define (quoted-path input path)
297 (string-append "\"" input path "\""))
298 ;; Patch absolute paths in string literals. Note that this
299 ;; occurs in some .sh files too (which contain Lisp code). Use
300 ;; ISO-8859-1 because some of the files are ISO-8859-1 encoded.
301 (with-fluids ((%default-port-encoding #f))
302 ;; The removed file is utf-16-be encoded, which gives substitute*
303 ;; trouble. It does not contain references to the listed programs.
305 "./tests/data/compile-file-pos-utf16be.lisp"
306 (find-files "." "\\.(lisp|sh)$"))
307 (("\"/bin/sh\"") (quoted-path bash "/bin/sh"))
308 (("\"/usr/bin/env\"") (quoted-path coreutils "/usr/bin/env"))
309 (("\"/bin/cat\"") (quoted-path coreutils "/bin/cat"))
310 (("\"/bin/ed\"") (quoted-path ed "/bin/ed"))
311 (("\"/bin/echo\"") (quoted-path coreutils "/bin/echo"))
312 (("\"/bin/uname\"") (quoted-path coreutils "/bin/uname"))))
313 ;; This one script has a non-string occurrence of /bin/sh.
314 (substitute* '("tests/foreign.test.sh")
315 ;; Leave whitespace so we don't match the shebang.
316 ((" /bin/sh ") " sh "))
317 ;; This file contains a module that can create executable files
318 ;; which depend on the presence of SBCL. It generates shell
319 ;; scripts doing "exec sbcl ..." to achieve this. We patch both
320 ;; the shebang and the reference to "sbcl", tying the generated
321 ;; executables to the exact SBCL package that generated them.
322 (substitute* '("contrib/sb-executable/sb-executable.lisp")
323 (("/bin/sh") (string-append bash "/bin/sh"))
324 (("exec sbcl") (string-append "exec " out "/bin/sbcl")))
325 ;; Disable some tests that fail in our build environment.
326 (substitute* '("contrib/sb-bsd-sockets/tests.lisp")
327 ;; This requires /etc/protocols.
328 (("\\(deftest get-protocol-by-name/error" all)
329 (string-append "#+nil ;disabled by Guix\n" all)))
330 (substitute* '("contrib/sb-posix/posix-tests.lisp")
331 ;; These assume some users/groups which we don't have.
332 (("\\(deftest pwent\\.[12]" all)
333 (string-append "#+nil ;disabled by Guix\n" all))
334 (("\\(deftest grent\\.[12]" all)
335 (string-append "#+nil ;disabled by Guix\n" all))))))
337 (lambda* (#:key outputs #:allow-other-keys)
339 (zero? (system* "sh" "make.sh" "clisp"
340 (string-append "--prefix="
341 (assoc-ref outputs "out"))))))
344 (zero? (system* "sh" "install.sh"))))
345 (add-after 'build 'build-doc
347 (with-directory-excursion "doc/manual"
348 (and (zero? (system* "make" "info"))
349 (zero? (system* "make" "dist"))))))
350 (add-after 'install 'install-doc
351 (lambda* (#:key outputs #:allow-other-keys)
352 (let* ((out (assoc-ref outputs "out"))
353 (doc (assoc-ref outputs "doc"))
354 (old-doc-dir (string-append out "/share/doc"))
355 (new-doc/sbcl-dir (string-append doc "/share/doc/sbcl")))
356 (rmdir (string-append old-doc-dir "/sbcl/html"))
357 (mkdir-p new-doc/sbcl-dir)
358 (copy-recursively (string-append old-doc-dir "/sbcl")
360 (delete-file-recursively old-doc-dir)
362 ;; No 'check' target, though "make.sh" (build phase) runs tests.
365 (list (search-path-specification
366 (variable "XDG_DATA_DIRS")
367 (files '("share")))))
368 (home-page "http://www.sbcl.org/")
369 (synopsis "Common Lisp implementation")
370 (description "Steel Bank Common Lisp (SBCL) is a high performance Common
371 Lisp compiler. In addition to the compiler and runtime system for ANSI Common
372 Lisp, it provides an interactive environment including a debugger, a
373 statistical profiler, a code coverage tool, and many other extensions.")
374 ;; Public domain in jurisdictions that allow it, bsd-2 otherwise. MIT
375 ;; loop macro has its own license. See COPYING file for further notes.
376 (license (list license:public-domain license:bsd-2
377 (license:x11-style "file://src/code/loop.lisp")))))
384 (build-system gnu-build-system)
385 ;; CCL consists of a "lisp kernel" and "heap image", both of which are
386 ;; shipped in precompiled form in source tarballs. The former is a C
387 ;; program which we can rebuild from scratch, but the latter cannot be
388 ;; generated without an already working copy of CCL, and is platform
389 ;; dependent, so we need to fetch the correct tarball for the platform.
395 "ftp://ftp.clozure.com/pub/release/" version
397 (match (%current-system)
398 ((or "i686-linux" "x86_64-linux") "linuxx86")
399 ("armhf-linux" "linuxarm")
400 ;; Prevent errors when querying this package on unsupported
401 ;; platforms, e.g. when running "guix package --search="
406 (match (%current-system)
407 ((or "i686-linux" "x86_64-linux")
408 "0w3dmj7q9kqyra3yrf1lxclnjz151yvf5s5q8ayllvmvqbl8bs08")
410 "1x487aaz2rqcb6k301sy2p39a1m4qdhg6z9p9fb76ssipqgr38b4")
414 ("subversion" ,subversion)))
416 `(#:tests? #f ;no 'check' target
420 (lambda* (#:key inputs #:allow-other-keys)
421 (and (zero? (system* "tar" "xzvf" (assoc-ref inputs "ccl")))
422 (begin (chdir "ccl") #t)))
427 ;; Enter the source directory for the current platform's lisp
428 ;; kernel, and run 'make clean' to remove the precompiled one.
430 (chdir (string-append
432 ,(match (or (%current-target-system) (%current-system))
433 ("i686-linux" "linuxx8632")
434 ("x86_64-linux" "linuxx8664")
435 ("armhf-linux" "linuxarm")
436 ;; Prevent errors when querying this package
437 ;; on unsupported platforms, e.g. when running
438 ;; "guix package --search="
440 (substitute* '("Makefile")
443 (zero? (system* "make" "clean")))
444 ;; XXX Do we need to recompile the heap image as well for Guix?
445 ;; For now just use the one we already got in the tarball.
448 (lambda* (#:key outputs inputs #:allow-other-keys)
449 ;; The lisp kernel built by running 'make' in lisp-kernel/$system
450 ;; is put back into the original directory, so go back. The heap
451 ;; image is there as well.
453 (let* ((out (assoc-ref outputs "out"))
454 (libdir (string-append out "/lib/"))
455 (bindir (string-append out "/bin/"))
456 (wrapper (string-append bindir "ccl"))
457 (bash (assoc-ref inputs "bash"))
459 ,(match (or (%current-target-system) (%current-system))
460 ("i686-linux" "lx86cl")
461 ("x86_64-linux" "lx86cl64")
462 ("armhf-linux" "armcl")
463 ;; Prevent errors when querying this package
464 ;; on unsupported platforms, e.g. when running
465 ;; "guix package --search="
467 (heap (string-append kernel ".image")))
470 (copy-file kernel (string-append libdir kernel))
471 (copy-file heap (string-append libdir heap))
472 (with-output-to-file wrapper
476 "#!" bash "/bin/sh\n"
477 "if [ -z \"$CCL_DEFAULT_DIRECTORY\" ]; then\n"
478 " CCL_DEFAULT_DIRECTORY=" libdir "\n"
480 "export CCL_DEFAULT_DIRECTORY\n"
481 "exec " libdir kernel "\n"))))
482 (chmod wrapper #o755)))
483 %standard-phases))))))
484 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))
485 (home-page "http://ccl.clozure.com/")
486 (synopsis "Common Lisp implementation")
487 (description "Clozure CL (often called CCL for short) is a Common Lisp
488 implementation featuring fast compilation speed, native threads, a precise,
489 generational, compacting garbage collector, and a convenient foreign-function
491 ;; See file doc/LICENSE for clarifications it makes regarding how the LGPL
492 ;; applies to Lisp code according to them.
493 (license (list license:lgpl2.1
494 license:clarified-artistic)))) ;TRIVIAL-LDAP package
496 (define-public femtolisp
497 (let ((commit "68c5b1225572ecf2c52baf62f928063e5a30511b")
501 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
505 (url "https://github.com/JeffBezanson/femtolisp.git")
507 (file-name (string-append name "-" version "-checkout"))
510 "04rnwllxnl86zw8c6pwxznn49bvkvh0f1lfliy085vjzvlq3rgja"))))
511 ;; See "utils.h" for supported systems. Upstream bug:
512 ;; https://github.com/JeffBezanson/femtolisp/issues/25
514 (fold delete %supported-systems
515 '("armhf-linux" "mips64el-linux")))
516 (build-system gnu-build-system)
518 `(#:make-flags '("CC=gcc" "release")
521 (modify-phases %standard-phases
522 (delete 'configure) ; No configure script
523 (replace 'install ; Makefile has no 'install phase
524 (lambda* (#:key outputs #:allow-other-keys)
525 (let* ((out (assoc-ref outputs "out"))
526 (bin (string-append out "/bin")))
527 (install-file "flisp" bin)
529 ;; The flisp binary is now available, run bootstrap to
530 ;; generate flisp.boot and afterwards runs make test.
531 (add-after 'install 'bootstrap-gen-and-test
532 (lambda* (#:key outputs #:allow-other-keys)
533 (let* ((out (assoc-ref outputs "out"))
534 (bin (string-append out "/bin")))
536 (zero? (system* "./bootstrap.sh"))
537 (install-file "flisp.boot" bin))))))))
538 (synopsis "Scheme-like lisp implementation")
540 "@code{femtolisp} is a scheme-like lisp implementation with a
541 simple, elegant Scheme dialect. It is a lisp-1 with lexical scope.
542 The core is 12 builtin special forms and 33 builtin functions.")
543 (home-page "https://github.com/JeffBezanson/femtolisp")
544 (license license:bsd-3))))
553 (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
555 (modules '((guix build utils)))
558 (substitute* "src/unix.c"
559 (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
560 (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
561 (substitute* "src/main.c"
562 (("\" \\(built \" __DATE__ \"\\)\"") ""))))
565 "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
566 (build-system gnu-build-system)
568 `(;; We have to add these LIBS so that they are found.
569 #:configure-flags (list "LIBS=-lz"
570 "X_EXTRA_LIBS=-lfontconfig"
572 #:tests? #f)) ; No make check.
573 (native-inputs `(("intltool" ,intltool)))
575 `(("alsa-lib" ,alsa-lib)
577 ("sdl-image" ,sdl-image)
578 ("sdl-mixer" ,sdl-mixer)
583 ("fontconfig" ,fontconfig)
585 ("openblas" ,openblas)
588 ("mesa-utils" ,mesa-utils)
589 ("binutils" ,binutils)
590 ("libiberty" ,libiberty)
591 ("readline" ,readline)
593 ("gettext-minimal" ,gettext-minimal)))
594 (synopsis "Lisp Universal Shell")
596 "Lush is an object-oriented Lisp interpreter/compiler with features
597 designed to please people who want to prototype large numerical
598 applications. Lush includes an extensive library of
599 vector/matrix/tensor manipulation, numerous numerical libraries
600 (including GSL, LAPACK, and BLAS), a set of graphic functions, a
601 simple GUI toolkit, and interfaces to various graphic and multimedia
602 libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
603 grabbing), and others. Lush is an ideal frontend script language for
604 programming projects written in C or other languages. Lush also has
605 libraries for Machine Learning, Neural Nets and statistical estimation.")
606 (home-page "http://lush.sourceforge.net/")
607 (license license:lgpl2.1+)))
609 (define-public sbcl-alexandria
611 (commit "926a066611b7b11cb71e26c827a271e500888c30"))
613 (name "sbcl-alexandria")
614 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
619 (url "https://gitlab.common-lisp.net/alexandria/alexandria.git")
623 "18yncicdkh294j05rhgm23gzi36y9qy6vrfba8vg69jrxjp1hx8l"))
624 (file-name (string-append "alexandria-" version "-checkout"))))
625 (build-system asdf-build-system/sbcl)
626 (synopsis "Collection of portable utilities for Common Lisp")
628 "Alexandria is a collection of portable utilities. It does not contain
629 conceptual extensions to Common Lisp. It is conservative in scope, and
630 portable between implementations.")
631 (home-page "https://common-lisp.net/project/alexandria/")
632 (license license:public-domain))))
634 (define-public cl-alexandria
635 (sbcl-package->cl-source-package sbcl-alexandria))
637 (define-public ecl-alexandria
638 (sbcl-package->ecl-package sbcl-alexandria))
640 (define-public sbcl-fiveam
648 "https://github.com/sionescu/fiveam/archive/v"
651 (base32 "0f48pcbhqs3wwwzjl5nk57d4hcbib4l9xblxc66b8c2fhvhmhxnv"))
652 (file-name (string-append "fiveam-" version ".tar.gz"))))
653 (inputs `(("sbcl-alexandria" ,sbcl-alexandria)))
654 (build-system asdf-build-system/sbcl)
655 (synopsis "Common Lisp testing framework")
656 (description "FiveAM is a simple (as far as writing and running tests
657 goes) regression testing framework. It has been designed with Common Lisp's
658 interactive development model in mind.")
659 (home-page "https://common-lisp.net/project/fiveam/")
660 (license license:bsd-3)))
662 (define-public cl-fiveam
663 (sbcl-package->cl-source-package sbcl-fiveam))
665 (define-public ecl-fiveam
666 (sbcl-package->ecl-package sbcl-fiveam))
668 (define-public sbcl-bordeaux-threads
670 (name "sbcl-bordeaux-threads")
675 "https://github.com/sionescu/bordeaux-threads/archive/v"
678 (base32 "10ryrcx832fwqdawb6jmknymi7wpdzhi30qzx7cbrk0cpnka71w2"))
680 (string-append "bordeaux-threads-" version ".tar.gz"))))
681 (inputs `(("sbcl-alexandria" ,sbcl-alexandria)))
682 (native-inputs `(("tests:cl-fiveam" ,sbcl-fiveam)))
683 (build-system asdf-build-system/sbcl)
684 (synopsis "Portable shared-state concurrency library for Common Lisp")
685 (description "BORDEAUX-THREADS is a proposed standard for a minimal
686 MP/Threading interface. It is similar to the CLIM-SYS threading and lock
688 (home-page "https://common-lisp.net/project/bordeaux-threads/")
689 (license license:x11)))
691 (define-public cl-bordeaux-threads
692 (sbcl-package->cl-source-package sbcl-bordeaux-threads))
694 (define-public ecl-bordeaux-threads
695 (sbcl-package->ecl-package sbcl-bordeaux-threads))
697 (define-public sbcl-trivial-gray-streams
699 (commit "0483ade330508b4b2edeabdb47d16ec9437ee1cb"))
701 (name "sbcl-trivial-gray-streams")
702 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
708 (url "https://github.com/trivial-gray-streams/trivial-gray-streams.git")
711 (base32 "0m3rpf2x0zmdk3nf1qfa01j6a55vj7gkwhyw78qslcgbjlgh8p4d"))
713 (string-append "trivial-gray-streams-" version "-checkout"))))
714 (build-system asdf-build-system/sbcl)
715 (synopsis "Compatibility layer for Gray streams implementations")
716 (description "Gray streams is an interface proposed for inclusion with
717 ANSI CL by David N. Gray. The proposal did not make it into ANSI CL, but most
718 popular CL implementations implement it. This package provides an extremely
719 thin compatibility layer for gray streams.")
720 (home-page "http://www.cliki.net/trivial-gray-streams")
721 (license license:x11))))
723 (define-public cl-trivial-gray-streams
724 (sbcl-package->cl-source-package sbcl-trivial-gray-streams))
726 (define-public ecl-trivial-gray-streams
727 (sbcl-package->ecl-package sbcl-trivial-gray-streams))
729 (define-public sbcl-flexi-streams
731 (name "sbcl-flexi-streams")
737 "https://github.com/edicl/flexi-streams/archive/v"
740 (base32 "16grnxvs7vqm5s6myf8a5s7vwblzq1kgwj8i7ahz8vwvihm9gzfi"))
741 (file-name (string-append "flexi-streams-" version ".tar.gz"))))
742 (build-system asdf-build-system/sbcl)
743 (inputs `(("sbcl-trivial-gray-streams" ,sbcl-trivial-gray-streams)))
744 (synopsis "Implementation of virtual bivalent streams for Common Lisp")
745 (description "Flexi-streams is an implementation of \"virtual\" bivalent
746 streams that can be layered atop real binary or bivalent streams and that can
747 be used to read and write character data in various single- or multi-octet
748 encodings which can be changed on the fly. It also supplies in-memory binary
749 streams which are similar to string streams.")
750 (home-page "http://weitz.de/flexi-streams/")
751 (license license:bsd-3)))
753 (define-public cl-flexi-streams
754 (sbcl-package->cl-source-package sbcl-flexi-streams))
756 (define-public ecl-flexi-streams
757 (sbcl-package->ecl-package sbcl-flexi-streams))
759 (define-public sbcl-cl-ppcre
761 (name "sbcl-cl-ppcre")
767 "https://github.com/edicl/cl-ppcre/archive/v"
770 (base32 "1i7daxf0wnydb0pgwiym7qh2wy70n14lxd6dyv28sy0naa8p31gd"))
771 (file-name (string-append "cl-ppcre-" version ".tar.gz"))))
772 (build-system asdf-build-system/sbcl)
773 (native-inputs `(("tests:cl-flexi-streams" ,sbcl-flexi-streams)))
774 (synopsis "Portable regular expression library for Common Lisp")
775 (description "CL-PPCRE is a portable regular expression library for Common
776 Lisp, which is compatible with perl. It is pretty fast, thread-safe, and
777 compatible with ANSI-compliant Common Lisp implementations.")
778 (home-page "http://weitz.de/cl-ppcre/")
779 (license license:bsd-2)))
781 (define-public cl-ppcre
782 (sbcl-package->cl-source-package sbcl-cl-ppcre))
784 (define-public ecl-cl-ppcre
785 (sbcl-package->ecl-package sbcl-cl-ppcre))
787 (define-public sbcl-clx
789 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
792 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
798 (url "https://github.com/sharplispers/clx.git")
801 (base32 "0qffag03ns52kwq9xjns2qg1yr0bf3ba507iwq5cmx5xz0b0rmjm"))
802 (file-name (string-append "clx-" version "-checkout"))
805 (search-patch "clx-remove-demo.patch")))
806 (modules '((guix build utils)))
809 ;; These removed files cause the compiled system to crash when
811 (delete-file-recursively "demo")
812 (delete-file "test/trapezoid.lisp")
813 (substitute* "clx.asd"
814 (("\\(:file \"trapezoid\"\\)") ""))))))
815 (build-system asdf-build-system/sbcl)
817 '(#:special-dependencies '("sb-bsd-sockets")))
818 (home-page "http://www.cliki.net/portable-clx")
819 (synopsis "X11 client library for Common Lisp")
820 (description "CLX is an X11 client library for Common Lisp. The code was
821 originally taken from a CMUCL distribution, was modified somewhat in order to
822 make it compile and run under SBCL, then a selection of patches were added
823 from other CLXes around the net.")
824 (license license:x11))))
826 (define-public cl-clx
827 (sbcl-package->cl-source-package sbcl-clx))
829 (define-public ecl-clx
830 (sbcl-package->ecl-package sbcl-clx))
832 (define-public sbcl-stumpwm
834 (name "sbcl-stumpwm")
839 "https://github.com/stumpwm/stumpwm/archive/"
842 (base32 "1maxp98gh64az3d9vz9br6zdd6rc9fmj2imvax4by85g6kxvdz1i"))
843 (file-name (string-append "stumpwm-" version ".tar.gz"))))
844 (build-system asdf-build-system/sbcl)
845 (inputs `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
846 ("sbcl-clx" ,sbcl-clx)))
847 (outputs '("out" "bin"))
849 '(#:special-dependencies '("sb-posix")
851 (modify-phases %standard-phases
852 (add-after 'create-symlinks 'build-program
853 (lambda* (#:key lisp outputs inputs #:allow-other-keys)
856 (string-append (assoc-ref outputs "bin") "/bin/stumpwm")
858 #:entry-program '((stumpwm:stumpwm) 0))))
859 (add-after 'build-program 'create-desktop-file
860 (lambda* (#:key outputs lisp binary? #:allow-other-keys)
861 (let ((output (or (assoc-ref outputs "bin")
862 (assoc-ref outputs "out")))
863 (xsessions "/share/xsessions"))
864 (mkdir-p (string-append output xsessions))
866 (string-append output xsessions
872 Comment=The Stump Window Manager~@
873 Exec=~a/bin/stumpwm~@
874 TryExec=~@*~a/bin/stumpwm~@
879 (synopsis "Window manager written in Common Lisp")
880 (description "Stumpwm is a window manager written entirely in Common Lisp.
881 It attempts to be highly customizable while relying entirely on the keyboard
882 for input. These design decisions reflect the growing popularity of
883 productive, customizable lisp based systems.")
884 (home-page "http://github.com/stumpwm/stumpwm")
885 (license license:gpl2+)
886 (properties `((ecl-variant . ,(delay ecl-stumpwm))))))
888 (define-public cl-stumpwm
889 (sbcl-package->cl-source-package sbcl-stumpwm))
891 (define-public ecl-stumpwm
892 (let ((base (sbcl-package->ecl-package sbcl-stumpwm)))
898 (define sbcl-slynk-boot0
900 (commit "5706cd45d484a4f25795abe8e643509d31968aa2"))
903 (version (string-append "1.0.0-beta-" revision "." (string-take commit 7)))
909 (url "https://github.com/joaotavora/sly.git")
912 (base32 "0h4gg3sndl2bf6jdnx9nrf14p9hhi43hagrl0f4v4l11hczl8w81"))
913 (file-name (string-append "slynk-" version "-checkout"))
914 (modules '((guix build utils)
918 ;; Move the contribs into the main source directory for easier
920 (substitute* "slynk/slynk.asd"
923 (("\\(defsystem :slynk-util")
924 "(defsystem :slynk-util :depends-on (:slynk)"))
925 (substitute* "contrib/slynk-trace-dialog.lisp"
926 (("\\(slynk::reset-inspector\\)") ; Causes problems on load
928 (substitute* "contrib/slynk-profiler.lisp"
930 "slynk-pprint-to-line"))
931 (rename-file "contrib" "slynk/contrib")
932 ;; Move slynk's contents into the base directory for easier
936 (unless (string-prefix? "." file)
937 (rename-file (string-append "slynk/" file)
938 (string-append "./" (basename file)))))
939 (scandir "slynk"))))))
940 (build-system asdf-build-system/sbcl)
942 `(#:tests? #f)) ; No test suite
943 (synopsis "Common Lisp IDE for Emacs")
944 (description "SLY is a fork of SLIME. It also features a completely
945 redesigned REPL based on Emacs's own full-featured comint.el, live code
946 annotations, and a consistent interactive button interface. Everything can be
947 copied to the REPL. One can create multiple inspectors with independent
949 (home-page "https://github.com/joaotavora/sly")
950 (license license:public-domain)
951 (properties `((cl-source-variant . ,(delay cl-slynk)))))))
953 (define-public cl-slynk
954 (sbcl-package->cl-source-package sbcl-slynk-boot0))
956 (define ecl-slynk-boot0
957 (sbcl-package->ecl-package sbcl-slynk-boot0))
959 (define sbcl-slynk-arglists
961 (inherit sbcl-slynk-boot0)
962 (name "sbcl-slynk-arglists")
963 (inputs `(("sbcl-slynk" ,sbcl-slynk-boot0)))
965 `(#:asd-file "slynk.asd"
966 ,@(package-arguments sbcl-slynk-boot0)))))
968 (define ecl-slynk-arglists
969 (sbcl-package->ecl-package sbcl-slynk-arglists))
971 (define sbcl-slynk-util
973 (inherit sbcl-slynk-arglists)
974 (name "sbcl-slynk-util")))
976 (define ecl-slynk-util
977 (sbcl-package->ecl-package sbcl-slynk-util))
979 (define sbcl-slynk-fancy-inspector
981 (inherit sbcl-slynk-arglists)
982 (name "sbcl-slynk-fancy-inspector")
983 (inputs `(("sbcl-slynk-util" ,sbcl-slynk-util)
984 ,@(package-inputs sbcl-slynk-arglists)))))
986 (define ecl-slynk-fancy-inspector
987 (sbcl-package->ecl-package sbcl-slynk-fancy-inspector))
989 (define sbcl-slynk-package-fu
991 (inherit sbcl-slynk-arglists)
992 (name "sbcl-slynk-package-fu")))
994 (define ecl-slynk-package-fu
995 (sbcl-package->ecl-package sbcl-slynk-package-fu))
997 (define sbcl-slynk-mrepl
999 (inherit sbcl-slynk-arglists)
1000 (name "sbcl-slynk-mrepl")))
1002 (define ecl-slynk-mrepl
1003 (sbcl-package->ecl-package sbcl-slynk-mrepl))
1005 (define sbcl-slynk-trace-dialog
1007 (inherit sbcl-slynk-arglists)
1008 (name "sbcl-slynk-trace-dialog")))
1010 (define ecl-slynk-trace-dialog
1011 (sbcl-package->ecl-package sbcl-slynk-trace-dialog))
1013 (define sbcl-slynk-profiler
1015 (inherit sbcl-slynk-arglists)
1016 (name "sbcl-slynk-profiler")))
1018 (define ecl-slynk-profiler
1019 (sbcl-package->ecl-package sbcl-slynk-profiler))
1021 (define sbcl-slynk-stickers
1023 (inherit sbcl-slynk-arglists)
1024 (name "sbcl-slynk-stickers")))
1026 (define ecl-slynk-stickers
1027 (sbcl-package->ecl-package sbcl-slynk-stickers))
1029 (define sbcl-slynk-indentation
1031 (inherit sbcl-slynk-arglists)
1032 (name "sbcl-slynk-indentation")))
1034 (define ecl-slynk-indentation
1035 (sbcl-package->ecl-package sbcl-slynk-indentation))
1037 (define sbcl-slynk-retro
1039 (inherit sbcl-slynk-arglists)
1040 (name "sbcl-slynk-retro")))
1042 (define ecl-slynk-retro
1043 (sbcl-package->ecl-package sbcl-slynk-retro))
1045 (define slynk-systems
1049 "slynk-fancy-inspector"
1053 "slynk-trace-dialog"
1058 (define-public sbcl-slynk
1060 (inherit sbcl-slynk-boot0)
1062 `(("slynk" ,sbcl-slynk-boot0)
1063 ("slynk-util" ,sbcl-slynk-util)
1064 ("slynk-arglists" ,sbcl-slynk-arglists)
1065 ("slynk-fancy-inspector" ,sbcl-slynk-fancy-inspector)
1066 ("slynk-package-fu" ,sbcl-slynk-package-fu)
1067 ("slynk-mrepl" ,sbcl-slynk-mrepl)
1068 ("slynk-profiler" ,sbcl-slynk-profiler)
1069 ("slynk-trace-dialog" ,sbcl-slynk-trace-dialog)
1070 ("slynk-stickers" ,sbcl-slynk-stickers)
1071 ("slynk-indentation" ,sbcl-slynk-indentation)
1072 ("slynk-retro" ,sbcl-slynk-retro)))
1073 (native-inputs `(("sbcl" ,sbcl)))
1074 (build-system trivial-build-system)
1076 (outputs '("out" "image"))
1078 `(#:modules ((guix build union)
1080 (guix build lisp-utils))
1083 (use-modules (ice-9 match)
1086 (guix build lisp-utils))
1089 (assoc-ref %outputs "out")
1093 (if (string-prefix? "slynk" name) path #f)))
1096 (prepend-to-source-registry
1097 (string-append (assoc-ref %outputs "out") "//"))
1100 (assoc-ref %outputs "image")
1102 #:inputs %build-inputs
1103 #:dependencies ',slynk-systems))))))
1105 (define-public ecl-slynk
1107 (inherit sbcl-slynk)
1112 (list name (sbcl-package->ecl-package pkg))))
1113 (package-inputs sbcl-slynk)))
1117 '(#:modules ((guix build union))
1120 (use-modules (ice-9 match)
1122 (match %build-inputs
1123 (((names . paths) ...)
1124 (union-build (assoc-ref %outputs "out")
1127 (define-public sbcl-stumpwm+slynk
1129 (inherit sbcl-stumpwm)
1130 (name "sbcl-stumpwm-with-slynk")
1133 `(("stumpwm" ,sbcl-stumpwm)
1134 ("slynk" ,sbcl-slynk)))
1136 (substitute-keyword-arguments (package-arguments sbcl-stumpwm)
1138 `(modify-phases ,phases
1139 (replace 'build-program
1140 (lambda* (#:key lisp inputs outputs #:allow-other-keys)
1141 (let* ((out (assoc-ref outputs "out"))
1142 (program (string-append out "/bin/stumpwm")))
1143 (build-program lisp program
1145 #:entry-program '((stumpwm:stumpwm) 0)
1146 #:dependencies '("stumpwm"
1148 ;; Remove unneeded file.
1149 (delete-file (string-append out "/bin/stumpwm-exec.fasl"))
1151 (delete 'copy-source)
1154 (delete 'link-dependencies)
1156 (delete 'create-symlinks)))))))