anchor.diff:      usePIC = "-fPIC";
       ROOT_HOME_DIR = "$(echo ~root)";
   
  -    datetimePath = if bootstrapVersion then
  -      "phobos/std/datetime.d"
  -    else
  -      "phobos/std/datetime/timezone.d";
  -
       phobosPatches = ''
           # Ugly hack so the dlopen call has a chance to succeed.
           # https://issues.dlang.org/show_bug.cgi?id=15391
  
positive.code:         make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
          cd ..
      '';
      
      extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}";
  
      dontStrip = true;
  
      installPhase = ''
  
negative.code:     else
        stdenv.hostPlatform.parsed.kernel.name;
      top = "$(echo $NIX_BUILD_TOP)";
      pathToDmd = "${top}/dmd/generated/${osname}/release/${bits}/dmd";
  
      # Buid and install are based on http://wiki.dlang.org/Building_DMD
      buildPhase = ''
          cd dmd
          make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out BUILD=release ENABLE_RELEASE=1 PIC=1 HOST_DMD=ldmd2
          cd ../druntime
          make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
          cd ../phobos
          make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
          cd ..
      '';
  
      # Disable tests on Darwin for now because of
      # https://github.com/NixOS/nixpkgs/issues/41099
      doCheck = !stdenv.hostPlatform.isDarwin;
  
      checkPhase = ''
          cd dmd
  