Commit | Line | Data |
---|---|---|
e117772d | 1 | ;;; GNU Guix --- Functional package management for GNU |
63e8bb12 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
07f4aef0 | 3 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> |
549f9512 | 4 | ;;; Copyright © 2015, 2016 Federico Beffa <beffa@fbengineering.ch> |
d0d94110 | 5 | ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> |
5c4d98ab | 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
b9b447be | 7 | ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> |
8a0c2552 | 8 | ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net> |
07ef08a7 | 9 | ;;; Copyright © 2017 John Darrington <jmd@gnu.org> |
e117772d LC |
10 | ;;; |
11 | ;;; This file is part of GNU Guix. | |
12 | ;;; | |
13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
14 | ;;; under the terms of the GNU General Public License as published by | |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
18 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
25 | ||
1ffa7090 | 26 | (define-module (gnu packages scheme) |
59a43334 | 27 | #:use-module (gnu packages) |
bc73a843 | 28 | #:use-module ((guix licenses) |
07ef08a7 JD |
29 | #:select (gpl2+ lgpl2.0+ lgpl2.1+ lgpl3+ asl2.0 bsd-3 |
30 | cc-by-sa4.0 non-copyleft)) | |
e117772d LC |
31 | #:use-module (guix packages) |
32 | #:use-module (guix download) | |
b9b447be | 33 | #:use-module (guix git-download) |
07f4aef0 | 34 | #:use-module (guix utils) |
e117772d | 35 | #:use-module (guix build-system gnu) |
b9b447be | 36 | #:use-module (guix build-system trivial) |
549f9512 | 37 | #:use-module (gnu packages compression) |
1ffa7090 LC |
38 | #:use-module (gnu packages m4) |
39 | #:use-module (gnu packages multiprecision) | |
549f9512 | 40 | #:use-module (gnu packages ncurses) |
d3206af6 | 41 | #:use-module (gnu packages databases) |
1ffa7090 | 42 | #:use-module (gnu packages emacs) |
549f9512 FB |
43 | #:use-module (gnu packages ghostscript) |
44 | #:use-module (gnu packages netpbm) | |
1ffa7090 | 45 | #:use-module (gnu packages texinfo) |
8f9ac901 | 46 | #:use-module (gnu packages tex) |
ce0614dd | 47 | #:use-module (gnu packages base) |
b9b447be | 48 | #:use-module (gnu packages compression) |
cf53ecf5 LC |
49 | #:use-module (gnu packages pkg-config) |
50 | #:use-module (gnu packages avahi) | |
51 | #:use-module (gnu packages libphidget) | |
ffc13e75 | 52 | #:use-module (gnu packages gcc) |
30645251 | 53 | #:use-module (gnu packages glib) |
9d3c4dae | 54 | #:use-module (gnu packages gtk) |
30645251 | 55 | #:use-module (gnu packages libffi) |
d3206af6 | 56 | #:use-module (gnu packages fontutils) |
e55354b8 | 57 | #:use-module (gnu packages image) |
bc11c72c | 58 | #:use-module (gnu packages xorg) |
782170c4 SB |
59 | #:use-module (gnu packages tls) |
60 | #:use-module (gnu packages gl) | |
07ef08a7 | 61 | #:use-module (gnu packages zip) |
e117772d LC |
62 | #:use-module (ice-9 match)) |
63 | ||
a0efb39a | 64 | (define (mit-scheme-source-directory system version) |
ecb26c10 AE |
65 | (string-append "mit-scheme-" |
66 | (if (or (string-prefix? "x86_64" system) | |
a0efb39a | 67 | (string-prefix? "i686" system)) |
ecb26c10 AE |
68 | "" |
69 | "c-") | |
70 | version)) | |
71 | ||
e117772d LC |
72 | (define-public mit-scheme |
73 | (package | |
74 | (name "mit-scheme") | |
6c4a2884 | 75 | (version "9.2") |
e117772d | 76 | (source #f) ; see below |
f163c290 | 77 | (outputs '("out" "doc")) |
e117772d LC |
78 | (build-system gnu-build-system) |
79 | (arguments | |
80 | `(#:tests? #f ; no "check" target | |
f163c290 FB |
81 | #:modules ((guix build gnu-build-system) |
82 | (guix build utils) | |
83 | (srfi srfi-1)) | |
e117772d | 84 | #:phases |
af00e633 FB |
85 | (modify-phases %standard-phases |
86 | (replace 'unpack | |
87 | (lambda* (#:key inputs #:allow-other-keys) | |
88 | (and (zero? (system* "tar" "xzvf" | |
89 | (assoc-ref inputs "source"))) | |
90 | (chdir ,(mit-scheme-source-directory (%current-system) | |
91 | version)) | |
92 | (begin | |
93 | ;; Delete these dangling symlinks since they break | |
94 | ;; `patch-shebangs'. | |
95 | (for-each delete-file | |
96 | (append '("src/lib/shim-config.scm") | |
97 | (find-files "src/lib/lib" "\\.so$") | |
98 | (find-files "src/lib" "^liarc-") | |
99 | (find-files "src/compiler" "^make\\."))) | |
100 | (chdir "src") | |
101 | #t)))) | |
102 | (replace 'build | |
103 | (lambda* (#:key system outputs #:allow-other-keys) | |
104 | (let ((out (assoc-ref outputs "out"))) | |
105 | (if (or (string-prefix? "x86_64" system) | |
106 | (string-prefix? "i686" system)) | |
107 | (zero? (system* "make" "compile-microcode")) | |
108 | (zero? (system* "./etc/make-liarc.sh" | |
f163c290 FB |
109 | (string-append "--prefix=" out))))))) |
110 | (add-after 'configure 'configure-doc | |
111 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
112 | (with-directory-excursion "../doc" | |
113 | (let* ((out (assoc-ref outputs "out")) | |
114 | (bash (assoc-ref inputs "bash")) | |
115 | (bin/sh (string-append bash "/bin/sh"))) | |
116 | (system* bin/sh "./configure" | |
117 | (string-append "--prefix=" out) | |
118 | (string-append "SHELL=" bin/sh)) | |
119 | (substitute* '("Makefile" "make-common") | |
120 | (("/lib/mit-scheme/doc") | |
121 | (string-append "/share/doc/" ,name "-" ,version))) | |
122 | #t)))) | |
123 | (add-after 'build 'build-doc | |
124 | (lambda* _ | |
125 | (with-directory-excursion "../doc" | |
126 | (zero? (system* "make"))))) | |
127 | (add-after 'install 'install-doc | |
128 | (lambda* (#:key outputs #:allow-other-keys) | |
129 | (let* ((out (assoc-ref outputs "out")) | |
130 | (doc (assoc-ref outputs "doc")) | |
131 | (old-doc-dir (string-append out "/share/doc")) | |
132 | (new-doc/mit-scheme-dir | |
133 | (string-append doc "/share/doc/" ,name "-" ,version))) | |
134 | (with-directory-excursion "../doc" | |
135 | (for-each (lambda (target) | |
136 | (system* "make" target)) | |
137 | '("install-config" "install-info-gz" "install-man" | |
138 | "install-html" "install-pdf"))) | |
139 | (mkdir-p new-doc/mit-scheme-dir) | |
140 | (copy-recursively | |
141 | (string-append old-doc-dir "/" ,name "-" ,version) | |
142 | new-doc/mit-scheme-dir) | |
143 | (delete-file-recursively old-doc-dir) | |
144 | #t)))))) | |
145 | (native-inputs | |
146 | `(("texlive" ,texlive) | |
147 | ("texinfo" ,texinfo) | |
148 | ("m4" ,m4))) | |
e117772d | 149 | (inputs |
f163c290 | 150 | `(("libx11" ,libx11) |
e117772d LC |
151 | |
152 | ("source" | |
dd6b9a37 LC |
153 | |
154 | ;; MIT/GNU Scheme is not bootstrappable, so it's recommended to | |
155 | ;; compile from the architecture-specific tarballs, which contain | |
156 | ;; pre-built binaries. It leads to more efficient code than when | |
157 | ;; building the tarball that contains generated C code instead of | |
158 | ;; those binaries. | |
159 | ,(origin | |
160 | (method url-fetch) | |
161 | (uri (string-append "mirror://gnu/mit-scheme/stable.pkg/" | |
162 | version "/mit-scheme-" | |
dd6b9a37 | 163 | (match (%current-system) |
ecb26c10 AE |
164 | ("x86_64-linux" |
165 | (string-append version "-x86-64")) | |
166 | ("i686-linux" | |
167 | (string-append version "-i386")) | |
168 | (_ | |
169 | (string-append "c-" version))) | |
dd6b9a37 LC |
170 | ".tar.gz")) |
171 | (sha256 | |
172 | (match (%current-system) | |
173 | ("x86_64-linux" | |
174 | (base32 | |
6c4a2884 | 175 | "1skzxxhr0iq96bf0j5m7mvf3i4sppfyfa6gpqn34mwgkw1fx8274")) |
dd6b9a37 LC |
176 | ("i686-linux" |
177 | (base32 | |
6c4a2884 | 178 | "1fmlpnhf5a75db93phajh4ysbdgrgl72v45lk3kznriprl0a7jc6")) |
dd6b9a37 LC |
179 | (_ |
180 | (base32 | |
6c4a2884 | 181 | "0w5ib5vsidihb4hb6fma3sp596ykr8izagm57axvgd6lqzwicsjg")))))))) |
75af27f7 LC |
182 | |
183 | ;; Fails to build on MIPS, see <http://bugs.gnu.org/18221>. | |
7491edaf | 184 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
75af27f7 | 185 | |
e117772d | 186 | (home-page "http://www.gnu.org/software/mit-scheme/") |
a2b63d58 | 187 | (synopsis "A Scheme implementation with integrated editor and debugger") |
e117772d | 188 | (description |
79c311b8 | 189 | "GNU/MIT Scheme is an implementation of the Scheme programming |
a22dc0c4 LC |
190 | language. It provides an interpreter, a compiler and a debugger. It also |
191 | features an integrated Emacs-like editor and a large runtime library.") | |
63e8bb12 LC |
192 | (license gpl2+) |
193 | (properties '((ftp-directory . "/gnu/mit-scheme/stable.pkg"))))) | |
e117772d LC |
194 | |
195 | (define-public bigloo | |
196 | (package | |
197 | (name "bigloo") | |
7fe492e8 | 198 | (version "4.1a") |
e117772d LC |
199 | (source (origin |
200 | (method url-fetch) | |
201 | (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo" | |
202 | version ".tar.gz")) | |
203 | (sha256 | |
204 | (base32 | |
7fe492e8 | 205 | "170q7nh08n4v20xl81fxb0xcdxphqqacfa643hsa8i2ar6pki04c")) |
fc1adab1 | 206 | (patches (search-patches "bigloo-gc-shebangs.patch")))) |
e117772d LC |
207 | (build-system gnu-build-system) |
208 | (arguments | |
01eafd38 | 209 | `(#:test-target "test" |
fb685df8 EF |
210 | #:phases |
211 | (modify-phases %standard-phases | |
212 | (replace 'configure | |
213 | (lambda* (#:key outputs #:allow-other-keys) | |
e117772d | 214 | |
fb685df8 EF |
215 | (substitute* "configure" |
216 | (("^shell=.*$") | |
217 | (string-append "shell=" (which "bash") "\n"))) | |
e117772d | 218 | |
fb685df8 EF |
219 | ;; Since libgc's pthread redirects are used, we end up |
220 | ;; using libgc symbols, so we must link against it. | |
221 | ;; Reported on 2013-06-25. | |
222 | (substitute* "api/pthread/src/Makefile" | |
223 | (("^EXTRALIBS[[:blank:]]*=(.*)$" _ value) | |
224 | (string-append "EXTRALIBS = " | |
225 | (string-trim-right value) | |
226 | " -l$(GCLIB)_fth-$(RELEASE)" | |
227 | " -Wl,-rpath=" (assoc-ref outputs "out") | |
228 | "/lib/bigloo/" ,version))) | |
6e1c4093 | 229 | |
fb685df8 EF |
230 | ;; Those variables are used by libgc's `configure'. |
231 | (setenv "SHELL" (which "sh")) | |
232 | (setenv "CONFIG_SHELL" (which "sh")) | |
e858326a | 233 | |
fb685df8 EF |
234 | ;; ... but they turned out to be overridden later, so work |
235 | ;; around that. | |
236 | (substitute* (find-files "gc" "^configure-gc") | |
237 | (("sh=/bin/sh") | |
238 | (string-append "sh=" (which "sh")))) | |
e117772d | 239 | |
fb685df8 EF |
240 | ;; The `configure' script doesn't understand options |
241 | ;; of those of Autoconf. | |
242 | (let ((out (assoc-ref outputs "out"))) | |
243 | (zero? | |
244 | (system* "./configure" | |
245 | (string-append "--prefix=" out) | |
246 | ;; FIXME: Currently fails, see | |
247 | ;; <http://article.gmane.org/gmane.lisp.scheme.bigloo/6126>. | |
248 | ;; "--customgc=no" ; use our libgc | |
249 | (string-append"--mv=" (which "mv")) | |
250 | (string-append "--rm=" (which "rm")) | |
251 | (string-append "--ldflags=-Wl,-rpath=" | |
252 | (assoc-ref outputs "out") | |
253 | "/lib/bigloo/" ,version)))))) | |
254 | (add-after 'install 'install-emacs-modes | |
255 | (lambda* (#:key outputs #:allow-other-keys) | |
256 | (let* ((out (assoc-ref outputs "out")) | |
257 | (dir (string-append out "/share/emacs/site-lisp"))) | |
258 | (zero? (system* "make" "-C" "bmacs" "all" "install" | |
259 | (string-append "EMACSBRAND=emacs24") | |
260 | (string-append "EMACSDIR=" dir))))))))) | |
e117772d | 261 | (inputs |
69383a47 | 262 | `(("emacs" ,emacs) ;UDE needs the X version of Emacs |
cf53ecf5 LC |
263 | |
264 | ;; Optional APIs for which Bigloo has bindings. | |
265 | ("avahi" ,avahi) | |
266 | ("libphidget" ,libphidget))) | |
267 | (native-inputs | |
268 | `(("pkg-config" ,pkg-config))) | |
10879c4e LC |
269 | (propagated-inputs |
270 | `(("gmp" ,gmp))) ; bigloo.h refers to gmp.h | |
e117772d | 271 | (home-page "http://www-sop.inria.fr/indes/fp/Bigloo/") |
35b9e423 | 272 | (synopsis "Efficient Scheme compiler") |
e117772d LC |
273 | (description |
274 | "Bigloo is a Scheme implementation devoted to one goal: enabling | |
275 | Scheme based programming style where C(++) is usually | |
276 | required. Bigloo attempts to make Scheme practical by offering | |
277 | features usually presented by traditional programming languages | |
278 | but not offered by Scheme and functional programming. Bigloo | |
279 | compiles Scheme modules. It delivers small and fast stand alone | |
280 | binary executables. Bigloo enables full connections between | |
14e72a18 | 281 | Scheme and C programs and between Scheme and Java programs.") |
e117772d | 282 | (license gpl2+))) |
e6e82f62 LC |
283 | |
284 | (define-public hop | |
285 | (package | |
286 | (name "hop") | |
eccd1d24 | 287 | (version "2.5.1") |
e6e82f62 LC |
288 | (source (origin |
289 | (method url-fetch) | |
290 | (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-" | |
291 | version ".tar.gz")) | |
292 | (sha256 | |
293 | (base32 | |
eccd1d24 EF |
294 | "1bvp7pc71bln5yvfj87s8750c6l53wjl6f8m12v62q9926adhwys")) |
295 | (patches (search-patches "hop-linker-flags.patch")))) | |
e6e82f62 LC |
296 | (build-system gnu-build-system) |
297 | (arguments | |
8a629613 | 298 | `(#:phases |
04014de6 EF |
299 | (modify-phases %standard-phases |
300 | (replace 'configure | |
301 | (lambda* (#:key outputs #:allow-other-keys) | |
302 | (let ((out (assoc-ref outputs "out"))) | |
303 | (zero? | |
304 | (system* "./configure" | |
305 | (string-append "--prefix=" out) | |
306 | (string-append "--blflags=" | |
307 | ;; user flags completely override useful | |
308 | ;; default flags, so repeat them here. | |
309 | "-copt \\$(CPICFLAGS) -L\\$(BUILDLIBDIR) " | |
310 | "-ldopt -Wl,-rpath," out "/lib"))))))) | |
76071c70 | 311 | #:tests? #f)) ; no test suite |
a394c60a AE |
312 | (inputs `(("avahi" ,avahi) |
313 | ("bigloo" ,bigloo) | |
8a629613 | 314 | ("which" ,which))) |
e6e82f62 | 315 | (home-page "http://hop.inria.fr/") |
9e771e3b | 316 | (synopsis "Multi-tier programming language for the Web 2.0") |
e6e82f62 LC |
317 | (description |
318 | "HOP is a multi-tier programming language for the Web 2.0 and the | |
319 | so-called diffuse Web. It is designed for programming interactive web | |
320 | applications in many fields such as multimedia (web galleries, music players, | |
321 | ...), ubiquitous and house automation (SmartPhones, personal appliance), | |
322 | mashups, office (web agendas, mail clients, ...), etc.") | |
323 | (license gpl2+))) | |
8cc9e7f9 LC |
324 | |
325 | (define-public chicken | |
326 | (package | |
327 | (name "chicken") | |
359e9c42 | 328 | (version "4.12.0") |
8cc9e7f9 | 329 | (source (origin |
b9b6db45 | 330 | (method url-fetch) |
359e9c42 | 331 | (uri (string-append "https://code.call-cc.org/releases/" |
b9b6db45 | 332 | version "/chicken-" version ".tar.gz")) |
b9b6db45 KK |
333 | (sha256 |
334 | (base32 | |
359e9c42 | 335 | "12b9gaa9lqh39lj1v4wm48f6z8ww3jdkvc5bh9gqqvn6kd2wwnk0")) |
6a37872c | 336 | (patches |
359e9c42 | 337 | (search-patches "chicken-CVE-2017-6949.patch")))) |
8cc9e7f9 LC |
338 | (build-system gnu-build-system) |
339 | (arguments | |
340 | `(#:modules ((guix build gnu-build-system) | |
341 | (guix build utils) | |
342 | (srfi srfi-1)) | |
b9b6db45 | 343 | |
8cc9e7f9 LC |
344 | ;; No `configure' script; run "make check" after "make install" as |
345 | ;; prescribed by README. | |
acb38070 RW |
346 | #:phases |
347 | (modify-phases %standard-phases | |
348 | (delete 'configure) | |
349 | (delete 'check) | |
350 | (add-after 'install 'check | |
b9b6db45 | 351 | (assoc-ref %standard-phases 'check))) |
8cc9e7f9 LC |
352 | |
353 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
354 | (list "PLATFORM=linux" | |
355 | (string-append "PREFIX=" out) | |
356 | (string-append "VARDIR=" out "/var/lib"))) | |
357 | ||
358 | ;; Parallel builds are not supported, as noted in README. | |
359 | #:parallel-build? #f)) | |
360 | (home-page "http://www.call-cc.org/") | |
361 | (synopsis "R5RS Scheme implementation that compiles native code via C") | |
362 | (description | |
363 | "CHICKEN is a compiler for the Scheme programming language. CHICKEN | |
364 | produces portable and efficient C, supports almost all of the R5RS Scheme | |
2c4b49ed | 365 | language standard, and includes many enhancements and extensions.") |
8cc9e7f9 | 366 | (license bsd-3))) |
f7ce90e7 LC |
367 | |
368 | (define-public scheme48 | |
369 | (package | |
370 | (name "scheme48") | |
5c4d98ab | 371 | (version "1.9.2") |
f7ce90e7 LC |
372 | (source (origin |
373 | (method url-fetch) | |
374 | (uri (string-append "http://s48.org/" version | |
375 | "/scheme48-" version ".tgz")) | |
376 | (sha256 | |
377 | (base32 | |
5c4d98ab | 378 | "1x4xfm3lyz2piqcw1h01vbs1iq89zq7wrsfjgh3fxnlm1slj2jcw")) |
fc1adab1 | 379 | (patches (search-patches "scheme48-tests.patch")))) |
f7ce90e7 | 380 | (build-system gnu-build-system) |
f7ce90e7 LC |
381 | (home-page "http://s48.org/") |
382 | (synopsis "Scheme implementation using a bytecode interpreter") | |
383 | (description | |
384 | "Scheme 48 is an implementation of Scheme based on a byte-code | |
385 | interpreter and is designed to be used as a testbed for experiments in | |
386 | implementation techniques and as an expository tool.") | |
387 | ||
388 | ;; Most files are BSD-3; see COPYING for the few exceptions. | |
389 | (license bsd-3))) | |
30645251 LC |
390 | |
391 | (define-public racket | |
392 | (package | |
393 | (name "racket") | |
c2c84add | 394 | (version "6.6") |
30645251 LC |
395 | (source (origin |
396 | (method url-fetch) | |
d3206af6 LC |
397 | (uri (list (string-append "http://mirror.racket-lang.org/installers/" |
398 | version "/racket-" version "-src.tgz") | |
30645251 LC |
399 | (string-append |
400 | "http://mirror.informatik.uni-tuebingen.de/mirror/racket/" | |
401 | version "/racket/racket-" version "-src-unix.tgz"))) | |
402 | (sha256 | |
d3206af6 | 403 | (base32 |
c2c84add | 404 | "1kzdi1n6h6hmz8zd9k8r5a5yp2ryi4w3c2fjm1k6cqicn18cwaxz")))) |
30645251 LC |
405 | (build-system gnu-build-system) |
406 | (arguments | |
407 | '(#:phases | |
e8c6811b SB |
408 | (alist-cons-before |
409 | 'configure 'pre-configure | |
410 | (lambda* (#:key inputs #:allow-other-keys) | |
411 | ;; Patch dynamically loaded libraries with their absolute paths. | |
412 | (let* ((library-path (search-path-as-string->list | |
413 | (getenv "LIBRARY_PATH"))) | |
414 | (find-so (lambda (soname) | |
415 | (search-path | |
416 | library-path | |
417 | (format #f "~a.so" soname)))) | |
418 | (patch-ffi-libs (lambda (file libs) | |
419 | (for-each | |
420 | (lambda (lib) | |
421 | (substitute* file | |
422 | (((format #f "\"~a\"" lib)) | |
423 | (format #f "\"~a\"" (find-so lib))))) | |
424 | libs)))) | |
425 | (substitute* "collects/db/private/sqlite3/ffi.rkt" | |
426 | (("ffi-lib sqlite-so") | |
427 | (format #f "ffi-lib \"~a\"" (find-so "libsqlite3")))) | |
428 | (substitute* "collects/openssl/libssl.rkt" | |
429 | (("ffi-lib libssl-so") | |
430 | (format #f "ffi-lib \"~a\"" (find-so "libssl")))) | |
431 | (substitute* "collects/openssl/libcrypto.rkt" | |
432 | (("ffi-lib libcrypto-so") | |
433 | (format #f "ffi-lib \"~a\"" (find-so "libcrypto")))) | |
434 | (substitute* "share/pkgs/math-lib/math/private/bigfloat/gmp.rkt" | |
435 | (("ffi-lib libgmp-so") | |
436 | (format #f "ffi-lib \"~a\"" (find-so "libgmp")))) | |
437 | (substitute* "share/pkgs/math-lib/math/private/bigfloat/mpfr.rkt" | |
438 | (("ffi-lib libmpfr-so") | |
439 | (format #f "ffi-lib \"~a\"" (find-so "libmpfr")))) | |
440 | (for-each | |
441 | (lambda (x) (apply patch-ffi-libs x)) | |
442 | '(("share/pkgs/draw-lib/racket/draw/unsafe/cairo-lib.rkt" | |
443 | ("libfontconfig" "libcairo")) | |
444 | ("share/pkgs/draw-lib/racket/draw/unsafe/glib.rkt" | |
445 | ("libglib-2.0" "libgmodule-2.0" "libgobject-2.0")) | |
446 | ("share/pkgs/draw-lib/racket/draw/unsafe/jpeg.rkt" | |
447 | ("libjpeg")) | |
448 | ("share/pkgs/draw-lib/racket/draw/unsafe/pango.rkt" | |
449 | ("libpango-1.0" "libpangocairo-1.0")) | |
450 | ("share/pkgs/draw-lib/racket/draw/unsafe/png.rkt" | |
451 | ("libpng")) | |
452 | ("share/pkgs/db-lib/db/private/odbc/ffi.rkt" | |
453 | ("libodbc")) | |
454 | ("share/pkgs/gui-lib/mred/private/wx/gtk/x11.rkt" | |
455 | ("libX11")) | |
456 | ("share/pkgs/gui-lib/mred/private/wx/gtk/gsettings.rkt" | |
457 | ("libgio-2.0")) | |
458 | ("share/pkgs/gui-lib/mred/private/wx/gtk/gtk3.rkt" | |
459 | ("libgdk-3" "libgtk-3")) | |
460 | ("share/pkgs/gui-lib/mred/private/wx/gtk/unique.rkt" | |
461 | ("libunique-1.0")) | |
462 | ("share/pkgs/gui-lib/mred/private/wx/gtk/utils.rkt" | |
463 | ("libgdk-x11-2.0" "libgdk_pixbuf-2.0" "libgtk-x11-2.0")) | |
464 | ("share/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt" | |
465 | ("libGL")) | |
466 | ("share/pkgs/sgl/gl.rkt" | |
467 | ("libGL" "libGLU"))))) | |
468 | (chdir "src")) | |
469 | (alist-cons-after | |
470 | 'unpack 'patch-/bin/sh | |
471 | (lambda _ | |
472 | (substitute* "collects/racket/system.rkt" | |
473 | (("/bin/sh") (which "sh")))) | |
474 | %standard-phases)) | |
30645251 LC |
475 | #:tests? #f ; XXX: how to run them? |
476 | )) | |
782170c4 SB |
477 | (inputs |
478 | `(("libffi" ,libffi) | |
479 | ;; Hardcode dynamically loaded libraries for better functionality. | |
480 | ;; sqlite and libraries for `racket/draw' are needed to build the doc. | |
481 | ("cairo" ,cairo) | |
482 | ("fontconfig" ,fontconfig) | |
483 | ("glib" ,glib) | |
484 | ("glu" ,glu) | |
485 | ("gmp" ,gmp) | |
486 | ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg | |
487 | ("libjpeg" ,libjpeg) | |
488 | ("libpng" ,libpng) | |
489 | ("libx11" ,libx11) | |
490 | ("mesa" ,mesa) | |
491 | ("mpfr" ,mpfr) | |
492 | ("openssl" ,openssl) | |
493 | ("pango" ,pango) | |
494 | ("sqlite" ,sqlite) | |
495 | ("unixodbc" ,unixodbc))) | |
30645251 LC |
496 | (home-page "http://racket-lang.org") |
497 | (synopsis "Implementation of Scheme and related languages") | |
498 | (description | |
499 | "Racket is an implementation of the Scheme programming language (R5RS and | |
500 | R6RS) and related languages, such as Typed Racket. It features a compiler and | |
501 | a virtual machine with just-in-time native compilation, as well as a large set | |
502 | of libraries.") | |
39d0ce93 | 503 | (license lgpl2.0+))) |
07f4aef0 TUBK |
504 | |
505 | (define-public gambit-c | |
506 | (package | |
507 | (name "gambit-c") | |
9ba88890 | 508 | (version "4.8.5") |
07f4aef0 TUBK |
509 | (source |
510 | (origin | |
511 | (method url-fetch) | |
512 | (uri (string-append | |
513 | "http://www.iro.umontreal.ca/~gambit/download/gambit/v" | |
9ba88890 | 514 | (version-major+minor version) "/source/gambit-v" |
07f4aef0 TUBK |
515 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version) |
516 | ".tgz")) | |
517 | (sha256 | |
9ba88890 | 518 | (base32 "0xwmqzqvk83xyjz48vp36p5vj1415rl3pi3xq7y8i3p8s409a98b")))) |
07f4aef0 TUBK |
519 | (build-system gnu-build-system) |
520 | (arguments | |
521 | '(#:configure-flags | |
522 | ;; According to the ./configure script, this makes the build slower and | |
523 | ;; use >= 1 GB memory, but makes Gambit much faster. | |
524 | '("--enable-single-host") | |
525 | #:phases | |
27668c79 EF |
526 | (modify-phases %standard-phases |
527 | (add-before 'check 'fix-tests | |
528 | (lambda _ | |
529 | (substitute* '("tests/makefile") | |
530 | ;; '-:' is how run-time options are set. 'tl' sets some terminal | |
531 | ;; option, which makes it fail in our build environment. It | |
532 | ;; recommends using 'd-' as a solution, which sets the REPL | |
533 | ;; interaction channel to stdin/stdout. | |
534 | (("gsi -:tl") "gsi -:d-,tl")) | |
535 | #t))))) | |
07f4aef0 TUBK |
536 | (home-page "http://www.iro.umontreal.ca/~gambit/") |
537 | (synopsis "Efficient Scheme interpreter and compiler") | |
538 | (description | |
539 | "Gambit consists of two main programs: gsi, the Gambit Scheme | |
540 | interpreter, and gsc, the Gambit Scheme compiler. The interpreter contains | |
541 | the complete execution and debugging environment. The compiler is the | |
542 | interpreter extended with the capability of generating executable files. The | |
543 | compiler can produce standalone executables or compiled modules which can be | |
544 | loaded at run time. Interpreted code and compiled code can be freely | |
545 | mixed.") | |
546 | ;; Dual license. | |
547 | (license (list lgpl2.1+ asl2.0)))) | |
3e92f4f9 TUBK |
548 | |
549 | (define-public chibi-scheme | |
550 | (package | |
551 | (name "chibi-scheme") | |
51960939 | 552 | (version "0.7.3") |
3e92f4f9 TUBK |
553 | (source |
554 | (origin | |
555 | (method url-fetch) | |
51960939 TUBK |
556 | (uri (string-append "https://github.com/ashinn/chibi-scheme/archive/" |
557 | version ".tar.gz")) | |
3e92f4f9 | 558 | (sha256 |
51960939 TUBK |
559 | (base32 "16wppf4qzr0748iyp0m89gidsfgq9s6x3gw4xggym91waw4fh742")) |
560 | (file-name (string-append "chibi-scheme-" version ".tar.gz")))) | |
3e92f4f9 TUBK |
561 | (build-system gnu-build-system) |
562 | (arguments | |
4a187c55 LC |
563 | `(#:phases (modify-phases %standard-phases |
564 | (delete 'configure) | |
565 | (add-before 'build 'set-cc | |
566 | (lambda _ | |
567 | (setenv "CC" "gcc")))) | |
3e92f4f9 TUBK |
568 | #:make-flags (let ((out (assoc-ref %outputs "out"))) |
569 | (list (string-append "PREFIX=" out) | |
570 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib"))) | |
571 | #:test-target "test")) | |
50995554 | 572 | (home-page "https://github.com/ashinn/chibi-scheme") |
3e92f4f9 TUBK |
573 | (synopsis "Small embeddable Scheme implementation") |
574 | (description | |
575 | "Chibi-Scheme is a very small library with no external dependencies | |
576 | intended for use as an extension and scripting language in C programs. In | |
577 | addition to support for lightweight VM-based threads, each VM itself runs in | |
578 | an isolated heap allowing multiple VMs to run simultaneously in different OS | |
579 | threads.") | |
580 | (license bsd-3))) | |
c093f9f6 | 581 | |
c093f9f6 FB |
582 | (define-public scmutils |
583 | (let () | |
584 | (define (system-suffix) | |
585 | (cond | |
586 | ((string-prefix? "x86_64" (or (%current-target-system) | |
587 | (%current-system))) | |
588 | "x86-64") | |
589 | (else "i386"))) | |
590 | ||
591 | (package | |
592 | (name "scmutils") | |
593 | (version "20140302") | |
594 | (source | |
595 | (origin | |
95001d4b | 596 | (method url-fetch/tarbomb) |
c093f9f6 FB |
597 | (modules '((guix build utils))) |
598 | (snippet | |
599 | ;; Remove binary code | |
600 | '(delete-file-recursively "scmutils/mit-scheme")) | |
c093f9f6 FB |
601 | (uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/6946" |
602 | "/scmutils-tarballs/" name "-" version | |
603 | "-x86-64-gnu-linux.tar.gz")) | |
604 | (sha256 | |
605 | (base32 "10cnbm7nh78m5mrl1di85s29gny81jb1am9zd9f9yx725xb6dnfg")))) | |
606 | (build-system gnu-build-system) | |
607 | (inputs | |
608 | `(("mit-scheme" ,mit-scheme) | |
b8fc3622 | 609 | ("emacs" ,emacs-minimal))) |
c093f9f6 FB |
610 | (arguments |
611 | `(#:tests? #f ;; no tests-suite | |
612 | #:modules ((guix build gnu-build-system) | |
613 | (guix build utils) | |
614 | (guix build emacs-utils)) | |
615 | #:imported-modules (,@%gnu-build-system-modules | |
616 | (guix build emacs-utils)) | |
617 | #:phases | |
618 | (modify-phases %standard-phases | |
619 | (replace 'configure | |
620 | ;; No standard build procedure is used. We set the correct | |
621 | ;; runtime path in the custom build system. | |
622 | (lambda* (#:key outputs #:allow-other-keys) | |
623 | (let ((out (assoc-ref outputs "out"))) | |
624 | ;; Required to find .bci files at runtime. | |
625 | (with-directory-excursion "scmutils" | |
626 | (rename-file "src" "scmutils")) | |
627 | (substitute* "scmutils/scmutils/load.scm" | |
628 | (("/usr/local/scmutils/") | |
629 | (string-append out "/lib/mit-scheme-" | |
630 | ,(system-suffix) "/"))) | |
631 | #t))) | |
632 | (replace 'build | |
633 | ;; Compile the code and build a band. | |
634 | (lambda* (#:key outputs #:allow-other-keys) | |
635 | (let* ((out (assoc-ref outputs "out")) | |
636 | (make-img (string-append | |
637 | "echo '(load \"load\") " | |
638 | "(disk-save \"edwin-mechanics.com\")'" | |
639 | "| mit-scheme"))) | |
640 | (with-directory-excursion "scmutils/scmutils" | |
641 | (and (zero? (system "mit-scheme < compile.scm")) | |
642 | (zero? (system make-img))))))) | |
643 | (add-before 'install 'fix-directory-names | |
644 | ;; Correct directory names in the startup script. | |
645 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
646 | (let* ((out (assoc-ref outputs "out")) | |
647 | (scm-root (assoc-ref inputs "mit-scheme"))) | |
648 | (substitute* "bin/mechanics" | |
649 | (("ROOT=\"\\$\\{SCMUTILS_ROOT:-/.*\\}\"") | |
650 | (string-append | |
651 | "ROOT=\"${SCMUTILS_ROOT:-" scm-root "}\"\n" | |
652 | "LIB=\"${ROOT}/lib/mit-scheme-" | |
653 | ,(system-suffix) ":" | |
654 | out "/lib/mit-scheme-" ,(system-suffix) "\"")) | |
655 | (("EDWIN_INFO_DIRECTORY=.*\n") "") | |
656 | (("SCHEME=.*\n") | |
657 | (string-append "SCHEME=\"${ROOT}/bin/scheme " | |
658 | "--library ${LIB}\"\n")) | |
659 | (("export EDWIN_INFO_DIRECTORY") "")) | |
660 | #t))) | |
661 | (add-before 'install 'emacs-tags | |
662 | ;; Generate Emacs's tags for easy reference to source | |
663 | ;; code. | |
664 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
665 | (with-directory-excursion "scmutils/scmutils" | |
666 | (zero? (apply system* "etags" | |
667 | (find-files "." "\\.scm")))))) | |
668 | (replace 'install | |
669 | ;; Copy files to the store. | |
670 | (lambda* (#:key outputs #:allow-other-keys) | |
671 | (define* (copy-files-to-directory files dir | |
672 | #:optional (delete? #f)) | |
673 | (for-each (lambda (f) | |
674 | (copy-file f (string-append dir "/" f)) | |
675 | (when delete? (delete-file f))) | |
676 | files)) | |
677 | ||
678 | (let* ((out (assoc-ref outputs "out")) | |
679 | (bin (string-append out "/bin")) | |
680 | (doc (string-append out "/share/doc/" | |
681 | ,name "-" ,version)) | |
682 | (lib (string-append out "/lib/mit-scheme-" | |
683 | ,(system-suffix) | |
684 | "/scmutils"))) | |
685 | (for-each mkdir-p (list lib doc bin)) | |
686 | (with-directory-excursion "scmutils/scmutils" | |
687 | (copy-files-to-directory '("COPYING" "LICENSE") | |
688 | doc #t) | |
689 | (for-each delete-file (find-files "." "\\.bin")) | |
690 | (copy-files-to-directory '("edwin-mechanics.com") | |
691 | (string-append lib "/..") #t) | |
692 | (copy-recursively "." lib)) | |
693 | (with-directory-excursion "bin" | |
694 | (copy-files-to-directory (find-files ".") bin)) | |
695 | (with-directory-excursion "scmutils/manual" | |
696 | (copy-files-to-directory (find-files ".") doc)) | |
697 | #t))) | |
698 | (add-after 'install 'emacs-helpers | |
699 | ;; Add convenience Emacs commands to easily load the | |
700 | ;; Scmutils band in an MIT-Scheme buffer inside of Emacs | |
701 | ;; and to easily load code tags. | |
702 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
703 | (let* ((out (assoc-ref outputs "out")) | |
704 | (mit-root (assoc-ref inputs "mit-scheme")) | |
705 | (emacs-lisp-dir | |
706 | (string-append out "/share/emacs/site-lisp" | |
707 | "/guix.d/" ,name "-" ,version)) | |
708 | (el-file (string-append emacs-lisp-dir | |
709 | "/scmutils.el")) | |
710 | (lib-relative-path | |
711 | (string-append "/lib/mit-scheme-" | |
712 | ,(system-suffix)))) | |
713 | (mkdir-p emacs-lisp-dir) | |
714 | (call-with-output-file el-file | |
715 | (lambda (p) | |
716 | (format p | |
717 | ";;;###autoload | |
718 | (defun scmutils-load () | |
719 | (interactive) | |
720 | (require 'xscheme) | |
721 | (let ((mit-root \"~a\") | |
722 | (scmutils \"~a\")) | |
723 | (run-scheme | |
724 | (concat mit-root \"/bin/scheme --library \" | |
725 | mit-root \"~a:\" scmutils \"~a\" | |
726 | \" --band edwin-mechanics.com\" | |
727 | \" --emacs\")))) | |
728 | ||
729 | ;;;###autoload | |
730 | (defun scmutils-load-tags () | |
731 | (interactive) | |
732 | (let ((scmutils \"~a\")) | |
733 | (visit-tags-table (concat scmutils \"/TAGS\")))) | |
734 | " | |
735 | mit-root out | |
736 | lib-relative-path | |
737 | lib-relative-path | |
738 | (string-append out lib-relative-path | |
739 | "/scmutils")))) | |
aad4a48a FB |
740 | (emacs-generate-autoloads ,name emacs-lisp-dir) |
741 | (emacs-byte-compile-directory emacs-lisp-dir) | |
c093f9f6 FB |
742 | #t)))))) |
743 | (home-page | |
744 | "http://groups.csail.mit.edu/mac/users/gjs/6946/linux-install.htm") | |
745 | (synopsis "Scmutils library for MIT Scheme") | |
746 | (description "The Scmutils system is an integrated library of | |
747 | procedures, embedded in the programming language Scheme, and intended to | |
748 | support teaching and research in mathematical physics and electrical | |
749 | engineering.") | |
750 | (license gpl2+)))) | |
b9b447be JN |
751 | |
752 | (define-public sicp | |
753 | (let ((commit "5b52db566968d28a89fbbaf338d207f01cc81cac")) | |
754 | (package | |
755 | (name "sicp") | |
756 | (version (string-append "20160220-1." (string-take commit 7))) | |
757 | (source (origin | |
758 | (method git-fetch) | |
759 | (uri (git-reference | |
760 | (url "https://github.com/sarabander/sicp") | |
761 | (commit commit))) | |
762 | (sha256 | |
763 | (base32 | |
764 | "10h6h7szwlfbshwh18bnl2hvyddj5i7106l79s145l0sjjv15cxb")) | |
765 | (file-name (string-append name "-" version "-checkout")))) | |
766 | (build-system trivial-build-system) | |
767 | (native-inputs `(("gzip" ,gzip) | |
768 | ("source" ,source) | |
769 | ("texinfo" ,texinfo))) | |
770 | (arguments | |
771 | `(#:modules ((guix build utils) | |
772 | (srfi srfi-1) | |
773 | (srfi srfi-26)) | |
774 | #:builder | |
775 | (begin | |
776 | (use-modules (guix build utils) | |
777 | (srfi srfi-1) | |
778 | (srfi srfi-26)) | |
779 | (let ((gzip (assoc-ref %build-inputs "gzip")) | |
780 | (source (assoc-ref %build-inputs "source")) | |
781 | (texinfo (assoc-ref %build-inputs "texinfo")) | |
782 | (info-dir (string-append %output "/share/info"))) | |
783 | (setenv "PATH" (string-append gzip "/bin" | |
784 | ":" texinfo "/bin")) | |
785 | (mkdir-p info-dir) | |
786 | (and (zero? | |
787 | (system* "makeinfo" "--output" | |
788 | (string-append info-dir "/sicp.info") | |
789 | (string-append source "/sicp-pocket.texi"))) | |
790 | (every zero? | |
791 | (map (cut system* "gzip" "-9n" <>) | |
792 | (find-files info-dir)))))))) | |
793 | (home-page "http://sarabander.github.io/sicp") | |
794 | (synopsis "Structure and Interpretation of Computer Programs") | |
795 | (description "Structure and Interpretation of Computer Programs (SICP) is | |
796 | a textbook aiming to teach the principles of computer programming. | |
797 | ||
798 | Using Scheme, a dialect of the Lisp programming language, the book explains | |
799 | core computer science concepts such as abstraction in programming, | |
800 | metalinguistic abstraction, recursion, interpreters, and modular programming.") | |
801 | (license cc-by-sa4.0)))) | |
8a0c2552 | 802 | |
803 | (define-public scheme48-rx | |
804 | (let* ((commit "d3231ad13de2b44e3ee173b1c9d09ff165e8b6d5") | |
805 | (revision "1")) | |
806 | (package | |
807 | (name "scheme48-rx") | |
808 | (version (string-append "0.0.0-" revision "." (string-take commit 7))) | |
809 | (source | |
810 | (origin | |
811 | (method git-fetch) | |
812 | (uri (git-reference | |
813 | (url "https://github.com/scheme/rx") | |
814 | (commit commit))) | |
815 | (sha256 | |
816 | (base32 | |
817 | "1nmziaibgmfi346kzidj6xyad0vm7724qymbzgxvdzyrqji6v6yz")) | |
818 | (file-name (string-append name "-" version "-checkout")))) | |
819 | (build-system trivial-build-system) | |
820 | (arguments | |
821 | `(#:modules ((guix build utils)) | |
822 | #:builder | |
823 | (begin | |
824 | (use-modules (guix build utils)) | |
825 | (let ((share (string-append %output | |
826 | "/share/scheme48-" | |
827 | ,(package-version scheme48) | |
828 | "/rx"))) | |
829 | (chdir (assoc-ref %build-inputs "source")) | |
830 | (mkdir-p share) | |
831 | (copy-recursively "." share))))) | |
832 | (native-inputs | |
833 | `(("source" ,source) | |
834 | ("scheme48" ,scheme48))) | |
835 | (home-page "https://github.com/scheme/rx/") | |
836 | (synopsis "SRE String pattern-matching library for scheme48") | |
837 | (description | |
838 | "String pattern-matching library for scheme48 based on the SRE | |
839 | regular-expression notation.") | |
840 | (license bsd-3)))) | |
07ef08a7 JD |
841 | |
842 | (define-public slib | |
843 | (package | |
844 | (name "slib") | |
845 | (version "3b5") | |
846 | (source (origin | |
847 | (method url-fetch) | |
848 | (uri (string-append "http://groups.csail.mit.edu/mac/ftpdir/scm/slib-" | |
849 | version ".zip")) | |
850 | (sha256 | |
851 | (base32 | |
852 | "0q0p2d53p8qw2592yknzgy2y1p5a9k7ppjx0cfrbvk6242c4mdpq")))) | |
853 | (build-system gnu-build-system) | |
854 | (arguments | |
855 | `(#:tests? #f ; There is no check target. | |
856 | #:phases | |
857 | (modify-phases %standard-phases | |
858 | (add-after 'install 'remove-bin-share | |
859 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
860 | (delete-file-recursively | |
861 | (string-append (assoc-ref outputs "out") "/bin")))) | |
862 | (replace 'configure | |
863 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
864 | (zero? (system* "./configure" | |
865 | (string-append "--prefix=" | |
866 | (assoc-ref outputs "out"))))))))) | |
867 | (native-inputs `(("unzip" ,unzip) | |
868 | ("texinfo" ,texinfo))) | |
869 | (home-page "http://people.csail.mit.edu/jaffer/SLIB/") | |
870 | (synopsis "Compatibility and utility library for Scheme") | |
871 | (description "SLIB is a portable Scheme library providing compatibility and | |
872 | utility functions for all standard Scheme implementations.") | |
873 | (license (non-copyleft | |
874 | "http://people.csail.mit.edu/jaffer/SLIB_COPYING.txt" | |
875 | "Or see COPYING in the distribution.")))) | |
876 | ||
8c48d0eb JD |
877 | (define-public scm |
878 | (package | |
879 | (name "scm") | |
880 | (version "5f2") | |
881 | (source (origin | |
882 | (method url-fetch) | |
883 | (uri (string-append | |
884 | "http://groups.csail.mit.edu/mac/ftpdir/scm/scm-" | |
885 | version ".zip")) | |
886 | (sha256 | |
887 | (base32 | |
888 | "050ijb51jm1cij9g3r89zl9rawsrikhbb5y8zb7lspb7bsxq5w99")))) | |
889 | (build-system gnu-build-system) | |
890 | (arguments | |
891 | `(#:phases | |
892 | (modify-phases %standard-phases | |
893 | (replace 'configure | |
894 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
895 | (zero? (system* "./configure" | |
896 | (string-append "--prefix=" | |
897 | (assoc-ref outputs "out")))))) | |
898 | (add-before 'build 'pre-build | |
899 | (lambda* (#:key inputs #:allow-other-keys) | |
900 | (substitute* "Makefile" | |
901 | (("ginstall-info") "install-info")))) | |
902 | (replace 'build | |
903 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
904 | (setenv "SCHEME_LIBRARY_PATH" | |
905 | (string-append (assoc-ref inputs "slib") | |
906 | "/lib/slib/")) | |
907 | (and | |
908 | (zero? (system* "make" "scmlit" "CC=gcc")) | |
909 | (zero? (system* "make" "all"))))) | |
910 | (add-after 'install 'post-install | |
911 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
912 | (let ((req | |
913 | (string-append (assoc-ref outputs "out") | |
914 | "/lib/scm/require.scm"))) | |
915 | (and | |
916 | (delete-file req) | |
917 | (format (open req (logior O_WRONLY O_CREAT)) | |
918 | "(define (library-vicinity) ~s)\n" | |
919 | (string-append (assoc-ref inputs "slib") | |
920 | "/lib/slib/")) | |
921 | ||
922 | ;; We must generate the slibcat file | |
923 | (zero? (system* | |
924 | (string-append | |
925 | (assoc-ref outputs "out") | |
926 | "/bin/scm") | |
927 | "-br" "new-catalog"))))))))) | |
928 | (inputs `(("slib" ,slib))) | |
929 | (native-inputs `(("unzip" ,unzip) | |
930 | ("texinfo" ,texinfo))) | |
931 | (home-page "http://people.csail.mit.edu/jaffer/SCM") | |
932 | (synopsis "Scheme implementation conforming to R5RS and IEEE P1178") | |
933 | (description "GNU SCM is an implementation of Scheme. This | |
934 | implementation includes Hobbit, a Scheme-to-C compiler, which can | |
935 | generate C files whose binaries can be dynamically or statically | |
936 | linked with a SCM executable.") | |
937 | (license lgpl3+))) |