mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
buildGoPackage: Skip directories which don't have buildable go packages
This commit is contained in:
parent
1a045673f6
commit
0ff12d88ea
@ -57,7 +57,13 @@ go.stdenv.mkDerivation ( args // {
|
|||||||
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
|
||||||
go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $d
|
local OUT;
|
||||||
|
if ! OUT="$(go install $buildFlags "''${buildFlagsArray[@]}" -p $NIX_BUILD_CORES -v $d 2>&1)"; then
|
||||||
|
if ! echo "$OUT" | grep -q 'no buildable Go source files'; then
|
||||||
|
echo "$OUT" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done)
|
done)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user