gnu: r-fourcseq: Move to (gnu packages bioconductor).
[jackhill/guix/guix.git] / gnu / packages / scheme.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
4 ;;; Copyright © 2015, 2016 Federico Beffa <beffa@fbengineering.ch>
5 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
9 ;;; Copyright © 2017 John Darrington <jmd@gnu.org>
10 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
11 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
13 ;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
14 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
15 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
16 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
17 ;;;
18 ;;; This file is part of GNU Guix.
19 ;;;
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
24 ;;;
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
29 ;;;
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 (define-module (gnu packages scheme)
34 #:use-module (gnu packages)
35 #:use-module ((guix licenses)
36 #:select (gpl2+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ asl2.0 bsd-3
37 cc-by-sa4.0 non-copyleft expat))
38 #:use-module (guix packages)
39 #:use-module (guix download)
40 #:use-module (guix git-download)
41 #:use-module (guix utils)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages bdw-gc)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages libevent)
49 #:use-module (gnu packages libunistring)
50 #:use-module (gnu packages m4)
51 #:use-module (gnu packages multiprecision)
52 #:use-module (gnu packages ncurses)
53 #:use-module (gnu packages pcre)
54 #:use-module (gnu packages emacs)
55 #:use-module (gnu packages ghostscript)
56 #:use-module (gnu packages netpbm)
57 #:use-module (gnu packages texinfo)
58 #:use-module (gnu packages tex)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages avahi)
63 #:use-module (gnu packages libphidget)
64 #:use-module (gnu packages gcc)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages image)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages gl)
74 #:use-module (gnu packages libedit)
75 #:use-module (gnu packages linux)
76 #:use-module (srfi srfi-1)
77 #:use-module (ice-9 match))
78
79 (define (mit-scheme-source-directory system version)
80 (string-append "mit-scheme-"
81 (if (or (string-prefix? "x86_64" system)
82 (string-prefix? "i686" system))
83 ""
84 "c-")
85 version))
86
87 (define-public mit-scheme
88 (package
89 (name "mit-scheme")
90 (version "10.1.3")
91 (source #f) ; see below
92 (outputs '("out" "doc"))
93 (build-system gnu-build-system)
94 (arguments
95 `(#:modules ((guix build gnu-build-system)
96 (guix build utils)
97 (srfi srfi-1))
98 #:phases
99 (modify-phases %standard-phases
100 (replace 'unpack
101 (lambda* (#:key inputs #:allow-other-keys)
102 (invoke "tar" "xzvf"
103 (assoc-ref inputs "source"))
104 (chdir ,(mit-scheme-source-directory (%current-system)
105 version))
106 ;; Delete these dangling symlinks since they break
107 ;; `patch-shebangs'.
108 (for-each delete-file
109 (find-files "src/compiler" "^make\\."))
110 (chdir "src")
111 #t))
112 (add-after 'unpack 'patch-/bin/sh
113 (lambda _
114 (setenv "CONFIG_SHELL" (which "sh"))
115 (substitute* '("../tests/ffi/autogen.sh"
116 "../tests/ffi/autobuild.sh"
117 "../tests/ffi/test-ffi.sh"
118 "../tests/runtime/test-process.scm"
119 "runtime/unxprm.scm")
120 (("/bin/sh") (which "sh"))
121 (("\\./autogen\\.sh")
122 (string-append (which "sh") " autogen.sh"))
123 (("\\./configure")
124 (string-append (which "sh") " configure")))
125 #t))
126 ;; FIXME: the texlive-union insists on regenerating fonts. It stores
127 ;; them in HOME, so it needs to be writeable.
128 (add-before 'build 'set-HOME
129 (lambda _ (setenv "HOME" "/tmp") #t))
130 (replace 'build
131 (lambda* (#:key system outputs #:allow-other-keys)
132 (let ((out (assoc-ref outputs "out")))
133 (if (or (string-prefix? "x86_64" system)
134 (string-prefix? "i686" system))
135 (invoke "make" "compile-microcode")
136 (invoke "./etc/make-liarc.sh"
137 (string-append "--prefix=" out)))
138 #t)))
139 (add-after 'configure 'configure-doc
140 (lambda* (#:key outputs inputs #:allow-other-keys)
141 (with-directory-excursion "../doc"
142 (let* ((out (assoc-ref outputs "out"))
143 (bash (assoc-ref inputs "bash"))
144 (bin/sh (string-append bash "/bin/sh")))
145 (invoke bin/sh "./configure"
146 (string-append "--prefix=" out)
147 (string-append "SHELL=" bin/sh))
148 #t))))
149 (add-after 'build 'build-doc
150 (lambda* _
151 (with-directory-excursion "../doc"
152 (invoke "make"))
153 #t))
154 (add-after 'install 'install-doc
155 (lambda* (#:key outputs #:allow-other-keys)
156 (let* ((out (assoc-ref outputs "out"))
157 (doc (assoc-ref outputs "doc"))
158 (old-doc-dir (string-append out "/share/doc"))
159 (new-doc/mit-scheme-dir
160 (string-append doc "/share/doc/" ,name "-" ,version)))
161 (with-directory-excursion "../doc"
162 (for-each (lambda (target)
163 (invoke "make" target))
164 '("install-info-gz" "install-man"
165 "install-html" "install-pdf")))
166 (mkdir-p new-doc/mit-scheme-dir)
167 (copy-recursively
168 (string-append old-doc-dir "/" ,name)
169 new-doc/mit-scheme-dir)
170 (delete-file-recursively old-doc-dir)
171 #t))))))
172 (native-inputs
173 `(;; Autoconf, Automake, and Libtool are necessary for the FFI tests.
174 ("autoconf" ,autoconf)
175 ("automake" ,automake)
176 ("libtool" ,libtool)
177 ("texlive" ,(texlive-union (list texlive-tex-texinfo)))
178 ("texinfo" ,texinfo)
179 ("m4" ,m4)))
180 (inputs
181 `(("libx11" ,libx11)
182
183 ("source"
184
185 ;; MIT/GNU Scheme is not bootstrappable, so it's recommended to
186 ;; compile from the architecture-specific tarballs, which contain
187 ;; pre-built binaries. It leads to more efficient code than when
188 ;; building the tarball that contains generated C code instead of
189 ;; those binaries.
190 ,(origin
191 (method url-fetch)
192 (uri (string-append "mirror://gnu/mit-scheme/stable.pkg/"
193 version "/mit-scheme-"
194 (match (%current-system)
195 ("x86_64-linux"
196 (string-append version "-x86-64"))
197 ("i686-linux"
198 (string-append version "-i386"))
199 (_
200 (string-append "c-" version)))
201 ".tar.gz"))
202 (sha256
203 (match (%current-system)
204 ("x86_64-linux"
205 (base32
206 "03m7cc035w3avs91j2pcz9f15ssgvgp3rm045d1vbydqrkzfyw8k"))
207 ("i686-linux"
208 (base32
209 "05sjyz90xxfnmi87qv8x0yx0fcallnzl1dciygdafp317pn489is"))
210 (_
211 (base32
212 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))))))))
213
214 ;; Fails to build on MIPS, see <http://bugs.gnu.org/18221>.
215 ;; Also, the portable C version of MIT/GNU Scheme did not work in time for
216 ;; release in version 10.1.
217 (supported-systems '("x86_64-linux" "i686-linux"))
218
219 (home-page "https://www.gnu.org/software/mit-scheme/")
220 (synopsis "A Scheme implementation with integrated editor and debugger")
221 (description
222 "GNU/MIT Scheme is an implementation of the Scheme programming
223 language. It provides an interpreter, a compiler and a debugger. It also
224 features an integrated Emacs-like editor and a large runtime library.")
225 (license gpl2+)
226 (properties '((ftp-directory . "/gnu/mit-scheme/stable.pkg")))))
227
228 (define-public bigloo
229 ;; Upstream modifies source tarballs in place, making significant changes
230 ;; long after the initial publication: <https://bugs.gnu.org/33525>.
231 (let ((upstream-version "4.3f"))
232 (package
233 (name "bigloo")
234 (version "4.3f")
235 (source (origin
236 (method url-fetch)
237 (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo"
238 upstream-version ".tar.gz"))
239 (sha256
240 (base32
241 "09whj8z91qbihk59dw2yb2ccbx9nk1c4l65j62pfs1pz822cpyh9"))
242 ;; Remove bundled libraries.
243 (modules '((guix build utils)))
244 (snippet
245 '(begin
246 (for-each delete-file-recursively
247 '("gc" "gmp" "libuv"))
248 #t))))
249 (build-system gnu-build-system)
250 (arguments
251 `(#:test-target "test"
252 #:phases
253 (modify-phases %standard-phases
254 (replace 'configure
255 (lambda* (#:key inputs outputs #:allow-other-keys)
256
257 (substitute* "configure"
258 (("^shell=.*$")
259 (string-append "shell=" (which "bash") "\n"))
260 (("`date`") "0"))
261 (substitute* "autoconf/runtest.in"
262 ((", @DATE@") ""))
263 (substitute* "autoconf/osversion"
264 (("^version.*$") "version=\"\"\n"))
265 (substitute* "comptime/Makefile"
266 (("\\$\\(LDCOMPLIBS\\)")
267 "$(LDCOMPLIBS) $(LDFLAGS)"))
268
269 ;; The `configure' script doesn't understand options
270 ;; of those of Autoconf.
271 (let ((out (assoc-ref outputs "out")))
272 (invoke "./configure"
273 (string-append "--prefix=" out)
274 ; use system libraries
275 "--customgc=no"
276 "--customunistring=no"
277 "--customlibuv=no"
278 (string-append"--mv=" (which "mv"))
279 (string-append "--rm=" (which "rm"))
280 "--cflags=-fPIC"
281 (string-append "--ldflags=-Wl,-rpath="
282 (assoc-ref outputs "out")
283 "/lib/bigloo/" ,upstream-version)
284 (string-append "--lispdir=" out
285 "/share/emacs/site-lisp")
286 "--sharedbde=yes"
287 "--sharedcompiler=yes"
288 "--disable-patch"))))
289 (add-after 'install 'install-emacs-modes
290 (lambda* (#:key outputs #:allow-other-keys)
291 (let* ((out (assoc-ref outputs "out"))
292 (dir (string-append out "/share/emacs/site-lisp")))
293 (invoke "make" "-C" "bmacs" "all" "install"
294 (string-append "EMACSBRAND=emacs25")
295 (string-append "EMACSDIR=" dir))))))))
296 (inputs
297 `(("emacs" ,emacs) ;UDE needs the X version of Emacs
298 ("libgc" ,libgc)
299 ("libunistring" ,libunistring)
300 ("libuv" ,libuv)
301 ("openssl" ,openssl)
302 ("sqlite" ,sqlite)
303
304 ;; Optional APIs for which Bigloo has bindings.
305 ("avahi" ,avahi)
306 ("libphidget" ,libphidget)
307 ("pcre" ,pcre)))
308 (native-inputs
309 `(("pkg-config" ,pkg-config)))
310 (propagated-inputs
311 `(("gmp" ,gmp))) ; bigloo.h refers to gmp.h
312 (home-page "https://www-sop.inria.fr/indes/fp/Bigloo/")
313 (synopsis "Efficient Scheme compiler")
314 (description
315 "Bigloo is a Scheme implementation devoted to one goal: enabling Scheme
316 based programming style where C(++) is usually required. Bigloo attempts to
317 make Scheme practical by offering features usually presented by traditional
318 programming languages but not offered by Scheme and functional programming.
319 Bigloo compiles Scheme modules. It delivers small and fast stand alone binary
320 executables. Bigloo enables full connections between Scheme and C programs
321 and between Scheme and Java programs.")
322 (license gpl2+))))
323
324 (define-public hop
325 (package
326 (name "hop")
327 (version "3.2.0-pre1")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-"
331 version ".tar.gz"))
332 (sha256
333 (base32
334 "0jf418d0s9imv98s6qrpjxr1mdaxr37knh5qyfl5y4a9cc41mlg5"))))
335 (build-system gnu-build-system)
336 (arguments
337 `(#:test-target "test"
338 #:make-flags '("BIGLOO=bigloo")
339 #:parallel-build? #f
340 #:phases
341 (modify-phases %standard-phases
342 (replace 'configure
343 (lambda* (#:key inputs outputs #:allow-other-keys)
344 (let ((out (assoc-ref outputs "out")))
345 (substitute* '("tools/Makefile"
346 "test/hopjs/TEST.in")
347 (("/bin/rm") (which "rm")))
348 (invoke "./configure"
349 (string-append "--prefix=" out)
350 "--hostcc=gcc"
351 (string-append "--blflags="
352 ;; user flags completely override useful
353 ;; default flags, so repeat them here.
354 "-copt \\$(CPICFLAGS) "
355 "-L \\$(BUILDLIBDIR) "
356 "-ldopt -Wl,-rpath," out "/lib"))))))))
357 (inputs `(("avahi" ,avahi)
358 ("bigloo" ,bigloo)
359 ("libgc" ,libgc)
360 ("libunistring" ,libunistring)
361 ("libuv" ,libuv)
362 ("pcre" ,pcre)
363 ("sqlite" ,sqlite)
364 ("which" ,which)))
365 (home-page "http://hop.inria.fr/")
366 (synopsis "Multi-tier programming language for the Web 2.0")
367 (description
368 "HOP is a multi-tier programming language for the Web 2.0 and the
369 so-called diffuse Web. It is designed for programming interactive web
370 applications in many fields such as multimedia (web galleries, music players,
371 ...), ubiquitous and house automation (SmartPhones, personal appliance),
372 mashups, office (web agendas, mail clients, ...), etc.")
373 (license gpl2+)))
374
375 (define-public scheme48
376 (package
377 (name "scheme48")
378 (version "1.9.2")
379 (source (origin
380 (method url-fetch)
381 (uri (string-append "http://s48.org/" version
382 "/scheme48-" version ".tgz"))
383 (sha256
384 (base32
385 "1x4xfm3lyz2piqcw1h01vbs1iq89zq7wrsfjgh3fxnlm1slj2jcw"))
386 (patches (search-patches "scheme48-tests.patch"))))
387 (build-system gnu-build-system)
388 (home-page "http://s48.org/")
389 (synopsis "Scheme implementation using a bytecode interpreter")
390 (description
391 "Scheme 48 is an implementation of Scheme based on a byte-code
392 interpreter and is designed to be used as a testbed for experiments in
393 implementation techniques and as an expository tool.")
394
395 ;; Most files are BSD-3; see COPYING for the few exceptions.
396 (license bsd-3)))
397
398 (define-public racket
399 (package
400 (name "racket")
401 (version "7.8") ;; Note: Remember to also update racket-minimal!
402 (source (origin
403 (method url-fetch)
404 (uri (list (string-append "http://mirror.racket-lang.org/installers/"
405 version "/racket-" version "-src.tgz")
406 (string-append
407 "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
408 version "/racket-" version "-src.tgz")))
409 (sha256
410 (base32
411 "19z3dayybcra277s4gk2mppalwawd93f2b16xyrb6d7rbbfz7j9j"))
412 (patches (search-patches
413 "racket-store-checksum-override.patch"))))
414 (build-system gnu-build-system)
415 (arguments
416 '(#:phases
417 (modify-phases %standard-phases
418 (add-before 'configure 'pre-configure-minimal
419 (lambda* (#:key inputs #:allow-other-keys)
420 ;; Patch dynamically loaded libraries with their absolute paths.
421 (let* ((library-path (search-path-as-string->list
422 (getenv "LIBRARY_PATH")))
423 (find-so (lambda (soname)
424 (search-path
425 library-path
426 (format #f "~a.so" soname)))))
427 (substitute* "collects/db/private/sqlite3/ffi.rkt"
428 (("ffi-lib sqlite-so")
429 (format #f "ffi-lib \"~a\"" (find-so "libsqlite3"))))
430 (substitute* "collects/openssl/libssl.rkt"
431 (("ffi-lib libssl-so")
432 (format #f "ffi-lib \"~a\"" (find-so "libssl"))))
433 (substitute* "collects/openssl/libcrypto.rkt"
434 (("ffi-lib libcrypto-so")
435 (format #f "ffi-lib \"~a\"" (find-so "libcrypto")))))
436 (chdir "src")
437 #t))
438 (add-before 'pre-configure-minimal 'pre-configure
439 (lambda* (#:key inputs #:allow-other-keys)
440 ;; Patch dynamically loaded libraries with their absolute paths.
441 (let* ((library-path (search-path-as-string->list
442 (getenv "LIBRARY_PATH")))
443 (find-so (lambda (soname)
444 (search-path
445 library-path
446 (format #f "~a.so" soname))))
447 (patch-ffi-libs (lambda (file libs)
448 (for-each
449 (lambda (lib)
450 (substitute* file
451 (((format #f "\"~a\"" lib))
452 (format #f "\"~a\"" (find-so lib)))))
453 libs))))
454 (substitute* "share/pkgs/math-lib/math/private/bigfloat/gmp.rkt"
455 (("ffi-lib libgmp-so")
456 (format #f "ffi-lib \"~a\"" (find-so "libgmp"))))
457 (substitute* "share/pkgs/math-lib/math/private/bigfloat/mpfr.rkt"
458 (("ffi-lib libmpfr-so")
459 (format #f "ffi-lib \"~a\"" (find-so "libmpfr"))))
460 (substitute* "share/pkgs/readline-lib/readline/rktrl.rkt"
461 (("\\(getenv \"PLT_READLINE_LIB\"\\)")
462 (format #f "\"~a\"" (find-so "libedit"))))
463 (for-each
464 (lambda (x) (apply patch-ffi-libs x))
465 '(("share/pkgs/draw-lib/racket/draw/unsafe/cairo-lib.rkt"
466 ("libfontconfig" "libcairo"))
467 ("share/pkgs/draw-lib/racket/draw/unsafe/glib.rkt"
468 ("libglib-2.0" "libgmodule-2.0" "libgobject-2.0"))
469 ("share/pkgs/draw-lib/racket/draw/unsafe/jpeg.rkt"
470 ("libjpeg"))
471 ("share/pkgs/draw-lib/racket/draw/unsafe/pango.rkt"
472 ("libpango-1.0" "libpangocairo-1.0"))
473 ("share/pkgs/draw-lib/racket/draw/unsafe/png.rkt"
474 ("libpng"))
475 ("share/pkgs/db-lib/db/private/odbc/ffi.rkt"
476 ("libodbc"))
477 ("share/pkgs/gui-lib/mred/private/wx/gtk/x11.rkt"
478 ("libX11"))
479 ("share/pkgs/gui-lib/mred/private/wx/gtk/gsettings.rkt"
480 ("libgio-2.0"))
481 ("share/pkgs/gui-lib/mred/private/wx/gtk/gtk3.rkt"
482 ("libgdk-3" "libgtk-3"))
483 ("share/pkgs/gui-lib/mred/private/wx/gtk/unique.rkt"
484 ("libunique-1.0"))
485 ("share/pkgs/gui-lib/mred/private/wx/gtk/utils.rkt"
486 ("libgdk-x11-2.0" "libgdk_pixbuf-2.0" "libgtk-x11-2.0"))
487 ("share/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt"
488 ("libGL"))
489 ("share/pkgs/sgl/gl.rkt"
490 ("libGL" "libGLU")))))
491 #t))
492 (add-after 'unpack 'patch-/bin/sh
493 (lambda _
494 (substitute* "collects/racket/system.rkt"
495 (("/bin/sh") (which "sh")))
496 #t)))
497 ;; XXX: how to run them?
498 #:tests? #f))
499 (inputs
500 `(("libffi" ,libffi)
501 ;; Hardcode dynamically loaded libraries for better functionality.
502 ;; sqlite and libraries for `racket/draw' are needed to build the doc.
503 ("cairo" ,cairo)
504 ("fontconfig" ,fontconfig)
505 ("glib" ,glib)
506 ("glu" ,glu)
507 ("gmp" ,gmp)
508 ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg
509 ("libjpeg" ,libjpeg-turbo)
510 ("libpng" ,libpng)
511 ("libx11" ,libx11)
512 ("mesa" ,mesa)
513 ("mpfr" ,mpfr)
514 ("openssl" ,openssl)
515 ("pango" ,pango)
516 ("sqlite" ,sqlite)
517 ("unixodbc" ,unixodbc)
518 ("libedit" ,libedit)))
519 (home-page "https://racket-lang.org")
520 (synopsis "Implementation of Scheme and related languages")
521 (description
522 "Racket is an implementation of the Scheme programming language (R5RS and
523 R6RS) and related languages, such as Typed Racket. It features a compiler and
524 a virtual machine with just-in-time native compilation, as well as a large set
525 of libraries.")
526 ;; https://download.racket-lang.org/license.html
527 (license (list lgpl3+ asl2.0 expat))))
528
529 (define-public racket-minimal
530 (package
531 (inherit racket)
532 (name "racket-minimal")
533 (version (package-version racket))
534 (source (origin
535 (method url-fetch)
536 (uri (list (string-append "http://mirror.racket-lang.org/installers/"
537 version "/racket-minimal-" version "-src.tgz")
538 (string-append
539 "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
540 version "/racket-minimal-" version "-src.tgz")))
541 (sha256
542 (base32
543 "0bbglf9vfacpm2hn3lskhvc8cpg6z088fbnzpqsn17z8qdk8yvb3"))
544 (patches (search-patches
545 "racket-store-checksum-override.patch"))))
546 (synopsis "Racket without bundled packages such as Dr. Racket")
547 (arguments
548 (substitute-keyword-arguments (package-arguments racket)
549 ((#:phases phases)
550 `(modify-phases ,phases
551 ;; Delete fix that applies to files not included in the minimal package.
552 (delete 'pre-configure)))))
553 (inputs
554 `(("libffi" ,libffi)
555 ("openssl" ,openssl)
556 ("sqlite" ,sqlite)))
557 (description
558 "Racket is an implementation of the Scheme programming language (R5RS and
559 R6RS) and related languages, such as Typed Racket. It features a compiler and
560 a virtual machine with just-in-time native compilation, as well as a large set
561 of libraries.
562
563 In this minimal package, the essential package racket-libs is included, as
564 well as libraries that live in collections. In particular, @command{raco} and
565 the @code{pkg} library are still bundled.")))
566
567 (define-public gambit-c
568 (package
569 (name "gambit-c")
570 (version "4.9.3")
571 (source
572 (origin
573 (method url-fetch)
574 (uri (string-append
575 "http://www.iro.umontreal.ca/~gambit/download/gambit/v"
576 (version-major+minor version) "/source/gambit-v"
577 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
578 ".tgz"))
579 (sha256
580 (base32 "1p6172vhcrlpjgia6hsks1w4fl8rdyjf9xjh14wxfkv7dnx8a5hk"))))
581 (build-system gnu-build-system)
582 (arguments
583 '(#:configure-flags
584 ;; According to the ./configure script, this makes the build slower and
585 ;; use >= 1 GB memory, but makes Gambit much faster.
586 '("--enable-single-host")))
587 (home-page "http://dynamo.iro.umontreal.ca/wiki/index.php/Main_Page")
588 (synopsis "Efficient Scheme interpreter and compiler")
589 (description
590 "Gambit consists of two main programs: gsi, the Gambit Scheme
591 interpreter, and gsc, the Gambit Scheme compiler. The interpreter contains
592 the complete execution and debugging environment. The compiler is the
593 interpreter extended with the capability of generating executable files. The
594 compiler can produce standalone executables or compiled modules which can be
595 loaded at run time. Interpreted code and compiled code can be freely
596 mixed.")
597 ;; Dual license.
598 (license (list lgpl2.1+ asl2.0))))
599
600 (define-public chibi-scheme
601 (package
602 (name "chibi-scheme")
603 (version "0.9")
604 (home-page "https://github.com/ashinn/chibi-scheme")
605 (source
606 (origin
607 (method git-fetch)
608 (uri (git-reference (url home-page) (commit version)))
609 (file-name (git-file-name name version))
610 (sha256
611 (base32
612 "1lnap41gl9vg82h557f4rlr69jgmd2gh0iqs6cxm77d39kv1scb8"))))
613 (build-system gnu-build-system)
614 (arguments
615 `(#:phases (modify-phases %standard-phases
616 (delete 'configure)
617 (add-before 'build 'set-cc
618 (lambda _
619 (setenv "CC" "gcc"))))
620 #:make-flags (let ((out (assoc-ref %outputs "out")))
621 (list (string-append "PREFIX=" out)
622 (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))
623 #:test-target "test"))
624 (synopsis "Small embeddable Scheme implementation")
625 (description
626 "Chibi-Scheme is a very small library with no external dependencies
627 intended for use as an extension and scripting language in C programs. In
628 addition to support for lightweight VM-based threads, each VM itself runs in
629 an isolated heap allowing multiple VMs to run simultaneously in different OS
630 threads.")
631 (license bsd-3)))
632
633 (define-public sicp
634 (let ((commit "225c172f9b859902a64a3c5dd5e1f9ac1a7382de"))
635 (package
636 (name "sicp")
637 (version (string-append "20170703-1." (string-take commit 7)))
638 (source (origin
639 (method git-fetch)
640 (uri (git-reference
641 (url "https://github.com/sarabander/sicp")
642 (commit commit)))
643 (sha256
644 (base32
645 "0bhdrdc1mgdjdsg4jksq9z6x129f3346jbf3zir2a0dfmsj6m10n"))
646 (file-name (string-append name "-" version "-checkout"))))
647 (build-system trivial-build-system)
648 (native-inputs `(("gzip" ,gzip)
649 ("source" ,source)
650 ("texinfo" ,texinfo)))
651 (arguments
652 `(#:modules ((guix build utils))
653 #:builder
654 (begin
655 (use-modules (guix build utils)
656 (srfi srfi-26))
657 (let ((gzip (assoc-ref %build-inputs "gzip"))
658 (source (assoc-ref %build-inputs "source"))
659 (texinfo (assoc-ref %build-inputs "texinfo"))
660 (html-dir (string-append %output "/share/doc/" ,name "/html"))
661 (info-dir (string-append %output "/share/info")))
662 (copy-recursively (string-append source "/html") html-dir)
663 (setenv "PATH" (string-append gzip "/bin"
664 ":" texinfo "/bin"))
665 (mkdir-p info-dir)
666 (invoke "makeinfo" "--output"
667 (string-append info-dir "/sicp.info")
668 (string-append source "/sicp-pocket.texi"))
669 (for-each (cut invoke "gzip" "-9n" <>)
670 (find-files info-dir))
671 #t))))
672 (home-page "https://sarabander.github.io/sicp")
673 (synopsis "Structure and Interpretation of Computer Programs")
674 (description "Structure and Interpretation of Computer Programs (SICP) is
675 a textbook aiming to teach the principles of computer programming.
676
677 Using Scheme, a dialect of the Lisp programming language, the book explains
678 core computer science concepts such as abstraction in programming,
679 metalinguistic abstraction, recursion, interpreters, and modular programming.")
680 (license cc-by-sa4.0))))
681
682 (define-public scheme48-rx
683 (let* ((commit "dd9037f6f9ea01019390614f6b126b7dd293798d")
684 (revision "2"))
685 (package
686 (name "scheme48-rx")
687 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
688 (source
689 (origin
690 (method git-fetch)
691 (uri (git-reference
692 (url "https://github.com/scheme/rx")
693 (commit commit)))
694 (sha256
695 (base32
696 "1bvriavxw5kf2izjbil3999vr983vkk2xplfpinafr86m40b2cci"))
697 (file-name (string-append name "-" version "-checkout"))))
698 (build-system trivial-build-system)
699 (arguments
700 `(#:modules ((guix build utils))
701 #:builder
702 (begin
703 (use-modules (guix build utils))
704 (let ((share (string-append %output
705 "/share/scheme48-"
706 ,(package-version scheme48)
707 "/rx")))
708 (chdir (assoc-ref %build-inputs "source"))
709 (mkdir-p share)
710 (copy-recursively "." share)
711 #t))))
712 (native-inputs
713 `(("source" ,source)
714 ("scheme48" ,scheme48)))
715 (home-page "https://github.com/scheme/rx/")
716 (synopsis "SRE String pattern-matching library for scheme48")
717 (description
718 "String pattern-matching library for scheme48 based on the SRE
719 regular-expression notation.")
720 (license bsd-3))))
721
722 (define-public slib
723 (package
724 (name "slib")
725 (version "3b5")
726 (source (origin
727 (method url-fetch)
728 (uri (string-append "http://groups.csail.mit.edu/mac/ftpdir/scm/slib-"
729 version ".zip"))
730 (sha256
731 (base32
732 "0q0p2d53p8qw2592yknzgy2y1p5a9k7ppjx0cfrbvk6242c4mdpq"))))
733 (build-system gnu-build-system)
734 (arguments
735 `(#:tests? #f ; There is no check target.
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'install 'remove-bin-share
739 (lambda* (#:key inputs outputs #:allow-other-keys)
740 (delete-file-recursively
741 (string-append (assoc-ref outputs "out") "/bin"))
742 #t))
743 (replace 'configure
744 (lambda* (#:key inputs outputs #:allow-other-keys)
745 (invoke "./configure"
746 (string-append "--prefix="
747 (assoc-ref outputs "out"))))))))
748 (native-inputs `(("unzip" ,unzip)
749 ("texinfo" ,texinfo)))
750 (home-page "https://people.csail.mit.edu/jaffer/SLIB.html")
751 (synopsis "Compatibility and utility library for Scheme")
752 (description "SLIB is a portable Scheme library providing compatibility and
753 utility functions for all standard Scheme implementations.")
754 (license (non-copyleft
755 "http://people.csail.mit.edu/jaffer/SLIB_COPYING.txt"
756 "Or see COPYING in the distribution."))))
757
758 (define-public scm
759 (package
760 (name "scm")
761 (version "5f3")
762 (source (origin
763 (method url-fetch)
764 (uri (string-append
765 "http://groups.csail.mit.edu/mac/ftpdir/scm/scm-"
766 version ".zip"))
767 (sha256
768 (base32
769 "1jxxlhmgal26mpcl97kz37djkn97rfy9h5pvw0hah6f3f6w49j97"))))
770 (build-system gnu-build-system)
771 (arguments
772 `(#:phases
773 (modify-phases %standard-phases
774 (replace 'configure
775 (lambda* (#:key inputs outputs #:allow-other-keys)
776 (invoke "./configure"
777 (string-append "--prefix="
778 (assoc-ref outputs "out")))))
779 (add-before 'build 'pre-build
780 (lambda* (#:key inputs #:allow-other-keys)
781 (substitute* "Makefile"
782 (("ginstall-info") "install-info"))
783 #t))
784 (replace 'build
785 (lambda* (#:key inputs outputs #:allow-other-keys)
786 (setenv "SCHEME_LIBRARY_PATH"
787 (string-append (assoc-ref inputs "slib")
788 "/lib/slib/"))
789 (invoke "make" "scmlit" "CC=gcc")
790 (invoke "make" "all")))
791 (add-after 'install 'post-install
792 (lambda* (#:key inputs outputs #:allow-other-keys)
793 (let* ((out (assoc-ref outputs "out"))
794 (req (string-append out "/lib/scm/require.scm")))
795 (delete-file req)
796 (format (open req (logior O_WRONLY O_CREAT))
797 "(define (library-vicinity) ~s)\n"
798 (string-append (assoc-ref inputs "slib")
799 "/lib/slib/"))
800
801 ;; We must generate the slibcat file.
802 (invoke (string-append out "/bin/scm")
803 "-br" "new-catalog")))))))
804 (inputs `(("slib" ,slib)))
805 (native-inputs `(("unzip" ,unzip)
806 ("texinfo" ,texinfo)))
807 (home-page "https://people.csail.mit.edu/jaffer/SCM")
808 (synopsis "Scheme implementation conforming to R5RS and IEEE P1178")
809 (description "GNU SCM is an implementation of Scheme. This
810 implementation includes Hobbit, a Scheme-to-C compiler, which can
811 generate C files whose binaries can be dynamically or statically
812 linked with a SCM executable.")
813 (license lgpl3+)))
814
815 (define-public tinyscheme
816 (package
817 (name "tinyscheme")
818 (version "1.41")
819 (source (origin
820 (method url-fetch)
821 (uri (string-append "mirror://sourceforge/" name "/" name "/"
822 name "-" version "/" name "-" version ".zip"))
823 (sha256
824 (base32
825 "0yqma4jrjgj95f3hf30h542x97n8ah234n19yklbqq0phfsa08wf"))))
826 (build-system gnu-build-system)
827 (native-inputs
828 `(("unzip" ,unzip)))
829 (arguments
830 `(#:phases
831 (modify-phases %standard-phases
832 (replace 'unpack
833 (lambda* (#:key source #:allow-other-keys)
834 (invoke "unzip" source)
835 (chdir (string-append ,name "-" ,version))
836 #t))
837 (add-after 'unpack 'set-scm-directory
838 ;; Hard-code ‘our’ init.scm instead of looking in the current
839 ;; working directory, so invoking ‘scheme’ just works.
840 (lambda* (#:key outputs #:allow-other-keys)
841 (let* ((out (assoc-ref outputs "out"))
842 (scm (string-append out "/share/" ,name)))
843 (substitute* "scheme.c"
844 (("init.scm" all)
845 (string-append scm "/" all)))
846 #t)))
847 (delete 'configure) ; no configure script
848 (replace 'install
849 ;; There's no ‘install’ target. Install files manually.
850 (lambda* (#:key outputs #:allow-other-keys)
851 (let* ((out (assoc-ref outputs "out"))
852 (bin (string-append out "/bin"))
853 (doc (string-append out "/share/doc/"
854 ,name "-" ,version))
855 (include (string-append out "/include"))
856 (lib (string-append out "/lib"))
857 (scm (string-append out "/share/" ,name)))
858 (install-file "scheme" bin)
859 (install-file "Manual.txt" doc)
860 (install-file "scheme.h" include)
861 (install-file "libtinyscheme.so" lib)
862 (install-file "init.scm" scm)
863 #t))))
864 #:tests? #f)) ; no tests
865 (home-page "http://tinyscheme.sourceforge.net/")
866 (synopsis "Light-weight interpreter for the Scheme programming language")
867 (description
868 "TinyScheme is a light-weight Scheme interpreter that implements as large a
869 subset of R5RS as was possible without getting very large and complicated.
870
871 It's meant to be used as an embedded scripting interpreter for other programs.
872 As such, it does not offer an Integrated Development Environment (@dfn{IDE}) or
873 extensive toolkits, although it does sport a small (and optional) top-level
874 loop.
875
876 As an embedded interpreter, it allows multiple interpreter states to coexist in
877 the same program, without any interference between them. Foreign functions in C
878 can be added and values can be defined in the Scheme environment. Being quite a
879 small program, it is easy to comprehend, get to grips with, and use.")
880 (license bsd-3))) ; there are no licence headers
881
882 (define-public stalin
883 (let ((commit "ed1c9e339c352b7a6fee40bb2a47607c3466f0be"))
884 ;; FIXME: The Stalin "source" contains C code generated by itself:
885 ;; 'stalin-AMD64.c', etc.
886 (package
887 (name "stalin")
888 (version "0.11")
889 (source (origin
890 ;; Use Pearlmutter's upstream branch with AMD64 patches
891 ;; applied. Saves us from including those 20M! patches
892 ;; in Guix. For more info, see:
893 ;; <ftp.ecn.purdue.edu/qobi/stalin-0.11-amd64-patches.tgz>
894 (method git-fetch)
895 (uri (git-reference
896 (url "https://github.com/barak/stalin")
897 (commit commit)))
898 (file-name (string-append name "-" version "-checkout"))
899 (sha256
900 (base32
901 "15a5gxj9v7jqlgkg0543gdflw0rbrir7fj5zgifnb33m074wiyhn"))
902 (modules '((guix build utils)))
903 (snippet
904 ;; remove gc libs from build, we have them as input
905 '(begin
906 (delete-file "gc6.8.tar.gz")
907 (delete-file-recursively "benchmarks")
908 (substitute* "build"
909 ((".*gc6.8.*") "")
910 ((" cd \\.\\.") "")
911 ((".*B include/libgc.a") "")
912 ((".*make.*") ""))
913 #t))))
914 (build-system gnu-build-system)
915 (arguments
916 `(#:make-flags (list "ARCH_OPTS=-freg-struct-return")
917 #:phases
918 (modify-phases %standard-phases
919 (replace 'configure
920 (lambda* (#:key outputs #:allow-other-keys)
921 (let* ((out (assoc-ref outputs "out"))
922 (include-out (string-append out "/include")))
923 (invoke "./build")
924 (for-each (lambda (fname)
925 (install-file fname include-out))
926 (find-files "include"))
927 (substitute* "makefile"
928 (("\\./include") include-out))
929 (substitute* "post-make"
930 (("`pwd`") out))
931 #t)))
932 (delete 'check)
933 (replace 'install
934 (lambda* (#:key outputs #:allow-other-keys)
935 (let ((out (assoc-ref outputs "out")))
936 (install-file "stalin.1"
937 (string-append out "/share/man/man1"))
938 (install-file "stalin"
939 (string-append out "/bin"))
940 #t))))))
941 (inputs
942 `(("libx11" ,libx11)))
943 (propagated-inputs
944 `(("libgc" ,libgc)))
945 (supported-systems '("x86_64-linux"))
946 (home-page "https://engineering.purdue.edu/~qobi/papers/fdlcc.pdf")
947 (synopsis "Brutally efficient Scheme compiler")
948 (description
949 "Stalin is an aggressively optimizing whole-program compiler
950 for Scheme that does polyvariant interprocedural flow analysis,
951 flow-directed interprocedural escape analysis, flow-directed
952 lightweight CPS conversion, flow-directed lightweight closure
953 conversion, flow-directed interprocedural lifetime analysis, automatic
954 in-lining, unboxing, and flow-directed program-specific and
955 program-point-specific low-level representation selection and code
956 generation.")
957 (license gpl2+))))
958
959 (define-public femtolisp
960 (let ((commit "ec7601076a976f845bc05ad6bd3ed5b8cde58a97")
961 (revision "2"))
962 (package
963 (name "femtolisp")
964 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
965 (source (origin
966 (method git-fetch)
967 (uri (git-reference
968 (url "https://github.com/JeffBezanson/femtolisp")
969 (commit commit)))
970 (file-name (string-append name "-" version "-checkout"))
971 (sha256
972 (base32
973 "1fcyiqlqn27nd4wxi27km8mhmlzpzzsxzpwsl1bxbmhraq468njw"))))
974 ;; See "utils.h" for supported systems. Upstream bug:
975 ;; https://github.com/JeffBezanson/femtolisp/issues/25
976 (supported-systems
977 (fold delete %supported-systems
978 '("armhf-linux" "mips64el-linux" "aarch64-linux")))
979 (build-system gnu-build-system)
980 (arguments
981 `(#:make-flags '("CC=gcc" "release")
982 #:test-target "test"
983 #:phases
984 (modify-phases %standard-phases
985 (delete 'bootstrap)
986 (delete 'configure) ; No configure script
987 (replace 'install ; Makefile has no 'install phase
988 (lambda* (#:key outputs #:allow-other-keys)
989 (let* ((out (assoc-ref outputs "out"))
990 (bin (string-append out "/bin")))
991 (install-file "flisp" bin)
992 #t)))
993 ;; The flisp binary is now available, run bootstrap to
994 ;; generate flisp.boot and afterwards runs make test.
995 (add-after 'install 'bootstrap-gen-and-test
996 (lambda* (#:key outputs #:allow-other-keys)
997 (let* ((out (assoc-ref outputs "out"))
998 (bin (string-append out "/bin")))
999 (invoke "./bootstrap.sh")
1000 (install-file "flisp.boot" bin)
1001 #t))))))
1002 (synopsis "Scheme-like lisp implementation")
1003 (description
1004 "@code{femtolisp} is a scheme-like lisp implementation with a
1005 simple, elegant Scheme dialect. It is a lisp-1 with lexical scope.
1006 The core is 12 builtin special forms and 33 builtin functions.")
1007 (home-page "https://github.com/JeffBezanson/femtolisp")
1008 (license bsd-3))))
1009
1010 (define-public gauche
1011 (package
1012 (name "gauche")
1013 (version "0.9.9")
1014 (home-page "https://practical-scheme.net/gauche/index.html")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (string-append
1019 "mirror://sourceforge/gauche/Gauche/Gauche-"
1020 version ".tgz"))
1021 (sha256
1022 (base32 "1yzpszhw52vkpr65r5d4khf3489mnnvnw58dd2wsvvx7499k5aac"))
1023 (modules '((guix build utils)))
1024 (snippet '(begin
1025 ;; Remove libatomic-ops.
1026 (delete-file-recursively "gc/libatomic_ops")
1027 #t))))
1028 (build-system gnu-build-system)
1029 (inputs
1030 `(("libatomic-ops" ,libatomic-ops)
1031 ("zlib" ,zlib)))
1032 (native-inputs
1033 `(("texinfo" ,texinfo)
1034 ("openssl" ,openssl) ; needed for tests
1035 ("pkg-config" ,pkg-config))) ; needed to find external libatomic-ops
1036 (arguments
1037 `(#:phases
1038 (modify-phases %standard-phases
1039 (add-after 'unpack 'patch-/bin/sh
1040 ;; Needed only for tests.
1041 (lambda _
1042 (substitute* '("configure"
1043 "test/www.scm"
1044 "ext/tls/test.scm"
1045 "gc/configure"
1046 "lib/gauche/configure.scm"
1047 "lib/gauche/package/util.scm"
1048 "lib/gauche/process.scm")
1049 (("/bin/sh") (which "sh")))
1050 #t))
1051 (add-after 'build 'build-doc
1052 (lambda _
1053 (with-directory-excursion "doc"
1054 (invoke "make" "info"))
1055 #t))
1056 (add-before 'check 'patch-normalize-test
1057 ;; Neutralize sys-normalize-pathname test as it relies on
1058 ;; the home directory; (setenv "HOME" xx) isn't enough).
1059 (lambda _
1060 (substitute* "test/system.scm"
1061 (("~/abc") "//abc"))
1062 #t))
1063 (add-before 'check 'patch-network-tests
1064 ;; Remove net checks.
1065 (lambda _
1066 (substitute* "ext/Makefile"
1067 (("binary net termios") "binary termios"))
1068 #t))
1069 (add-after 'install 'install-docs
1070 (lambda _
1071 (with-directory-excursion "doc"
1072 (invoke "make" "install"))
1073 #t)))))
1074 (synopsis "Scheme scripting engine")
1075 (description "Gauche is a R7RS Scheme scripting engine aiming at being a
1076 handy tool that helps programmers and system administrators to write small to
1077 large scripts quickly. Quick startup, built-in system interface, native
1078 multilingual support are some of the goals. Gauche comes with a package
1079 manager/installer @code{gauche-package} which can download, compile, install
1080 and list gauche extension packages.")
1081 (license bsd-3)))
1082
1083 (define-public gerbil
1084 (package
1085 (name "gerbil")
1086 (version "0.16")
1087 (source
1088 (origin
1089 (method git-fetch)
1090 (uri (git-reference
1091 (url "https://github.com/vyzo/gerbil")
1092 (commit (string-append "v" version))))
1093 (file-name (git-file-name name version))
1094 (sha256
1095 (base32 "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f"))))
1096 (arguments
1097 `(#:phases
1098 (modify-phases %standard-phases
1099 (delete 'bootstrap)
1100 (add-before 'configure 'chdir
1101 (lambda _
1102 (chdir "src")
1103 #t))
1104 (replace 'configure
1105 (lambda* (#:key outputs inputs #:allow-other-keys)
1106 (invoke "chmod" "755" "-R" ".")
1107 ;; Otherwise fails when editing an r--r--r-- file.
1108 (invoke "gsi-script" "configure"
1109 "--prefix" (assoc-ref outputs "out")
1110 "--with-gambit" (assoc-ref inputs "gambit-c"))))
1111 (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
1112 (lambda _
1113 ;; Some .ss files refer to gxi using /usr/bin/env gxi
1114 ;; and 'patch-generated-file-shebangs can't fix that
1115 ;; because gxi has not been compiled yet.
1116 ;; We know where gxi is going to end up so we
1117 ;; Doctor Who our fix here before the problem
1118 ;; happens towards the end of the build.sh script.
1119 (let ((abs-srcdir (getcwd)))
1120 (for-each
1121 (lambda (f)
1122 (substitute* f
1123 (("#!/usr/bin/env gxi")
1124 (string-append "#!" abs-srcdir "/../bin/gxi"))))
1125 '("./gerbil/gxc"
1126 "./lang/build.ss"
1127 "./misc/http-perf/build.ss"
1128 "./misc/rpc-perf/build.ss"
1129 "./misc/scripts/docsnarf.ss"
1130 "./misc/scripts/docstub.ss"
1131 "./misc/scripts/docsyms.ss"
1132 "./r7rs-large/build.ss"
1133 "./release.ss"
1134 "./std/build.ss"
1135 "./std/run-tests.ss"
1136 "./std/web/fastcgi-test.ss"
1137 "./std/web/rack-test.ss"
1138 "./tools/build.ss"
1139 "./tutorial/httpd/build.ss"
1140 "./tutorial/kvstore/build.ss"
1141 "./tutorial/lang/build.ss"
1142 "./tutorial/proxy/build-static.ss"
1143 "./tutorial/proxy/build.ss")))
1144 #t))
1145 (replace
1146 'build
1147 (lambda*
1148 (#:key inputs #:allow-other-keys)
1149 (setenv "HOME" (getcwd))
1150 (invoke
1151 ;; The build script needs a tty or it'll crash on an ioctl
1152 ;; trying to find the width of the terminal it's running on.
1153 ;; Calling in script prevents that.
1154 "script"
1155 "-qefc"
1156 "./build.sh")))
1157 (delete 'check)
1158 (replace 'install
1159 (lambda* (#:key outputs #:allow-other-keys)
1160 (let* ((out (assoc-ref outputs "out"))
1161 (bin (string-append out "/bin"))
1162 (lib (string-append out "/lib")))
1163 (mkdir-p bin)
1164 (mkdir-p lib)
1165 (copy-recursively "../bin" bin)
1166 (copy-recursively "../lib" lib)))))))
1167 (native-inputs
1168 `(("coreutils" ,coreutils)
1169 ("util-linux" ,util-linux)))
1170 (propagated-inputs
1171 `(("gambit-c" ,gambit-c)
1172 ("zlib" ,zlib)
1173 ("openssl" ,openssl)
1174 ("sqlite" ,sqlite)))
1175 (build-system gnu-build-system)
1176 (synopsis "Meta-dialect of Scheme with post-modern features")
1177 (description "Gerbil is an opinionated dialect of Scheme designed for Systems
1178 Programming, with a state of the art macro and module system on top of the Gambit
1179 runtime. The macro system is based on quote-syntax, and provides the full meta-syntactic
1180 tower with a native implementation of syntax-case. It also provides a full-blown module
1181 system, similar to PLT Scheme's (sorry, Racket) modules. The main difference from Racket
1182 is that Gerbil modules are single instantiation, supporting high performance ahead of
1183 time compilation and compiled macros.")
1184 (home-page "https://cons.io")
1185 (license `(,lgpl2.1 ,asl2.0))))