anchor.diff:      mkdir -p $out
   
       if [ -z "$dontInstallSrc" ]; then
  -        (cd "$NIX_BUILD_TOP/go"
  -        find . -type f | while read f; do
  +        pushd "$NIX_BUILD_TOP/go"
  +        while read f; do
             echo "$f" | grep -q '^./\(src\|pkg/[^/]*\)/${goPackagePath}' || continue
             mkdir -p "$(dirname "$out/share/go/$f")"
             cp $NIX_BUILD_TOP/go/$f $out/share/go/$f
  -        done)
  +        done < <(find . -type f)
  +        popd
       fi
   
       dir="$NIX_BUILD_TOP/go/bin"
  
positive.code: 
      runHook renameImports
  
      if [ -n "$subPackages" ] ; then
          for p in $subPackages ; do
              go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $goPackagePath/$p
          done
      else
          (cd go/src
          find $goPackagePath -type f -name \*.go -exec dirname {} \; | sort | uniq | while read d; do
              echo "$d" | grep -q "/_" && continue
              [ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && continue
              local OUT
  
negative.code:             if [ -n "$OUT" ]; then
                echo "$OUT" >&2
              fi
            } &
            PIDS+=("$!")
          done < <(find $goPackagePath -type f -name \*.go -exec dirname {} \; | sort | uniq)
          popd
      fi
  
      # Exit on error from the parallel process
      for PID in "''${PIDS[@]}"; do
          wait $PID || exit 1
      done
  
      runHook postBuild
    '';
  