Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Chez Scheme on Darwin #32177

Merged
merged 1 commit into from
Nov 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 12 additions & 6 deletions pkgs/development/compilers/chez/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, coreutils, ncurses, libX11 }:
{ stdenv, fetchgit, coreutils, cctools, ncurses, libiconv, libX11 }:

stdenv.mkDerivation rec {
name = "chez-scheme-${version}";
Expand All @@ -12,8 +12,9 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};

enableParallelBuilding = true;
buildInputs = [ ncurses libX11 ];
nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools;

buildInputs = [ ncurses libiconv libX11 ];

/* We patch out a very annoying 'feature' in ./configure, which
** tries to use 'git' to update submodules.
Expand All @@ -27,11 +28,14 @@ stdenv.mkDerivation rec {
--replace "git submodule init && git submodule update || exit 1" "true"

substituteInPlace ./workarea \
--replace "/bin/ln" "${coreutils}/bin/ln" \
--replace "/bin/cp" "${coreutils}/bin/cp"
--replace "/bin/ln" ln \
--replace "/bin/cp" cp

substituteInPlace ./makefiles/installsh \
--replace "/usr/bin/true" "${coreutils}/bin/true"

substituteInPlace zlib/configure \
--replace "/usr/bin/libtool" libtool
'';

/* Don't use configureFlags, since that just implicitly appends
Expand All @@ -42,11 +46,13 @@ stdenv.mkDerivation rec {
./configure --threads --installprefix=$out --installman=$out/share/man
'';

enableParallelBuilding = true;

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;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
};
}
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5456,7 +5456,9 @@ with pkgs;

ccl = callPackage ../development/compilers/ccl { };

chez = callPackage ../development/compilers/chez { };
chez = callPackage ../development/compilers/chez {
inherit (darwin) cctools;
};

clang = llvmPackages.clang;

Expand Down