anchor.diff:    '';
   
     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_5
  -  ]
  -
  -  ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
  -    llvm_8
  -  ]
  -
  -  ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) [
  -    # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
  -    gdb
  -  ]
  -
  -  ++ stdenv.lib.optional (bootstrapVersion) [
  -    libconfig llvm_5
  -  ]
  -
  -  ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
  -    Foundation
  -  ]);
  +    ++ stdenv.lib.optionals (!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_5
  +    ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin)
  +      llvm_8
  +    ++ stdenv.lib.optional (!bootstrapVersion && !stdenv.hostPlatform.isDarwin)
  +      # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
  +      gdb
  +    ++ stdenv.lib.optionals (bootstrapVersion) [
  +      libconfig llvm_5
  +    ]
  +    ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin
  +      darwin.apple_sdk.frameworks.Foundation;
   
   
     buildInputs = [ curl tzdata ];
   
  -  cmakeFlagsString = stdenv.lib.optionalString (!bootstrapVersion) ''
  +  cmakeFlags = stdenv.lib.optionals (!bootstrapVersion) [
       "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J$PWD"
       "-DCMAKE_BUILD_TYPE=Release"
  -  '';
  -
  -  preConfigure = stdenv.lib.optionalString (!bootstrapVersion) ''
  -    cmakeFlagsArray=(
  -      ${cmakeFlagsString}
  -    )
  -  '';
  +  ];
   
     postConfigure = ''
       export DMD=$PWD/bin/ldmd2
  
positive.code:   hardeningDisable = [ "fortify" ];
  
    postUnpack = ''
        patchShebangs .
    ''
  
    + stdenv.lib.optionalString (!bootstrapVersion) ''
  
negative.code: 
      fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib")
      export DYLD_LIBRARY_PATH=$(pwd)/lib
    '';
  
    # https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746
    additionalExceptions = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin
      "|druntime-test-shared";
  
    doCheck = !bootstrapVersion;
  
  