buildGoPackage: Don't include private directories in the search

This commit is contained in:
William A. Kennington III 2015-05-19 20:12:17 -07:00
parent bd7eb18c1c
commit 8cbb97e6f3

@ -72,6 +72,7 @@ go.stdenv.mkDerivation (
else else
(cd go/src (cd go/src
find $goPackagePath -type f -name \*.go -exec dirname {} \; | sort | uniq | while read d; do 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 [ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && continue
local OUT local OUT
if ! OUT="$(go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $d 2>&1)"; then if ! OUT="$(go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $d 2>&1)"; then