2016-05-02 00:10:18 +02:00
|
|
|
{ stdenv, fetchgit, coreutils, ncurses, libX11 }:
|
2016-05-01 05:05:16 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "chez-scheme-${version}";
|
2017-10-29 02:04:16 +02:00
|
|
|
version = "9.5-${dver}";
|
2017-11-15 17:19:17 +01:00
|
|
|
dver = "20171109";
|
2016-05-01 05:05:16 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
2016-05-01 22:12:49 +02:00
|
|
|
url = "https://github.com/cisco/chezscheme.git";
|
2017-11-15 17:19:17 +01:00
|
|
|
rev = "bc117fd4d567a6863689fec6814882a0f04e577a";
|
|
|
|
sha256 = "1adzw7bgdz0p4xmccc6awdkb7bp6xba9mnlsh3r3zvblqfci8i70";
|
2016-05-01 05:05:16 +02:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2016-05-02 00:10:18 +02:00
|
|
|
enableParallelBuilding = true;
|
2016-05-01 05:05:16 +02:00
|
|
|
buildInputs = [ ncurses libX11 ];
|
|
|
|
|
2016-05-08 05:40:43 +02:00
|
|
|
/* We patch out a very annoying 'feature' in ./configure, which
|
|
|
|
** tries to use 'git' to update submodules.
|
2016-05-01 05:05:16 +02:00
|
|
|
**
|
2016-05-08 05:40:43 +02:00
|
|
|
** We have to also fix a few occurrences to tools with absolute
|
|
|
|
** paths in some helper scripts, otherwise the build will fail on
|
|
|
|
** NixOS or in any chroot build.
|
2016-05-01 05:05:16 +02:00
|
|
|
*/
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace ./configure \
|
2017-10-29 02:04:16 +02:00
|
|
|
--replace "git submodule init && git submodule update || exit 1" "true"
|
2016-05-02 00:10:18 +02:00
|
|
|
|
|
|
|
substituteInPlace ./workarea \
|
2016-05-08 05:40:43 +02:00
|
|
|
--replace "/bin/ln" "${coreutils}/bin/ln" \
|
|
|
|
--replace "/bin/cp" "${coreutils}/bin/cp"
|
2016-05-02 00:10:18 +02:00
|
|
|
|
|
|
|
substituteInPlace ./makefiles/installsh \
|
|
|
|
--replace "/usr/bin/true" "${coreutils}/bin/true"
|
2016-05-01 05:05:16 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
/* Don't use configureFlags, since that just implicitly appends
|
|
|
|
** everything onto a --prefix flag, which ./configure gets very angry
|
|
|
|
** about.
|
|
|
|
*/
|
|
|
|
configurePhase = ''
|
|
|
|
./configure --threads --installprefix=$out --installman=$out/share/man
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A powerful and incredibly fast R6RS Scheme compiler";
|
|
|
|
homepage = "http://www.scheme.com";
|
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|