anchor.diff:            --replace "dub remove" "\"${dubvar}\" remove"
     '';
   
  -  nativeBuildInputs = [ dmd libevent rsync ];
  +  nativeBuildInputs = [ dcompiler libevent rsync ];
     buildInputs = [ curl ];
   
     buildPhase = ''
  -    export DMD=${dmd.out}/bin/dmd
  -    ./build.sh
  +    for dc_ in dmd ldmd2 gdmd; do
  +      echo "... check for D compiler $dc_ ..."
  +      dc=$(type -P $dc_ || echo "")
  +      if [ ! "$dc" == "" ]; then
  +        break
  +      fi
  +    done
  +    if [ "$dc" == "" ]; then
  +      exit "Error: could not find D compiler"
  +    fi
  +    echo "$dc_ found and used as D compiler to build $pname"
  +    $dc ./build.d
  +    ./build
     '';
   
     doCheck = !stdenv.isDarwin;
  
positive.code:     rm test/issue990-download-optional-selected.sh
      rm test/issue877-auto-fetch-package-on-run.sh
      rm test/issue1037-better-dependency-messages.sh
      rm test/issue1040-run-with-ver.sh
      rm test/issue1416-maven-repo-pkg-supplier.sh
      rm test/issue1180-local-cache-broken.sh
      rm test/issue1574-addcommand.sh
  
negative.code:   checkPhase = ''
      export DUB=$NIX_BUILD_TOP/source/bin/dub
      export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
      export DC=${dcompiler.out}/bin/${dcompiler.pname}
      echo "DC out --> $DC"
      export HOME=$TMP
  
      rm -rf test/issue502-root-import
  