nixpkgs/pkgs/development/compilers/chez/default.nix
Austin Seipp e3e27ecf4e nixpkgs: chez-scheme 9.4-20160501 -> 9.4-20160507
This allows us to remove a hack in the makefile, fixes a few bugs, and
also catches another edge case in the configure scripts.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2016-05-08 03:40:47 +00:00

52 lines
1.6 KiB
Nix

{ stdenv, fetchgit, coreutils, ncurses, libX11 }:
stdenv.mkDerivation rec {
name = "chez-scheme-${version}";
version = "9.4-${dver}";
dver = "20160507";
src = fetchgit {
url = "https://github.com/cisco/chezscheme.git";
rev = "65df1d1f7c37f5b5a93cd7e5b475dda9dbafe03c";
sha256 = "024x79xcdqp665xjyccpn02w6dmdvnhw0h0vdc42g9s5wv5ry92m";
fetchSubmodules = true;
};
enableParallelBuilding = true;
buildInputs = [ ncurses libX11 ];
/* We patch out a very annoying 'feature' in ./configure, which
** tries to use 'git' to update submodules.
**
** 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.
*/
patchPhase = ''
substituteInPlace ./configure \
--replace "git submodule init && git submodule update || exit 1" ""
substituteInPlace ./workarea \
--replace "/bin/ln" "${coreutils}/bin/ln" \
--replace "/bin/cp" "${coreutils}/bin/cp"
substituteInPlace ./makefiles/installsh \
--replace "/usr/bin/true" "${coreutils}/bin/true"
'';
/* 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 ];
};
}