anchor.diff:        cp -r std $out/include/d2
         cp -r etc $out/include/d2
   
  -      wrapProgram $out/bin/dmd --prefix PATH ":" "${gcc}/bin/"
  +      wrapProgram $out/bin/dmd \
  +          --prefix PATH ":" "${stdenv.cc}/bin" \
  +          --set CC "$""{CC:-$CC""}"
   
         cd $out/bin
         tee dmd.conf << EOF
  
positive.code: { stdenv, fetchurl, unzip, curl, makeWrapper, gcc }:
  
  stdenv.mkDerivation {
    name = "dmd-2.067.1";
  
negative.code: 
    buildInputs = [ unzip curl makeWrapper ];
  
    postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
        # Allow to use "clang++", commented in Makefile
        substituteInPlace src/dmd/posix.mak \
            --replace g++ clang++ \
            --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
  
        # Was not able to compile on darwin due to "__inline_isnanl"
        # being undefined.
        substituteInPlace src/dmd/root/port.c --replace __inline_isnanl __inline_isnan
    '';
  
    # Buid and install are based on http://wiki.dlang.org/Building_DMD
  