summary refs log tree commit diff
path: root/pkgs/development/compilers/chez/default.nix
diff options
context:
space:
mode:
authorJason Felice <jason.m.felice@gmail.com>2017-11-29 14:00:18 -0500
committerOrivej Desh <orivej@gmx.fr>2017-11-29 19:26:13 +0000
commited38976d9af4bba920063d4bb0a4642e0e466315 (patch)
treeaf31c7270d2dd0d782a4134af52a226773b277a4 /pkgs/development/compilers/chez/default.nix
parent2dfbc5f8ed5b2ad6e6d46e66af15d89a2cb8a7df (diff)
downloadnixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.tar
nixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.tar.gz
nixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.tar.bz2
nixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.tar.lz
nixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.tar.xz
nixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.tar.zst
nixpkgs-ed38976d9af4bba920063d4bb0a4642e0e466315.zip
chez: support Darwin
Diffstat (limited to 'pkgs/development/compilers/chez/default.nix')
-rw-r--r--pkgs/development/compilers/chez/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix
index cd9a8e514e9..f238e5f8fb5 100644
--- a/pkgs/development/compilers/chez/default.nix
+++ b/pkgs/development/compilers/chez/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, coreutils, ncurses, libX11 }:
+{ stdenv, fetchgit, coreutils, cctools, ncurses, libiconv, libX11 }:
 
 stdenv.mkDerivation rec {
   name    = "chez-scheme-${version}";
@@ -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.
@@ -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
@@ -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 ];
   };
 }