@@ -1,4 +1,4 @@
1−{ stdenv, fetchgit, coreutils, ncurses, libX11 }:
1+{ stdenv, fetchgit, coreutils, cctools, ncurses, libiconv, libX11 }:
22
33stdenv.mkDerivation rec {
44 name = "chez-scheme-${version}";
@@ -12,8 +12,9 @@ stdenv.mkDerivation rec {
1212 fetchSubmodules = true;
1313 };
1414
15− enableParallelBuilding = true;
16− buildInputs = [ ncurses libX11 ];
15+ nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
16+
17+ buildInputs = [ ncurses libiconv libX11 ];
1718
1819 /* We patch out a very annoying 'feature' in ./configure, which
1920 ** tries to use 'git' to update submodules.
@@ -27,11 +28,14 @@ stdenv.mkDerivation rec {
2728 --replace "git submodule init && git submodule update || exit 1" "true"
2829
2930 substituteInPlace ./workarea \
30− --replace "/bin/ln" "${coreutils}/bin/ln" \
31− --replace "/bin/cp" "${coreutils}/bin/cp"
31+ --replace "/bin/ln" ln \
32+ --replace "/bin/cp" cp
3233
3334 substituteInPlace ./makefiles/installsh \
3435 --replace "/usr/bin/true" "${coreutils}/bin/true"
36+
37+ substituteInPlace zlib/configure \
38+ --replace "/usr/bin/libtool" libtool
3539 '';
3640
3741 /* Don't use configureFlags, since that just implicitly appends
@@ -42,11 +46,13 @@ stdenv.mkDerivation rec {
4246 ./configure --threads --installprefix=$out --installman=$out/share/man
4347 '';
4448
49+ enableParallelBuilding = true;
50+
4551 meta = {
4652 description = "A powerful and incredibly fast R6RS Scheme compiler";
4753 homepage = "http://www.scheme.com";
4854 license = stdenv.lib.licenses.asl20;
49− platforms = stdenv.lib.platforms.linux;
55+ platforms = stdenv.lib.platforms.unix;
5056 maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
5157 };
5258}