anchor.diff:      inherit (go) GOOS GOARCH;
   
       GO111MODULE = "on";
  +    GOFLAGS = "-mod=vendor";
   
       configurePhase = args.configurePhase or ''
         runHook preConfigure
  
positive.code:       runHook preInstall
  
        # remove cached lookup results and tiles
        rm -rf "''${GOPATH}/pkg/mod/cache/download/sumdb"
        cp -r "''${GOPATH}/pkg/mod/cache/download" $out
  
        runHook postInstall
      '';
  
      dontFixup = true;
    }; in modArgs // (
      if modSha256 == null then
        { __noChroot = true; }
      else
        {
          outputHashMode = "recursive";
          outputHashAlgo = "sha256";
          outputHash = modSha256;
        }
    ) // overrideModAttrs modArgs);
  
    package = go.stdenv.mkDerivation (args // {
      nativeBuildInputs = [ removeReferencesTo go ] ++ nativeBuildInputs;
  
negative.code:     buildPhase = args.modBuildPhase or ''
        runHook preBuild
  
        if [ ${deleteFlag} == "true" ]; then
          rm -rf vendor
        fi
  
        if [ -e vendor ]; then
          echo "vendor folder exists, please set 'vendorSha256=null;' or 'deleteVendor=true;' in your expression"
          exit 10
        fi
        go mod vendor
        mkdir -p vendor
  
        runHook postBuild
      '';
  