2013-01-12 11:43:47 +00:00
|
|
|
{ fetchurl, stdenv, makeWrapper, gnum4, texinfo, texLive, automake }:
|
2010-03-17 15:32:12 +00:00
|
|
|
|
2010-04-24 12:09:53 +01:00
|
|
|
let
|
2011-12-01 23:20:31 +00:00
|
|
|
version = "9.1.1";
|
2010-04-24 12:09:53 +01:00
|
|
|
bootstrapFromC = ! (stdenv.isi686 || stdenv.isx86_64);
|
2013-01-12 11:43:47 +00:00
|
|
|
|
|
|
|
arch = if stdenv.isi686 then "-i386"
|
|
|
|
else if stdenv.isx86_64 then "-x86-64"
|
|
|
|
else "";
|
2010-04-24 12:09:53 +01:00
|
|
|
in
|
2010-03-17 15:32:12 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "mit-scheme-${version}";
|
|
|
|
|
2010-04-24 12:09:53 +01:00
|
|
|
# MIT/GNU Scheme is not bootstrappable, so it's recommended to compile from
|
|
|
|
# the platform-specific tarballs, which contain pre-built binaries. It
|
|
|
|
# leads to more efficient code than when building the tarball that contains
|
|
|
|
# generated C code instead of those binaries.
|
|
|
|
src =
|
|
|
|
if stdenv.isi686
|
|
|
|
then fetchurl {
|
|
|
|
url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-i386.tar.gz";
|
2011-12-05 23:22:42 +00:00
|
|
|
sha256 = "0vi760fy550d9db538m0vzbq1mpdncvw9g8bk4lswk0kcdira55z";
|
2010-04-24 12:09:53 +01:00
|
|
|
} else if stdenv.isx86_64
|
|
|
|
then fetchurl {
|
|
|
|
url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-x86-64.tar.gz";
|
2011-12-05 23:22:42 +00:00
|
|
|
sha256 = "1wcxm9hyfc53myvlcn93fyqrnnn4scwkknl9hkbp1cphc6mp291x";
|
2010-04-24 12:09:53 +01:00
|
|
|
} else fetchurl {
|
|
|
|
url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-c-${version}.tar.gz";
|
2011-12-05 23:22:42 +00:00
|
|
|
sha256 = "0pclakzwxbqgy6wqwvs6ml62wgby8ba8xzmwzdwhx1v8wv05yw1j";
|
2010-04-24 12:09:53 +01:00
|
|
|
};
|
2010-03-17 15:32:12 +00:00
|
|
|
|
2013-01-12 11:43:47 +00:00
|
|
|
configurePhase =
|
|
|
|
'' (cd src && ./configure)
|
|
|
|
(cd doc && ./configure)
|
|
|
|
'';
|
|
|
|
|
2010-04-24 12:09:53 +01:00
|
|
|
buildPhase =
|
2011-10-30 11:51:55 +00:00
|
|
|
'' cd src
|
|
|
|
${if bootstrapFromC
|
|
|
|
then "./etc/make-liarc.sh --prefix=$out"
|
|
|
|
else "make compile-microcode"}
|
|
|
|
|
|
|
|
cd ../doc
|
|
|
|
|
|
|
|
# Provide a `texinfo.tex'.
|
|
|
|
export TEXINPUTS="$(echo ${automake}/share/automake-*)"
|
|
|
|
echo "\$TEXINPUTS is \`$TEXINPUTS'"
|
|
|
|
make
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase =
|
2013-01-12 11:43:47 +00:00
|
|
|
'' make prefix=$out install -C src
|
|
|
|
make prefix=$out install -C doc
|
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase =
|
|
|
|
'' wrapProgram $out/bin/mit-scheme${arch} --set MITSCHEME_LIBRARY_PATH \
|
|
|
|
$out/lib/mit-scheme${arch}
|
2011-10-30 11:51:55 +00:00
|
|
|
'';
|
2010-04-24 12:09:53 +01:00
|
|
|
|
2013-01-22 22:23:53 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ];
|
2010-03-17 15:32:12 +00:00
|
|
|
|
|
|
|
# XXX: The `check' target doesn't exist.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "MIT/GNU Scheme, a native code Scheme compiler";
|
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' MIT/GNU Scheme is an implementation of the Scheme programming
|
|
|
|
language, providing an interpreter, compiler, source-code debugger,
|
|
|
|
integrated Emacs-like editor, and a large runtime library. MIT/GNU
|
|
|
|
Scheme is best suited to programming large applications with a rapid
|
|
|
|
development cycle.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/mit-scheme/;
|
|
|
|
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2010-03-17 15:32:12 +00:00
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
2010-04-24 22:03:00 +01:00
|
|
|
|
|
|
|
# Build fails on Cygwin and Darwin:
|
|
|
|
# <http://article.gmane.org/gmane.lisp.scheme.mit-scheme.devel/489>.
|
|
|
|
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.freebsd;
|
2014-08-08 16:58:34 +01:00
|
|
|
|
|
|
|
broken = true;
|
2010-03-17 15:32:12 +00:00
|
|
|
};
|
|
|
|
}
|