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.
wip/yesman
Wael Nasreddine 5 years ago committed by GitHub
parent 5b7e3718ee
commit 1474220823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkgs/development/go-modules/generic/default.nix

@ -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…
Cancel
Save