anchor.diff:      sha256 = cfg.sha256;
     };
   
  -  buildInputs = [ gcc glibc m4 ];
  +  buildInputs = if stdenv.isDarwin then [ m4 ] else [ gcc glibc m4 ];
   
     CCL_RUNTIME = cfg.runtime;
     CCL_KERNEL = cfg.kernel;
   
  -  postPatch = ''
  +  postPatch = if stdenv.isDarwin then ''
  +    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"
  +
  +    substituteInPlace lisp-kernel/m4macros.m4 \
  +      --replace "/bin/pwd" "${coreutils}/bin/pwd"
  +  '' else ''
       substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
         --replace "/bin/rm"    "${coreutils}/bin/rm" \
         --replace "/bin/echo"  "${coreutils}/bin/echo"
  
positive.code:     cp -r .  "$out/share/ccl-installation"
  
      mkdir -p "$out/bin"
      echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
      chmod a+x "$out"/bin/"${CCL_RUNTIME}"
      ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
    '';
  
negative.code:       runtime = "armcl";
        kernel = "linuxarm";
      };
      x86_64-darwin = {
        arch = "darwinx86";
        sha256 = "5adbea3d8b4a2e29af30d141f781c6613844f468c0ccfa11bae908c3e9641939";
        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};
  