@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, gcc, glibc, m4, coreutils }:
1+{ stdenv, fetchurl, bootstrap_cmds, coreutils, glibc, m4 }:
22
33let
44 options = rec {
@@ -27,19 +27,11 @@ let
2727 runtime = "dx86cl64";
2828 kernel = "darwinx8664";
2929 };
30− i686-darwin = {
31− arch = "darwinx86";
32− sha256 = x86_64-darwin.sha256;
33− runtime = "dx86cl";
34− kernel = "darwinx8632";
35− };
3630 armv6l-linux = armv7l-linux;
3731 };
38− cfg = options.${stdenv.system};
32+ cfg = options."${stdenv.system}" or (throw "missing source url for platform ${stdenv.system}");
3933in
4034
41−assert builtins.hasAttr stdenv.system options;
42−
4335stdenv.mkDerivation rec {
4436 name = "ccl-${version}";
4537 version = "1.11.5";
@@ -49,7 +41,7 @@ stdenv.mkDerivation rec {
4941 sha256 = cfg.sha256;
5042 };
5143
52− buildInputs = if stdenv.isDarwin then [ m4 ] else [ gcc glibc m4 ];
44+ buildInputs = if stdenv.isDarwin then [ bootstrap_cmds m4 ] else [ glibc m4 ];
5345
5446 CCL_RUNTIME = cfg.runtime;
5547 CCL_KERNEL = cfg.kernel;
@@ -58,7 +50,6 @@ stdenv.mkDerivation rec {
5850 substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
5951 --replace "M4 = gm4" "M4 = m4" \
6052 --replace "dtrace" "/usr/sbin/dtrace" \
61− --replace "mig" "/usr/bin/mig" \
6253 --replace "/bin/rm" "${coreutils}/bin/rm" \
6354 --replace "/bin/echo" "${coreutils}/bin/echo"
6455