anchor.diff:        patchShebangs .
     ''
   
  +  + stdenv.lib.optionalString (!bootstrapVersion) ''
  +      rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d
  +      rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d
  +      rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d
  +  ''
  +
     + stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
         # https://github.com/NixOS/nixpkgs/issues/34817
         rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall
  
positive.code:   ]
  
    ++ stdenv.lib.optional (bootstrapVersion) [
      libconfig
    ]
  
    ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
  
negative.code:       substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
    '';
  
    nativeBuildInputs = [ cmake ninja makeWrapper unzip ]
  
    ++ stdenv.lib.optional (!bootstrapVersion) [
      bootstrapLdc python lit
    ]
  
    ++ stdenv.lib.optional (!bootstrapVersion && stdenv.hostPlatform.isDarwin) [
      # https://github.com/NixOS/nixpkgs/issues/57120
      # https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515
      llvm
    ]
  
    ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
      llvm_8
    ]
  
    ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
  