Merge pull request #133017 from leungbk/update-mit-scheme

mit-scheme: 10.1.10 -> 11.2
This commit is contained in:
Sandro 2021-08-08 05:10:40 +02:00 committed by GitHub
commit 40805a4658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 37 deletions

View file

@ -1,12 +1,15 @@
{ fetchurl, lib, stdenv, makeWrapper, gnum4, texinfo, texLive, automake,
enableX11 ? false, xlibsWrapper ? null }:
autoconf, libtool, ghostscript, ncurses,
enableX11 ? false, xlibsWrapper }:
let
version = "10.1.10";
bootstrapFromC = ! (stdenv.isi686 || stdenv.isx86_64);
version = "11.2";
bootstrapFromC = ! ((stdenv.isLinux && stdenv.isAarch64) || stdenv.isx86_64);
arch = if stdenv.isi686 then "-i386"
else "-x86-64";
arch = if stdenv.isLinux && stdenv.isAarch64 then
"-aarch64le"
else
"-x86-64";
in
stdenv.mkDerivation {
name = if enableX11 then "mit-scheme-x11-${version}" else "mit-scheme-${version}";
@ -16,49 +19,55 @@ stdenv.mkDerivation {
# leads to more efficient code than when building the tarball that contains
# generated C code instead of those binaries.
src =
if stdenv.isi686
if stdenv.isLinux && stdenv.isAarch64
then fetchurl {
url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-i386.tar.gz";
sha256 = "117lf06vcdbaa5432hwqnskpywc6x8ai0gj99h480a4wzkp3vhy6";
url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-aarch64le.tar.gz";
sha256 = "11maixldk20wqb5js5p4imq221zz9nf27649v9pqkdf8fv7rnrs9";
} else fetchurl {
url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-x86-64.tar.gz";
sha256 = "1rljv6iddrbssm91c0nn08myj92af36hkix88cc6qwq38xsxs52g";
sha256 = "17822hs9y07vcviv2af17p3va7qh79dird49nj50bwi9rz64ia3w";
};
buildInputs = if enableX11 then [xlibsWrapper] else [];
buildInputs = [ ncurses ] ++ lib.optional enableX11 xlibsWrapper;
configurePhase =
'' (cd src && ./configure)
(cd doc && ./configure)
'';
configurePhase = ''
runHook preConfigure
(cd src && ./configure)
(cd doc && ./configure)
runHook postConfigure
'';
buildPhase =
'' cd src
${if bootstrapFromC
then "./etc/make-liarc.sh --prefix=$out"
else "make compile-microcode"}
buildPhase = ''
runHook preBuild
cd src
cd ../doc
${if bootstrapFromC
then "./etc/make-liarc.sh --prefix=$out"
else "make compile-microcode"}
# Provide a `texinfo.tex'.
export TEXINPUTS="$(echo ${automake}/share/automake-*)"
echo "\$TEXINPUTS is \`$TEXINPUTS'"
make
cd ../doc
cd ..
'';
make
installPhase =
'' make prefix=$out install -C src
make prefix=$out install -C doc
'';
cd ..
fixupPhase =
runHook postBuild
'';
installPhase = ''
runHook preInstall
make prefix=$out install -C src
make prefix=$out install -C doc
runHook postInstall
'';
postFixup =
'' wrapProgram $out/bin/mit-scheme${arch} --set MITSCHEME_LIBRARY_PATH \
$out/lib/mit-scheme${arch}
'';
nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ];
nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ghostscript autoconf libtool ];
# XXX: The `check' target doesn't exist.
doCheck = false;

View file

@ -11926,14 +11926,10 @@ in
mint = callPackage ../development/compilers/mint { };
mitscheme = callPackage ../development/compilers/mit-scheme {
texLive = texlive.combine { inherit (texlive) scheme-small; };
texinfo = texinfo5;
xlibsWrapper = null;
texLive = texlive.combine { inherit (texlive) scheme-small epsf texinfo; };
};
mitschemeX11 = mitscheme.override {
texLive = texlive.combine { inherit (texlive) scheme-small; };
texinfo = texinfo5;
enableX11 = true;
};