go-modules: Cleanup submodule detection

Also, only build the sources that matter for distribution
This commit is contained in:
William A. Kennington III 2015-05-14 17:42:11 -07:00
parent fecf412767
commit 1a045673f6

View File

@ -55,12 +55,10 @@ go.stdenv.mkDerivation ( args // {
go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $goPackagePath/$p
done
else
find . -type d | while read d; do
for i in $d/*.go; do
(cd go/src
find $goPackagePath -type f -name \*.go -exec dirname {} \; | sort | uniq | while read d; do
go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $d
break
done
done
done)
fi
runHook postBuild
@ -74,12 +72,10 @@ go.stdenv.mkDerivation ( args // {
go test -p $NIX_BUILD_CORES -v $goPackagePath/$p
done
else
find . -type d | while read d; do
for i in $d/*_test.go; do
(cd go/src
find $goPackagePath -type f -name \*_test.go -exec dirname {} \; | sort | uniq | while read d; do
go test -p $NIX_BUILD_CORES -v $d
break
done
done
done)
fi
runHook postCheck