gnu: Add nxbelld.
[guix.git] / gnu / packages / chez.scm
blobb5320576059d2bd1df6c6d8e827007829092df36
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages chez)
21   #:use-module (gnu packages)
22   #:use-module ((guix licenses)
23                 #:select (gpl2+ gpl3+ lgpl2.0+ lgpl2.1+ asl2.0 bsd-3 expat
24                           public-domain))
25   #:use-module (guix packages)
26   #:use-module (guix download)
27   #:use-module (guix git-download)
28   #:use-module (guix utils)
29   #:use-module (guix build-system gnu)
30   #:use-module (gnu packages compression)
31   #:use-module (gnu packages ncurses)
32   #:use-module (gnu packages ghostscript)
33   #:use-module (gnu packages netpbm)
34   #:use-module (gnu packages tex)
35   #:use-module (gnu packages compression)
36   #:use-module (gnu packages image)
37   #:use-module (gnu packages xorg)
38   #:use-module (ice-9 match)
39   #:use-module (srfi srfi-1))
41 (define nanopass
42   (let ((version "1.9"))
43     (origin
44       (method url-fetch)
45       (uri (string-append
46             "https://github.com/nanopass/nanopass-framework-scheme/archive"
47             "/v" version ".tar.gz"))
48       (sha256 (base32 "11pwyy4jiwhcl2am3a4ciczacjbjkyvdizqzdglb3l1hj2gj6nv2"))
49       (file-name (string-append "nanopass-" version ".tar.gz")))))
51 (define stex
52   (let ((version "1.2.1"))
53     (origin
54       (method url-fetch)
55       (uri (string-append
56             "https://github.com/dybvig/stex/archive"
57             "/v" version ".tar.gz"))
58       (sha256 (base32 "03pl3f668h24dn51vccr1sj5lsba9zq3j37bnxjvdadcdaj4qy5z"))
59       (file-name (string-append "stex-" version ".tar.gz")))))
61 (define-public chez-scheme
62   (package
63     (name "chez-scheme")
64     (version "9.4")
65     (source
66      (origin
67        (method url-fetch)
68        (uri (string-append "https://github.com/cisco/ChezScheme/archive/"
69                            "v" version ".tar.gz"))
70        (sha256
71         (base32 "0lprmpsjg2plc6ykgkz482zyvhkzv6gd0vnar71ph21h6zknyklz"))
72        (file-name (string-append "chez-scheme-" version ".tar.gz"))))
73     (build-system gnu-build-system)
74     (inputs
75      `(("ncurses" ,ncurses)
76        ("libx11" ,libx11)
77        ("xorg-rgb" ,xorg-rgb)
78        ("nanopass" ,nanopass)
79        ("zlib" ,zlib)
80        ("stex" ,stex)))
81     (native-inputs
82      `(("texlive" ,texlive)
83        ("ghostscript" ,ghostscript)
84        ("netpbm" ,netpbm)))
85     (native-search-paths
86      (list (search-path-specification
87             (variable "CHEZSCHEMELIBDIRS")
88             (files (list (string-append "lib/csv" version "-site"))))))
89     (outputs '("out" "doc"))
90     (arguments
91      `(#:modules ((guix build gnu-build-system)
92                   (guix build utils)
93                   (ice-9 match))
94        #:test-target "test"
95        #:configure-flags
96        (list ,(match (or (%current-target-system) (%current-system))
97                 ("x86_64-linux" '(list "--machine=ta6le"))
98                 ("i686-linux" '(list "--machine=ti3le"))
99                 ;; Let autodetection have its attempt on other architectures.
100                 (_
101                  '())))
102        #:phases
103        (modify-phases %standard-phases
104          (add-after 'unpack 'patch-processor-detection
105            (lambda _ (substitute* "configure"
106                        (("uname -a") "uname -m"))
107              #t))
108          ;; Adapt the custom 'configure' script.
109          (replace 'configure
110            (lambda* (#:key inputs outputs #:allow-other-keys)
111              (let ((out (assoc-ref outputs "out"))
112                    (nanopass (assoc-ref inputs "nanopass"))
113                    (stex (assoc-ref inputs "stex"))
114                    (zlib (assoc-ref inputs "zlib"))
115                    (unpack (assoc-ref %standard-phases 'unpack))
116                    (patch-source-shebangs
117                     (assoc-ref %standard-phases 'patch-source-shebangs)))
118                (map (match-lambda
119                       ((src orig-name new-name)
120                        (with-directory-excursion "."
121                          (apply unpack (list #:source src))
122                          (apply patch-source-shebangs (list #:source src)))
123                        (delete-file-recursively new-name)
124                        (system* "mv" orig-name new-name)))
125                     `((,nanopass "nanopass-framework-scheme-1.9" "nanopass")
126                       (,stex "stex-1.2.1" "stex")))
127                ;; The Makefile wants to download and compile "zlib".  We patch
128                ;; it to use the one from our 'zlib' package.
129                (substitute* "configure"
130                  (("rmdir zlib .*$") "echo \"using system zlib\"\n"))
131                (substitute* (find-files "./c" "Mf-[a-zA-Z0-9.]+")
132                  (("\\$\\{Kernel\\}: \\$\\{kernelobj\\} \\.\\./zlib/libz\\.a")
133                   "${Kernel}: ${kernelobj}")
134                  (("ld ([-a-zA-Z0-9_${} ]+) \\.\\./zlib/libz\\.a" all args)
135                   (string-append "ld " args " " zlib "/lib/libz.a"))
136                  (("\\(cd \\.\\./zlib; ([-a-zA-Z0-9=./ ]+))")
137                   (which "true")))
138                (substitute* (find-files "mats" "Mf-.*")
139                  (("^[[:space:]]+(cc ) *") "\tgcc "))
140                (substitute*
141                    (find-files "." (string-append
142                                     "("
143                                     "Mf-[a-zA-Z0-9.]+"
144                                     "|Makefile[a-zA-Z0-9.]*"
145                                     "|checkin"
146                                     "|stex\\.stex"
147                                     "|newrelease"
148                                     "|workarea"
149                                     ;;"|[a-zA-Z0-9.]+\\.ms" ; guile can't read
150                                     ")"))
151                  (("/bin/rm") (which "rm"))
152                  (("/bin/ln") (which "ln"))
153                  (("/bin/cp") (which "cp")))
154                (substitute* "makefiles/installsh"
155                  (("/bin/true") (which "true")))
156                (substitute* "stex/Makefile"
157                  (("PREFIX=/usr") (string-append "PREFIX=" out)))
158                (zero? (system* "./configure" "--threads"
159                                (string-append "--installprefix=" out))))))
160          ;; Installation of the documentation requires a running "chez".
161          (add-after 'install 'install-doc
162            (lambda* (#:key inputs outputs #:allow-other-keys)
163              (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
164                    (doc (string-append (assoc-ref outputs "doc")
165                                        "/share/doc/" ,name "-" ,version)))
166                (setenv "HOME" (getcwd))
167                (setenv "PATH" (string-append (getenv "PATH") ":" bin))
168                (with-directory-excursion "stex"
169                  (system* "make" (string-append "BIN=" bin)))
170                (system* "make" "docs")
171                (with-directory-excursion "csug"
172                  (substitute* "Makefile"
173                    (("/tmp/csug9") doc))
174                  (system* "make" "install")
175                  (install-file "csug.pdf" doc))
176                (with-directory-excursion "release_notes"
177                  (install-file "release_notes.pdf" doc))
178                #t)))
179          ;; The binary file name is called "scheme" as the one from MIT/GNU
180          ;; Scheme.  We add a symlink to use in case both are installed.
181          (add-after 'install 'install-symlink
182            (lambda* (#:key outputs #:allow-other-keys)
183              (let* ((out (assoc-ref outputs "out"))
184                     (bin (string-append out "/bin"))
185                     (lib (string-append out "/lib"))
186                     (name "chez-scheme"))
187                (symlink (string-append bin "/scheme")
188                         (string-append bin "/" name))
189                (map (lambda (file)
190                       (symlink file (string-append (dirname file)
191                                                    "/" name ".boot")))
192                     (find-files lib "scheme.boot"))
193                #t)))
194          (add-before 'reset-gzip-timestamps 'make-manpages-writable
195            (lambda* (#:key outputs #:allow-other-keys)
196              (map (lambda (file)
197                     (make-file-writable file))
198                   (find-files (string-append (assoc-ref outputs "out")
199                                              "/share/man")
200                               ".*\\.gz$"))
201              #t)))))
202     ;; According to the documentation MIPS is not supported.
203     ;; Cross-compiling for the Raspberry Pi is supported, but not native ARM.
204     (supported-systems (fold delete %supported-systems
205                              '("mips64el-linux" "armhf-linux")))
206     (home-page "http://www.scheme.com")
207     (synopsis "R6RS Scheme compiler and run-time")
208     (description
209      "Chez Scheme is a compiler and run-time system for the language of the
210 Revised^6 Report on Scheme (R6RS), with numerous extensions.  The compiler
211 generates native code for each target processor, with support for x86, x86_64,
212 and 32-bit PowerPC architectures.")
213     (license asl2.0)))
215 (define-public chez-srfi
216   (package
217     (name "chez-srfi")
218     (version "1.0")
219     (source
220      (origin
221        (method url-fetch)
222        (uri (string-append
223              "https://github.com/fedeinthemix/chez-srfi/archive"
224              "/v" version ".tar.gz"))
225        (sha256
226         (base32 "17i4wly7bcr5kb5hf04ljpbvv4r5hsr9xsmw650fj43z9jr303gs"))
227        (file-name (string-append name "-" version ".tar.gz"))))
228     (build-system gnu-build-system)
229     (native-inputs
230      `(("chez-scheme" ,chez-scheme)))
231     (arguments
232      `(#:make-flags (let ((out (assoc-ref %outputs "out")))
233                       (list (string-append "PREFIX=" out)))
234        #:test-target "test"
235        #:phases (modify-phases %standard-phases
236                   (delete 'configure))))
237     (home-page "https://github.com/fedeinthemix/chez-srfi")
238     (synopsis "SRFI libraries for Chez Scheme")
239     (description
240      "This package provides a collection of SRFI libraries for Chez Scheme.")
241     (license expat)))
243 (define-public chez-web
244   (let ((commit "5fd177fe53f31f466bf88720d03c95a3711a8bea")
245         (revision "1"))
246     (package
247       (name "chez-web")
248       ;; release 2.0 is different and doesn't work.
249       (version (string-append "2.0-" revision "."
250                               (string-take commit 7)))
251       (source
252        (origin
253          (method git-fetch)
254          (uri (git-reference
255                (url "https://github.com/arcfide/ChezWEB.git")
256                (commit commit)))
257          (file-name (string-append name "-" version "-checkout"))
258          (sha256
259           (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b"))))
260       (build-system gnu-build-system)
261       (native-inputs
262        `(("chez-scheme" ,chez-scheme)
263          ("texlive" ,texlive)))
264       (arguments
265        `(#:make-flags (list (string-append "PREFIX=" %output)
266                             (string-append "DOCDIR=" %output "/share/doc/"
267                                            ,name "-" ,version)
268                             (string-append "LIBDIR=" %output "/lib/chezweb")
269                             (string-append "TEXDIR=" %output "/share/texmf-local"))
270                       #:tests? #f        ; no tests
271                       #:phases
272                       (modify-phases %standard-phases
273                         (replace 'configure
274                           (lambda* _
275                             (copy-file "config.mk.template" "config.mk")
276                             (substitute* "tangleit"
277                               (("\\./cheztangle\\.ss" all)
278                                (string-append "chez-scheme --program " all)))
279                             (substitute* "weaveit"
280                               (("mpost chezweb\\.mp")
281                                "mpost --tex=tex chezweb.mp")
282                               (("\\./chezweave" all)
283                                (string-append "chez-scheme --program " all)))
284                             (substitute* "installit"
285                               (("-g \\$GROUP -o \\$OWNER") "")))))))
286       (home-page "https://github.com/arcfide/ChezWEB")
287       (synopsis "Hygienic Literate Programming for Chez Scheme")
288       (description "ChezWEB is a system for doing Knuthian style WEB
289 programming in Scheme.")
290       (license expat))))
292 (define-public chez-sockets
293   (let ((commit "bce96881c06bd69a6757a6bff139744153924140")
294         (revision "1"))
295     (package
296       (name "chez-sockets")
297       (version (string-append "0.0-" revision "."
298                               (string-take commit 7)))
299       (source
300        (origin
301          (method git-fetch)
302          (uri (git-reference
303                (url "https://github.com/arcfide/chez-sockets.git")
304                (commit commit)))
305          (file-name (string-append name "-" version "-checkout"))
306          (sha256
307           (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m"))))
308       (build-system gnu-build-system)
309       (native-inputs
310        `(("chez-scheme" ,chez-scheme)
311          ("chez-web" ,chez-web)
312          ("texlive" ,texlive)))
313       (arguments
314        `(#:tests? #f              ; no tests
315          #:phases
316          (modify-phases %standard-phases
317            (replace 'configure
318              (lambda* (#:key outputs inputs #:allow-other-keys)
319                (let* ((out (assoc-ref outputs "out"))
320                       (chez-web (assoc-ref inputs "chez-web"))
321                       (chez (assoc-ref inputs "chez-scheme"))
322                       (chez-h (dirname (car (find-files chez "scheme\\.h")))))
323                  (substitute* "Makefile"
324                    (("(SCHEMEH=).*$" all var)
325                     (string-append var chez-h)))
326                  #t)))
327            (add-before 'build 'tangle
328              (lambda _
329                ;; just using "make" tries to build the .c files before
330                ;; they are created.
331                (and (zero? (system* "make" "sockets"))
332                     (zero? (system* "make")))))
333            (replace 'build
334              (lambda* (#:key outputs inputs #:allow-other-keys)
335                (let* ((out (assoc-ref outputs "out"))
336                       (chez-site (string-append out "/lib/csv"
337                                                 ,(package-version chez-scheme)
338                                                 "-site/arcfide")))
339                  ;; make sure Chez Scheme can find the shared libraries.
340                  (substitute* "sockets.ss"
341                    (("(load-shared-object) \"(socket-ffi-values\\.[sd][oy].*)\""
342                      all cmd so)
343                     (string-append cmd " \"" chez-site "/" so "\""))
344                    (("sockets-stub\\.[sd][oy].*" all)
345                     (string-append chez-site "/" all)))
346                  ;; to compile chez-sockets, the .so files must be
347                  ;; installed (because of the absolute path we
348                  ;; inserted above).
349                  (for-each (lambda (f d) (install-file f d))
350                            '("socket-ffi-values.so" "sockets-stub.so")
351                            (list chez-site chez-site))
352                  (zero? (system "echo '(compile-file \"sockets.sls\")' | scheme -q")))))
353            (replace 'install
354              (lambda* (#:key outputs inputs #:allow-other-keys)
355                (let* ((out (assoc-ref outputs "out"))
356                       (lib (string-append out "/lib/chez-sockets"))
357                       (doc (string-append out "/share/doc/" ,name "-" ,version))
358                       (chez-site (string-append out "/lib/csv"
359                                                 ,(package-version chez-scheme)
360                                                 "-site/arcfide")))
361                  (for-each (lambda (f d) (install-file f d))
362                            '("sockets.pdf" "sockets.so")
363                            (list doc chez-site))
364                  #t))))))
365       (home-page "https://github.com/arcfide/chez-sockets")
366       (synopsis "Extensible sockets library for Chez Scheme")
367       (description "Chez-sockets is an extensible sockets library for
368 Chez Scheme.")
369       (license expat))))
371 ;; Help function for Chez Scheme to add the current path to
372 ;; CHEZSCHEMELIBDIRS.
373 (define chez-configure
374   '(lambda _
375      (let ((chez-env (getenv "CHEZSCHEMELIBDIRS")))
376        (setenv "CHEZSCHEMELIBDIRS"
377                (if chez-env
378                    (string-append ".:" chez-env)
379                    "."))
380        #t)))
382 ;; Help function to define make flags for some Chez Scheme custom make
383 ;; files.
384 (define (chez-make-flags name version)
385   `(let ((out (assoc-ref %outputs "out")))
386      (list (string-append "PREFIX=" out)
387            (string-append "DOCDIR=" out "/share/doc/"
388                           ,name "-" ,version))))
390 (define-public chez-matchable
391   (package
392     (name "chez-matchable")
393     (version "20160306")
394     (home-page "https://github.com/fedeinthemix/chez-matchable")
395     (source
396      (origin
397        (method url-fetch)
398        (uri (string-append home-page "/archive" "/v" version ".tar.gz"))
399        (sha256
400         (base32 "0cl4vc6487pikjq159pj4n5ghyaax31nywb5n4yn1682h3ir1hs0"))
401        (file-name (string-append name "-" version ".tar.gz"))))
402     (build-system gnu-build-system)
403     (inputs
404      `(("chez-srfi" ,chez-srfi))) ; for tests
405     (native-inputs
406      `(("chez-scheme" ,chez-scheme)))
407     (arguments
408      `(#:make-flags ,(chez-make-flags name version)
409        #:test-target "test"
410        #:phases (modify-phases %standard-phases
411                   (replace 'configure ,chez-configure))))
412     (synopsis "Portable hygienic pattern matcher for Scheme")
413     (description "This package provides a superset of the popular Scheme
414 @code{match} package by Andrew Wright, written in fully portable
415 @code{syntax-rules} and thus preserving hygiene.")
416     (license public-domain)))
418 (define-public chez-irregex
419   (package
420     (name "chez-irregex")
421     (version "0.9.4")
422     (source
423      (origin
424        (method url-fetch)
425        (uri (string-append
426              "https://github.com/fedeinthemix/chez-irregex/archive"
427              "/v" version ".tar.gz"))
428        (sha256
429         (base32 "0ywy5syaw549a58viz68dmgnv756ic705rcnlqxgjq27lnaim53b"))
430        (file-name (string-append name "-" version ".tar.gz"))))
431     (build-system gnu-build-system)
432     (inputs
433      `(("chez-matchable" ,chez-matchable))) ; for tests
434     (propagated-inputs
435      `(("chez-srfi" ,chez-srfi))) ; for irregex-utils
436     (native-inputs
437      `(("chez-scheme" ,chez-scheme)))
438     (arguments
439      `(#:make-flags ,(chez-make-flags name version)
440        #:test-target "test"
441        #:phases (modify-phases %standard-phases
442                   (replace 'configure ,chez-configure))))
443     (home-page "https://github.com/fedeinthemix/chez-irregex")
444     (synopsis "Portable regular expression library for Scheme")
445     (description "This package provides a portable and efficient
446 R[4567]RS implementation of regular expressions, supporting both POSIX
447 syntax with various (irregular) PCRE extensions, as well as SCSH's SRE
448 syntax, with various aliases for commonly used patterns.")
449     (license bsd-3)))
451 (define-public chez-fmt
452   (package
453     (name "chez-fmt")
454     (version "0.8.11")
455     (source
456      (origin
457        (method url-fetch)
458        (uri (string-append
459              "http://synthcode.com/scheme/fmt/fmt-" version ".tar.gz"))
460        (sha256
461         (base32 "1zxqlw1jyg85yzclylh8bp2b3fwcy3l3xal68jw837n5illvsjcl"))
462        (file-name (string-append name "-" version ".tar.gz"))))
463     (build-system gnu-build-system)
464     (propagated-inputs
465      `(("chez-srfi" ,chez-srfi))) ; for irregex-utils
466     (native-inputs
467      `(("chez-scheme" ,chez-scheme)))
468     (arguments
469      `(#:make-flags ,(chez-make-flags name version)
470        #:test-target "chez-check"
471        #:phases
472        (modify-phases %standard-phases
473          (replace 'configure ,chez-configure)
474          (replace 'build
475            (lambda* (#:key (make-flags '()) #:allow-other-keys)
476              (zero? (apply system* "make" "chez-build" make-flags))))
477          (replace 'install
478            (lambda* (#:key (make-flags '()) #:allow-other-keys)
479              (zero? (apply system* "make" "chez-install" make-flags)))))))
480     (home-page "http://synthcode.com/scheme/fmt")
481     (synopsis "Combinator formatting library for Chez Scheme")
482     (description "This package provides a library of procedures for
483 formatting Scheme objects to text in various ways, and for easily
484 concatenating, composing and extending these formatters efficiently
485 without resorting to capturing and manipulating intermediate
486 strings.")
487     (license bsd-3)))
489 (define-public chez-mit
490   (package
491     (name "chez-mit")
492     (version "0.1")
493     (home-page "https://github.com/fedeinthemix/chez-mit")
494     (source
495      (origin
496        (method url-fetch)
497        (uri (string-append home-page "/archive/v" version ".tar.gz"))
498        (sha256
499         (base32 "1p11q061znwxzxrxg3vw4dbsnpv1dav12hjhnkrjnzyyjvvdm2kn"))
500        (file-name (string-append name "-" version ".tar.gz"))))
501     (build-system gnu-build-system)
502     (inputs
503      `(("chez-srfi" ,chez-srfi))) ; for tests
504     (native-inputs
505      `(("chez-scheme" ,chez-scheme)))
506     (arguments
507      `(#:make-flags ,(chez-make-flags name version)
508        #:test-target "test"
509        #:phases (modify-phases %standard-phases
510                   (replace 'configure ,chez-configure))))
511     (synopsis "MIT/GNU Scheme compatibility library for Chez Scheme")
512     (description "This package provides a set of MIT/GNU Scheme compatibility
513 libraries for Chez Scheme.  The main goal was to provide the functionality
514 required to port the program 'Scmutils' to Chez Scheme.")
515     (license gpl3+)))
517 (define-public chez-scmutils
518   (package
519     (name "chez-scmutils")
520     (version "0.1")
521     (home-page "https://github.com/fedeinthemix/chez-scmutils")
522     (source
523      (origin
524        (method url-fetch)
525        (uri (string-append home-page "/archive/v" version ".tar.gz"))
526        (sha256
527         (base32 "1a5j61pggaiwl1gl6m038rcy5n8r2sj5nyjmz86jydx97mm5i8hj"))
528        (file-name (string-append name "-" version ".tar.gz"))))
529     (build-system gnu-build-system)
530     (inputs
531      `(("chez-srfi" ,chez-srfi)))      ; for tests
532     (native-inputs
533      `(("chez-scheme" ,chez-scheme)))
534     (propagated-inputs
535      `(("chez-mit" ,chez-mit)
536        ("chez-srfi" ,chez-srfi)))
537     (arguments
538      `(#:make-flags ,(chez-make-flags name version)
539        #:tests? #f ; no test suite
540        #:phases
541        (modify-phases %standard-phases
542          (replace 'configure ,chez-configure)
543          ;; Since the documentation is lacking, we install the source
544          ;; code.  For things to work correctly we have to replace
545          ;; relative paths by absolute ones in 'include' forms.  This
546          ;; in turn requires us to compile the files in the final
547          ;; destination.
548          (delete 'build)
549          (add-after 'install 'install-src
550            (lambda* (#:key (make-flags '()) #:allow-other-keys)
551              (zero? (apply system* "make" "install-src" make-flags))))
552          (add-after 'install-src 'absolute-path-in-scm-files
553            (lambda* (#:key outputs #:allow-other-keys)
554              (let ((out (assoc-ref outputs "out")))
555                (for-each (lambda (file)
556                            (substitute* file
557                              (("include +\"\\./scmutils")
558                               (string-append "include \"" (dirname file)))))
559                          (find-files out "\\.sls"))
560                (for-each (lambda (file)
561                            (substitute* file
562                              (("include +\"\\./scmutils/simplify")
563                               (string-append "include \"" (dirname file)))))
564                          (find-files out "fbe-syntax\\.scm"))
565                #t)))
566          (add-after 'absolute-path-in-scm-files 'build
567            (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
568              (let* ((out (assoc-ref outputs "out"))
569                     (mk-file (car (find-files out "Makefile"))))
570                (with-directory-excursion (dirname mk-file)
571                  (zero? (apply system* "make" "build" make-flags))))))
572          (add-after 'build 'clean-up
573            (lambda* (#:key outputs #:allow-other-keys)
574              (let* ((out (assoc-ref outputs "out")))
575                (for-each delete-file
576                          (find-files out "Makefile|compile-all\\.ss"))))))))
577     (synopsis "Port of MIT/GNU Scheme Scmutils to Chez Scheme")
578     (description "This package provides a port of the MIT/GNU Scheme
579 Scmutils program to Chez Scheme.  The port consists of a set of
580 libraries providing most of the functionality of the original.")
581     (license gpl3+)))