anchor.diff:        cargoDepsCopy="$sourceRoot/${cargoVendorDir}"
       '';
   
  +  hostConfig = stdenv.hostPlatform.config;
  +
  +  rustHostConfig = {
  +    "x86_64-pc-mingw32" = "x86_64-pc-windows-gnu";
  +  }."${hostConfig}" or hostConfig;
  +
     ccForBuild="${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc";
     cxxForBuild="${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++";
     ccForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
     cxxForHost="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
  -  releaseDir = "target/${stdenv.hostPlatform.config}/${buildType}";
  -in stdenv.mkDerivation (args // {
  +  releaseDir = "target/${rustHostConfig}/${buildType}";
  +in
  +
  +stdenv.mkDerivation (args // {
     inherit cargoDeps;
   
     patchRegistryDeps = ./patch-registry-deps;
  
positive.code:     [target."${stdenv.buildPlatform.config}"]
      "linker" = "${ccForBuild}"
      ${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
      [target."${stdenv.hostPlatform.config}"]
      "linker" = "${ccForHost}"
      ''}
      EOF
  
negative.code:       "CXX_${stdenv.hostPlatform.config}"="${cxxForHost}" \
        cargo build \
          ${stdenv.lib.optionalString (buildType == "release") "--release"} \
          --target ${rustHostConfig} \
          --frozen ${concatStringsSep " " cargoBuildFlags}
      )
  
  