;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2017 John Darrington <jmd@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
+;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages databases)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libunistring)
#:use-module (gnu packages m4)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pcre)
- #:use-module (gnu packages databases)
#:use-module (gnu packages emacs)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages image)
#:use-module (gnu packages xorg)
+ #:use-module (gnu packages sqlite)
#:use-module (gnu packages tls)
#:use-module (gnu packages gl)
+ #:use-module (gnu packages libedit)
+ #:use-module (srfi srfi-1)
#:use-module (ice-9 match))
(define (mit-scheme-source-directory system version)
(define-public mit-scheme
(package
(name "mit-scheme")
- (version "9.2")
+ (version "10.1.3")
(source #f) ; see below
(outputs '("out" "doc"))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; no "check" target
- #:modules ((guix build gnu-build-system)
+ `(#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
#:phases
;; Delete these dangling symlinks since they break
;; `patch-shebangs'.
(for-each delete-file
- (append '("src/lib/shim-config.scm")
- (find-files "src/lib/lib" "\\.so$")
- (find-files "src/lib" "^liarc-")
- (find-files "src/compiler" "^make\\.")))
+ (find-files "src/compiler" "^make\\."))
(chdir "src")
#t))
+ (add-after 'unpack 'patch-/bin/sh
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (substitute* '("../tests/ffi/autogen.sh"
+ "../tests/ffi/autobuild.sh"
+ "../tests/ffi/test-ffi.sh"
+ "../tests/runtime/test-process.scm"
+ "runtime/unxprm.scm")
+ (("/bin/sh") (which "sh"))
+ (("\\./autogen\\.sh")
+ (string-append (which "sh") " autogen.sh"))
+ (("\\./configure")
+ (string-append (which "sh") " configure")))
+ #t))
+ ;; FIXME: the texlive-union insists on regenerating fonts. It stores
+ ;; them in HOME, so it needs to be writeable.
+ (add-before 'build 'set-HOME
+ (lambda _ (setenv "HOME" "/tmp") #t))
(replace 'build
(lambda* (#:key system outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(invoke bin/sh "./configure"
(string-append "--prefix=" out)
(string-append "SHELL=" bin/sh))
- (substitute* '("Makefile" "make-common")
- (("/lib/mit-scheme/doc")
- (string-append "/share/doc/" ,name "-" ,version)))
#t))))
(add-after 'build 'build-doc
(lambda* _
(with-directory-excursion "../doc"
(for-each (lambda (target)
(invoke "make" target))
- '("install-config" "install-info-gz" "install-man"
+ '("install-info-gz" "install-man"
"install-html" "install-pdf")))
(mkdir-p new-doc/mit-scheme-dir)
(copy-recursively
- (string-append old-doc-dir "/" ,name "-" ,version)
+ (string-append old-doc-dir "/" ,name)
new-doc/mit-scheme-dir)
(delete-file-recursively old-doc-dir)
#t))))))
(native-inputs
- `(("texlive" ,texlive)
+ `(;; Autoconf, Automake, and Libtool are necessary for the FFI tests.
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("texlive" ,(texlive-union (list texlive-tex-texinfo)))
("texinfo" ,texinfo)
("m4" ,m4)))
(inputs
(match (%current-system)
("x86_64-linux"
(base32
- "1skzxxhr0iq96bf0j5m7mvf3i4sppfyfa6gpqn34mwgkw1fx8274"))
+ "03m7cc035w3avs91j2pcz9f15ssgvgp3rm045d1vbydqrkzfyw8k"))
("i686-linux"
(base32
- "1fmlpnhf5a75db93phajh4ysbdgrgl72v45lk3kznriprl0a7jc6"))
+ "05sjyz90xxfnmi87qv8x0yx0fcallnzl1dciygdafp317pn489is"))
(_
- (base32
- "0w5ib5vsidihb4hb6fma3sp596ykr8izagm57axvgd6lqzwicsjg"))))))))
+ (base32
+ ""))))))))
;; Fails to build on MIPS, see <http://bugs.gnu.org/18221>.
- (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
+ ;; Also, the portable C version of MIT/GNU Scheme did not work in time for
+ ;; release in version 10.1.
+ (supported-systems '("x86_64-linux" "i686-linux"))
(home-page "https://www.gnu.org/software/mit-scheme/")
(synopsis "A Scheme implementation with integrated editor and debugger")
(properties '((ftp-directory . "/gnu/mit-scheme/stable.pkg")))))
(define-public bigloo
- (package
- (name "bigloo")
- (version "4.3b")
- (source (origin
- (method url-fetch)
- (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo"
- version ".tar.gz"))
- (sha256
- (base32
- "1x7xdgsls277zlf6gcaxs2cj62xj6yvb0qxh0ddmxfamvxba0cf4"))
- ;; Remove bundled libraries.
- (modules '((guix build utils)))
- (snippet
- '(for-each delete-file-recursively
- '("gc" "gmp" "libuv")))))
- (build-system gnu-build-system)
- (arguments
- `(#:test-target "test"
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Upstream modifies source tarballs in place, making significant changes
+ ;; long after the initial publication: <https://bugs.gnu.org/33525>. For
+ ;; transparency, we give this "second 4.3b" release a different version
+ ;; number.
+ (let ((upstream-version "4.3e"))
+ (package
+ (name "bigloo")
+ (version "4.3e1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo"
+ upstream-version ".tar.gz"))
+ (sha256
+ (base32
+ "12k1kxyn3yilba0508xh8wkrw6279gnghzqi0bs2ayf5d2wkqdj3"))
+ ;; Remove bundled libraries.
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file-recursively
+ '("gc" "gmp" "libuv"))
+ #t))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "configure"
- (("^shell=.*$")
- (string-append "shell=" (which "bash") "\n"))
- (("`date`") "0"))
- (substitute* "autoconf/runtest.in"
- ((", @DATE@") ""))
- (substitute* "autoconf/osversion"
- (("^version.*$") "version=\"\"\n"))
- (substitute* "comptime/Makefile"
- (("\\$\\(LDCOMPLIBS\\)")
- "$(LDCOMPLIBS) $(LDFLAGS)"))
-
- ;; The `configure' script doesn't understand options
- ;; of those of Autoconf.
- (let ((out (assoc-ref outputs "out")))
- (invoke "./configure"
- (string-append "--prefix=" out)
- ; use system libraries
- "--customgc=no"
- "--customunistring=no"
- "--customlibuv=no"
- (string-append"--mv=" (which "mv"))
- (string-append "--rm=" (which "rm"))
- "--cflags=-fPIC"
- (string-append "--ldflags=-Wl,-rpath="
- (assoc-ref outputs "out")
- "/lib/bigloo/" ,version)
- (string-append "--lispdir=" out
- "/share/emacs/site-lisp")
- "--sharedbde=yes"
- "--sharedcompiler=yes"
- "--disable-patch"))))
- (add-after 'install 'install-emacs-modes
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (dir (string-append out "/share/emacs/site-lisp")))
- (invoke "make" "-C" "bmacs" "all" "install"
- (string-append "EMACSBRAND=emacs25")
- (string-append "EMACSDIR=" dir))))))))
- (inputs
- `(("emacs" ,emacs) ;UDE needs the X version of Emacs
- ("libgc" ,libgc)
- ("libunistring" ,libunistring)
- ("libuv" ,libuv)
- ("openssl" ,openssl)
- ("sqlite" ,sqlite)
+ (substitute* "configure"
+ (("^shell=.*$")
+ (string-append "shell=" (which "bash") "\n"))
+ (("`date`") "0"))
+ (substitute* "autoconf/runtest.in"
+ ((", @DATE@") ""))
+ (substitute* "autoconf/osversion"
+ (("^version.*$") "version=\"\"\n"))
+ (substitute* "comptime/Makefile"
+ (("\\$\\(LDCOMPLIBS\\)")
+ "$(LDCOMPLIBS) $(LDFLAGS)"))
- ;; Optional APIs for which Bigloo has bindings.
- ("avahi" ,avahi)
- ("libphidget" ,libphidget)
- ("pcre" ,pcre)))
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (propagated-inputs
- `(("gmp" ,gmp))) ; bigloo.h refers to gmp.h
- (home-page "http://www-sop.inria.fr/indes/fp/Bigloo/")
- (synopsis "Efficient Scheme compiler")
- (description
- "Bigloo is a Scheme implementation devoted to one goal: enabling
-Scheme based programming style where C(++) is usually
-required. Bigloo attempts to make Scheme practical by offering
-features usually presented by traditional programming languages
-but not offered by Scheme and functional programming. Bigloo
-compiles Scheme modules. It delivers small and fast stand alone
-binary executables. Bigloo enables full connections between
-Scheme and C programs and between Scheme and Java programs.")
- (license gpl2+)))
+ ;; The `configure' script doesn't understand options
+ ;; of those of Autoconf.
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "./configure"
+ (string-append "--prefix=" out)
+ ; use system libraries
+ "--customgc=no"
+ "--customunistring=no"
+ "--customlibuv=no"
+ (string-append"--mv=" (which "mv"))
+ (string-append "--rm=" (which "rm"))
+ "--cflags=-fPIC"
+ (string-append "--ldflags=-Wl,-rpath="
+ (assoc-ref outputs "out")
+ "/lib/bigloo/" ,upstream-version)
+ (string-append "--lispdir=" out
+ "/share/emacs/site-lisp")
+ "--sharedbde=yes"
+ "--sharedcompiler=yes"
+ "--disable-patch"))))
+ (add-after 'install 'install-emacs-modes
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dir (string-append out "/share/emacs/site-lisp")))
+ (invoke "make" "-C" "bmacs" "all" "install"
+ (string-append "EMACSBRAND=emacs25")
+ (string-append "EMACSDIR=" dir))))))))
+ (inputs
+ `(("emacs" ,emacs) ;UDE needs the X version of Emacs
+ ("libgc" ,libgc)
+ ("libunistring" ,libunistring)
+ ("libuv" ,libuv)
+ ("openssl" ,openssl)
+ ("sqlite" ,sqlite)
+
+ ;; Optional APIs for which Bigloo has bindings.
+ ("avahi" ,avahi)
+ ("libphidget" ,libphidget)
+ ("pcre" ,pcre)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (propagated-inputs
+ `(("gmp" ,gmp))) ; bigloo.h refers to gmp.h
+ (home-page "http://www-sop.inria.fr/indes/fp/Bigloo/")
+ (synopsis "Efficient Scheme compiler")
+ (description
+ "Bigloo is a Scheme implementation devoted to one goal: enabling Scheme
+based programming style where C(++) is usually required. Bigloo attempts to
+make Scheme practical by offering features usually presented by traditional
+programming languages but not offered by Scheme and functional programming.
+Bigloo compiles Scheme modules. It delivers small and fast stand alone binary
+executables. Bigloo enables full connections between Scheme and C programs
+and between Scheme and Java programs.")
+ (license gpl2+))))
(define-public hop
(package
(name "hop")
- (version "3.1.0-pre2")
+ (version "3.2.0-pre1")
(source (origin
(method url-fetch)
(uri (string-append "ftp://ftp-sop.inria.fr/indes/fp/Hop/hop-"
version ".tar.gz"))
(sha256
(base32
- "09m7pahjsp7wxzd20cdph9j3mgf2nq5dyckcjljcd40m25v85kks"))))
+ "0jf418d0s9imv98s6qrpjxr1mdaxr37knh5qyfl5y4a9cc41mlg5"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
- (zero?
- (system* "./configure"
- (string-append "--prefix=" out)
- (string-append "--blflags="
- ;; user flags completely override useful
- ;; default flags, so repeat them here.
- "-copt \\$(CPICFLAGS) "
- "-L \\$(BUILDLIBDIR) "
- "-ldopt -Wl,-rpath," out "/lib")))))))))
+ (substitute* '("tools/Makefile"
+ "test/hopjs/TEST.in")
+ (("/bin/rm") (which "rm")))
+ (invoke "./configure"
+ (string-append "--prefix=" out)
+ "--hostcc=gcc"
+ (string-append "--blflags="
+ ;; user flags completely override useful
+ ;; default flags, so repeat them here.
+ "-copt \\$(CPICFLAGS) "
+ "-L \\$(BUILDLIBDIR) "
+ "-ldopt -Wl,-rpath," out "/lib"))))))))
(inputs `(("avahi" ,avahi)
("bigloo" ,bigloo)
("libgc" ,libgc)
(define-public chicken
(package
(name "chicken")
- (version "4.13.0")
+ (version "5.0.0")
(source (origin
(method url-fetch)
(uri (string-append "https://code.call-cc.org/releases/"
version "/chicken-" version ".tar.gz"))
(sha256
(base32
- "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd"))))
+ "15b5yrzfa8aimzba79x7v6y282f898rxqxfxrr446sjx9jwlpfd8"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
-
+
;; No `configure' script; run "make check" after "make install" as
;; prescribed by README.
#:phases
(define-public racket
(package
(name "racket")
- (version "6.11")
+ (version "7.0")
(source (origin
- (method url-fetch)
- (uri (list (string-append "http://mirror.racket-lang.org/installers/"
- version "/racket-" version "-src.tgz")
- (string-append
- "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
- version "/racket-" version "-src.tgz")))
- (sha256
- (base32
- "1nk7705x24jjlbqqhj8yvbgqkfscxx3m81bry1g56kjxysjmf3sw"))))
+ (method url-fetch)
+ (uri (list (string-append "http://mirror.racket-lang.org/installers/"
+ version "/racket-" version "-src.tgz")
+ (string-append
+ "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
+ version "/racket-" version "-src.tgz")))
+ (sha256
+ (base32
+ "1glv5amsp9xp480d4yr63hhm9kkyav06yl3a6p489nkr4cln0j9a"))
+ (patches (search-patches
+ "racket-store-checksum-override.patch"))))
(build-system gnu-build-system)
(arguments
'(#:phases
(substitute* "share/pkgs/math-lib/math/private/bigfloat/mpfr.rkt"
(("ffi-lib libmpfr-so")
(format #f "ffi-lib \"~a\"" (find-so "libmpfr"))))
+ (substitute* "share/pkgs/readline-lib/readline/rktrl.rkt"
+ (("\\(getenv \"PLT_READLINE_LIB\"\\)")
+ (format #f "\"~a\"" (find-so "libedit"))))
(for-each
(lambda (x) (apply patch-ffi-libs x))
'(("share/pkgs/draw-lib/racket/draw/unsafe/cairo-lib.rkt"
(substitute* "collects/racket/system.rkt"
(("/bin/sh") (which "sh")))
#t)))
- #:tests? #f ; XXX: how to run them?
+ #:tests? #f ; XXX: how to run them?
))
(inputs
`(("libffi" ,libffi)
("glib" ,glib)
("glu" ,glu)
("gmp" ,gmp)
- ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg
+ ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("libx11" ,libx11)
("openssl" ,openssl)
("pango" ,pango)
("sqlite" ,sqlite)
- ("unixodbc" ,unixodbc)))
+ ("unixodbc" ,unixodbc)
+ ("libedit" ,libedit)))
(home-page "http://racket-lang.org")
(synopsis "Implementation of Scheme and related languages")
(description
(define-public gambit-c
(package
(name "gambit-c")
- (version "4.8.8")
+ (version "4.9.1")
(source
(origin
(method url-fetch)
(string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
".tgz"))
(sha256
- (base32 "1plw1id94mpg2c4y6q9z39ndcz1hbxfnp3i08szsg6794rasmgkk"))))
+ (base32 "14x9xa0yh7187alzw2m937jnh4csj0dyywi3va8bhi7aaw4p5qai"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
;; According to the ./configure script, this makes the build slower and
;; use >= 1 GB memory, but makes Gambit much faster.
- '("--enable-single-host")
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'fix-tests
- (lambda _
- (substitute* '("tests/makefile")
- ;; '-:' is how run-time options are set. 'tl' sets some terminal
- ;; option, which makes it fail in our build environment. It
- ;; recommends using 'd-' as a solution, which sets the REPL
- ;; interaction channel to stdin/stdout.
- (("gsi -:tl") "gsi -:d-,tl"))
- #t)))))
- (home-page "http://www.iro.umontreal.ca/~gambit/")
+ '("--enable-single-host")))
+ (home-page "http://dynamo.iro.umontreal.ca/wiki/index.php/Main_Page")
(synopsis "Efficient Scheme interpreter and compiler")
(description
"Gambit consists of two main programs: gsi, the Gambit Scheme
(origin
(method url-fetch/tarbomb)
(modules '((guix build utils)))
- (snippet
- ;; Remove binary code
- '(delete-file-recursively "scmutils/mit-scheme"))
+ (snippet '(begin
+ ;; Remove binary code
+ (delete-file-recursively "scmutils/mit-scheme")
+ #t))
(uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/6946"
"/scmutils-tarballs/" name "-" version
"-x86-64-gnu-linux.tar.gz"))
"| mit-scheme")))
(with-directory-excursion "scmutils/scmutils"
(and (zero? (system "mit-scheme < compile.scm"))
- (zero? (system make-img)))))))
+ (zero? (system make-img))))
+ #t)))
(add-before 'install 'fix-directory-names
;; Correct directory names in the startup script.
(lambda* (#:key inputs outputs #:allow-other-keys)
;; code.
(lambda* (#:key inputs outputs #:allow-other-keys)
(with-directory-excursion "scmutils/scmutils"
- (zero? (apply system* "etags"
- (find-files "." "\\.scm"))))))
+ (apply invoke "etags" (find-files "." "\\.scm")))
+ #t))
(replace 'install
;; Copy files to the store.
(lambda* (#:key outputs #:allow-other-keys)
(setenv "PATH" (string-append gzip "/bin"
":" texinfo "/bin"))
(mkdir-p info-dir)
- (and (zero?
- (system* "makeinfo" "--output"
- (string-append info-dir "/sicp.info")
- (string-append source "/sicp-pocket.texi")))
- (every zero?
- (map (cut system* "gzip" "-9n" <>)
- (find-files info-dir))))))))
+ (invoke "makeinfo" "--output"
+ (string-append info-dir "/sicp.info")
+ (string-append source "/sicp-pocket.texi"))
+ (for-each (cut invoke "gzip" "-9n" <>)
+ (find-files info-dir))
+ #t))))
(home-page "https://sarabander.github.io/sicp")
(synopsis "Structure and Interpretation of Computer Programs")
(description "Structure and Interpretation of Computer Programs (SICP) is
"/rx")))
(chdir (assoc-ref %build-inputs "source"))
(mkdir-p share)
- (copy-recursively "." share)))))
+ (copy-recursively "." share)
+ #t))))
(native-inputs
`(("source" ,source)
("scheme48" ,scheme48)))
(add-after 'install 'remove-bin-share
(lambda* (#:key inputs outputs #:allow-other-keys)
(delete-file-recursively
- (string-append (assoc-ref outputs "out") "/bin"))))
+ (string-append (assoc-ref outputs "out") "/bin"))
+ #t))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (zero? (system* "./configure"
- (string-append "--prefix="
- (assoc-ref outputs "out")))))))))
+ (invoke "./configure"
+ (string-append "--prefix="
+ (assoc-ref outputs "out"))))))))
(native-inputs `(("unzip" ,unzip)
("texinfo" ,texinfo)))
(home-page "http://people.csail.mit.edu/jaffer/SLIB.html")
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (zero? (system* "./configure"
- (string-append "--prefix="
- (assoc-ref outputs "out"))))))
+ (invoke "./configure"
+ (string-append "--prefix="
+ (assoc-ref outputs "out")))))
(add-before 'build 'pre-build
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "Makefile"
- (("ginstall-info") "install-info"))))
+ (("ginstall-info") "install-info"))
+ #t))
(replace 'build
(lambda* (#:key inputs outputs #:allow-other-keys)
(setenv "SCHEME_LIBRARY_PATH"
(string-append (assoc-ref inputs "slib")
"/lib/slib/"))
- (and
- (zero? (system* "make" "scmlit" "CC=gcc"))
- (zero? (system* "make" "all")))))
+ (invoke "make" "scmlit" "CC=gcc")
+ (invoke "make" "all")))
(add-after 'install 'post-install
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((req
- (string-append (assoc-ref outputs "out")
- "/lib/scm/require.scm")))
- (and
- (delete-file req)
- (format (open req (logior O_WRONLY O_CREAT))
- "(define (library-vicinity) ~s)\n"
- (string-append (assoc-ref inputs "slib")
- "/lib/slib/"))
-
- ;; We must generate the slibcat file
- (zero? (system*
- (string-append
- (assoc-ref outputs "out")
- "/bin/scm")
- "-br" "new-catalog")))))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (req (string-append out "/lib/scm/require.scm")))
+ (delete-file req)
+ (format (open req (logior O_WRONLY O_CREAT))
+ "(define (library-vicinity) ~s)\n"
+ (string-append (assoc-ref inputs "slib")
+ "/lib/slib/"))
+
+ ;; We must generate the slibcat file.
+ (invoke (string-append out "/bin/scm")
+ "-br" "new-catalog")))))))
(inputs `(("slib" ,slib)))
(native-inputs `(("unzip" ,unzip)
("texinfo" ,texinfo)))
generate C files whose binaries can be dynamically or statically
linked with a SCM executable.")
(license lgpl3+)))
+
+(define-public tinyscheme
+ (package
+ (name "tinyscheme")
+ (version "1.41")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/" name "/" name "/"
+ name "-" version "/" name "-" version ".zip"))
+ (sha256
+ (base32
+ "0yqma4jrjgj95f3hf30h542x97n8ah234n19yklbqq0phfsa08wf"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (invoke "unzip" source)
+ (chdir (string-append ,name "-" ,version))
+ #t))
+ (add-after 'unpack 'set-scm-directory
+ ;; Hard-code ‘our’ init.scm instead of looking in the current
+ ;; working directory, so invoking ‘scheme’ just works.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (scm (string-append out "/share/" ,name)))
+ (substitute* "scheme.c"
+ (("init.scm" all)
+ (string-append scm "/" all)))
+ #t)))
+ (delete 'configure) ; no configure script
+ (replace 'install
+ ;; There's no ‘install’ target. Install files manually.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (doc (string-append out "/share/doc/"
+ ,name "-" ,version))
+ (include (string-append out "/include"))
+ (lib (string-append out "/lib"))
+ (scm (string-append out "/share/" ,name)))
+ (install-file "scheme" bin)
+ (install-file "Manual.txt" doc)
+ (install-file "scheme.h" include)
+ (install-file "libtinyscheme.so" lib)
+ (install-file "init.scm" scm)
+ #t))))
+ #:tests? #f)) ; no tests
+ (home-page "http://tinyscheme.sourceforge.net/")
+ (synopsis "Light-weight interpreter for the Scheme programming language")
+ (description
+ "TinyScheme is a light-weight Scheme interpreter that implements as large a
+subset of R5RS as was possible without getting very large and complicated.
+
+It's meant to be used as an embedded scripting interpreter for other programs.
+As such, it does not offer an Integrated Development Environment (@dfn{IDE}) or
+extensive toolkits, although it does sport a small (and optional) top-level
+loop.
+
+As an embedded interpreter, it allows multiple interpreter states to coexist in
+the same program, without any interference between them. Foreign functions in C
+can be added and values can be defined in the Scheme environment. Being quite a
+small program, it is easy to comprehend, get to grips with, and use.")
+ (license bsd-3))) ; there are no licence headers
+
+(define-public stalin
+ (let ((commit "ed1c9e339c352b7a6fee40bb2a47607c3466f0be"))
+ ;; FIXME: The Stalin "source" contains C code generated by itself:
+ ;; 'stalin-AMD64.c', etc.
+ (package
+ (name "stalin")
+ (version "0.11")
+ (source (origin
+ ;; Use Pearlmutter's upstream branch with AMD64 patches
+ ;; applied. Saves us from including those 20M! patches
+ ;; in Guix. For more info, see:
+ ;; <ftp.ecn.purdue.edu/qobi/stalin-0.11-amd64-patches.tgz>
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/barak/stalin.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "15a5gxj9v7jqlgkg0543gdflw0rbrir7fj5zgifnb33m074wiyhn"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; remove gc libs from build, we have them as input
+ '(begin
+ (delete-file "gc6.8.tar.gz")
+ (delete-file-recursively "benchmarks")
+ (substitute* "build"
+ ((".*gc6.8.*") "")
+ ((" cd \\.\\.") "")
+ ((".*B include/libgc.a") "")
+ ((".*make.*") ""))
+ #t))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list "ARCH_OPTS=-freg-struct-return")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include-out (string-append out "/include")))
+ (invoke "./build")
+ (for-each (lambda (fname)
+ (install-file fname include-out))
+ (find-files "include"))
+ (substitute* "makefile"
+ (("\\./include") include-out))
+ (substitute* "post-make"
+ (("`pwd`") out))
+ #t)))
+ (delete 'check)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "stalin.1"
+ (string-append out "/share/man/man1"))
+ (install-file "stalin"
+ (string-append out "/bin"))
+ #t))))))
+ (inputs
+ `(("libx11" ,libx11)))
+ (propagated-inputs
+ `(("libgc" ,libgc)))
+ (supported-systems '("x86_64-linux"))
+ (home-page "https://engineering.purdue.edu/~qobi/papers/fdlcc.pdf")
+ (synopsis "Brutally efficient Scheme compiler")
+ (description
+ "Stalin is an aggressively optimizing whole-program compiler
+for Scheme that does polyvariant interprocedural flow analysis,
+flow-directed interprocedural escape analysis, flow-directed
+lightweight CPS conversion, flow-directed lightweight closure
+conversion, flow-directed interprocedural lifetime analysis, automatic
+in-lining, unboxing, and flow-directed program-specific and
+program-point-specific low-level representation selection and code
+generation.")
+ (license gpl2+))))
+
+(define-public femtolisp
+ (let ((commit "68c5b1225572ecf2c52baf62f928063e5a30511b")
+ (revision "1"))
+ (package
+ (name "femtolisp")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JeffBezanson/femtolisp.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "04rnwllxnl86zw8c6pwxznn49bvkvh0f1lfliy085vjzvlq3rgja"))))
+ ;; See "utils.h" for supported systems. Upstream bug:
+ ;; https://github.com/JeffBezanson/femtolisp/issues/25
+ (supported-systems
+ (fold delete %supported-systems
+ '("armhf-linux" "mips64el-linux" "aarch64-linux")))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("CC=gcc" "release")
+ #:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; No configure script
+ (replace 'install ; Makefile has no 'install phase
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "flisp" bin)
+ #t)))
+ ;; The flisp binary is now available, run bootstrap to
+ ;; generate flisp.boot and afterwards runs make test.
+ (add-after 'install 'bootstrap-gen-and-test
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (and
+ (zero? (system* "./bootstrap.sh"))
+ (install-file "flisp.boot" bin))))))))
+ (synopsis "Scheme-like lisp implementation")
+ (description
+ "@code{femtolisp} is a scheme-like lisp implementation with a
+simple, elegant Scheme dialect. It is a lisp-1 with lexical scope.
+The core is 12 builtin special forms and 33 builtin functions.")
+ (home-page "https://github.com/JeffBezanson/femtolisp")
+ (license bsd-3))))
+
+(define-public gauche
+ (package
+ (name "gauche")
+ (version "0.9.7")
+ (home-page "http://practical-scheme.net/gauche/index.html")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/gauche/Gauche/Gauche-"
+ version ".tgz"))
+ (sha256
+ (base32
+ "181nycikma0rwrb1h6mi3kys11f8628pq8g5r3fg5hiz5sabscrd"))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Remove libatomic-ops
+ (delete-file-recursively "gc/libatomic_ops")
+ #t))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libatomic-ops" ,libatomic-ops)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("texinfo" ,texinfo)
+ ("openssl" ,openssl) ; needed for tests
+ ("pkg-config" ,pkg-config))) ; needed to find external libatomic-ops
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-/bin/sh
+ ;; needed only for tests
+ (lambda _
+ (substitute* '("configure"
+ "test/www.scm"
+ "ext/tls/test.scm"
+ "gc/configure"
+ "lib/gauche/configure.scm"
+ "lib/gauche/package/util.scm"
+ "lib/gauche/process.scm")
+ (("/bin/sh") (which "sh")))
+ #t))
+ (add-after 'build 'build-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (with-directory-excursion "doc"
+ (for-each
+ (lambda (target)
+ (invoke "make" target))
+ '("info" "html" "htmls"))))
+ #t))
+ (add-before 'check 'patch-normalize-test
+ ;; neutralize sys-normalize-pathname test as it relies on
+ ;; the home directory; (setenv "HOME" xx) isn't enough)
+ (lambda _
+ (substitute* "test/system.scm"
+ (("~/abc") "//abc"))
+ #t))
+ (add-before 'check 'patch-network-tests
+ ;; remove net checks
+ (lambda _
+ (substitute* "ext/Makefile"
+ (("binary net termios") "binary termios"))
+ #t))
+ (add-after 'install 'install-docs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (with-directory-excursion "doc"
+ (invoke "make" "install")))
+ #t)))))
+ (synopsis "Scheme scripting engine")
+ (description "Gauche is a R7RS Scheme scripting engine aiming at being a
+handy tool that helps programmers and system administrators to write small to
+large scripts quickly. Quick startup, built-in system interface, native
+multilingual support are some of the goals. Gauche comes with a package
+manager/installer @code{gauche-package} which can download, compile, install
+and list gauche extension packages. There are currently 58 packages
+available.")
+ (license bsd-3)))