buildGoModule: add ./ to all sub-packages (#63936)
When $subPackages has more than one item, the build was failing because ./ was added only to the first subPackage. This commit adds ./ to all specified subPackages.
This commit is contained in:
parent
5b7e3718ee
commit
1474220823
@ -125,7 +125,7 @@ let
|
|||||||
local type;
|
local type;
|
||||||
type="$1"
|
type="$1"
|
||||||
if [ -n "$subPackages" ]; then
|
if [ -n "$subPackages" ]; then
|
||||||
echo "./$subPackages"
|
echo "$subPackages" | sed "s,\(^\| \),\1./,g"
|
||||||
else
|
else
|
||||||
find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique
|
find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique
|
||||||
fi
|
fi
|
||||||
@ -144,6 +144,7 @@ let
|
|||||||
export NIX_BUILD_CORES=1
|
export NIX_BUILD_CORES=1
|
||||||
fi
|
fi
|
||||||
for pkg in $(getGoDirs ""); do
|
for pkg in $(getGoDirs ""); do
|
||||||
|
echo "Building subPackage $pkg"
|
||||||
buildGoDir install "$pkg"
|
buildGoDir install "$pkg"
|
||||||
done
|
done
|
||||||
'' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
'' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user