anchor.diff:          echo "$d" | grep -q "\(/_\|examples\|Godeps\)" && return 0
           [ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && return 0
           local OUT
  -        if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" -v $d 2>&1)"; then
  +        if ! OUT="$(go $cmd $buildFlags "''${buildFlagsArray[@]}" -v -p $NIX_BUILD_CORES $d 2>&1)"; then
             if ! echo "$OUT" | grep -qE '(no( buildable| non-test)?|build constraints exclude all) Go (source )?files'; then
               echo "$OUT" >&2
               return 1
  
positive.code:       else
          touch $TMPDIR/buildFlagsArray
        fi
        export -f buildGoDir # xargs needs to see the function
        if [ -z "$enableParallelBuilding" ]; then
            export NIX_BUILD_CORES=1
        fi
        getGoDirs "" | xargs -n1 -P $NIX_BUILD_CORES bash -c 'buildGoDir install "$@"' --
      '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
        # normalize cross-compiled builds w.r.t. native builds
        (
  
negative.code:     checkPhase = args.checkPhase or ''
        runHook preCheck
  
        for pkg in $(getGoDirs test); do
          buildGoDir test "$pkg"
        done
  
        runHook postCheck
      '';
  