mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
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;
|
||||
type="$1"
|
||||
if [ -n "$subPackages" ]; then
|
||||
echo "./$subPackages"
|
||||
echo "$subPackages" | sed "s,\(^\| \),\1./,g"
|
||||
else
|
||||
find . -type f -name \*$type.go -exec dirname {} \; | grep -v "/vendor/" | sort --unique
|
||||
fi
|
||||
|
@ -144,6 +144,7 @@ let
|
|||
export NIX_BUILD_CORES=1
|
||||
fi
|
||||
for pkg in $(getGoDirs ""); do
|
||||
echo "Building subPackage $pkg"
|
||||
buildGoDir install "$pkg"
|
||||
done
|
||||
'' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
|
|
Loading…
Reference in a new issue