ccl: fix darwin build

/cc ZHF #36454
This commit is contained in:
Daiderd Jordan 2018-03-14 23:02:52 +01:00
parent b546c7440e
commit ee6d0a7025
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 6 additions and 13 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gcc, glibc, m4, coreutils }:
{ stdenv, fetchurl, bootstrap_cmds, coreutils, glibc, m4 }:
let
options = rec {
@ -27,19 +27,11 @@ let
runtime = "dx86cl64";
kernel = "darwinx8664";
};
i686-darwin = {
arch = "darwinx86";
sha256 = x86_64-darwin.sha256;
runtime = "dx86cl";
kernel = "darwinx8632";
};
armv6l-linux = armv7l-linux;
};
cfg = options.${stdenv.system};
cfg = options."${stdenv.system}" or (throw "missing source url for platform ${stdenv.system}");
in
assert builtins.hasAttr stdenv.system options;
stdenv.mkDerivation rec {
name = "ccl-${version}";
version = "1.11.5";
@ -49,7 +41,7 @@ stdenv.mkDerivation rec {
sha256 = cfg.sha256;
};
buildInputs = if stdenv.isDarwin then [ m4 ] else [ gcc glibc m4 ];
buildInputs = if stdenv.isDarwin then [ bootstrap_cmds m4 ] else [ glibc m4 ];
CCL_RUNTIME = cfg.runtime;
CCL_KERNEL = cfg.kernel;
@ -58,7 +50,6 @@ stdenv.mkDerivation rec {
substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
--replace "M4 = gm4" "M4 = m4" \
--replace "dtrace" "/usr/sbin/dtrace" \
--replace "mig" "/usr/bin/mig" \
--replace "/bin/rm" "${coreutils}/bin/rm" \
--replace "/bin/echo" "${coreutils}/bin/echo"

View File

@ -5797,7 +5797,9 @@ with pkgs;
chickenEggs = callPackage ../development/tools/egg2nix/chicken-eggs.nix { };
};
ccl = callPackage ../development/compilers/ccl { };
ccl = callPackage ../development/compilers/ccl {
inherit (darwin) bootstrap_cmds;
};
chez = callPackage ../development/compilers/chez {
inherit (darwin) cctools;