buildGo{Module,Package}: minor cleanup

This commit is contained in:
zowoq 2023-04-08 13:27:40 +10:00
parent c1d9e46fc5
commit dc73bd6430
2 changed files with 4 additions and 8 deletions

View file

@ -107,7 +107,7 @@ let
buildPhase = args.modBuildPhase or ''
runHook preBuild
'' + lib.optionalString (deleteVendor == true) ''
'' + lib.optionalString deleteVendor ''
if [ ! -d vendor ]; then
echo "vendor folder does not exist, 'deleteVendor' is not needed"
exit 10
@ -174,7 +174,7 @@ let
GO111MODULE = "on";
GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ];
inherit CGO_ENABLED;
inherit CGO_ENABLED enableParallelBuilding;
configurePhase = args.configurePhase or ''
runHook preConfigure
@ -313,8 +313,6 @@ let
passthru = passthru // { inherit go go-modules vendorSha256 vendorHash; };
enableParallelBuilding = enableParallelBuilding;
meta = {
# Add default meta information
platforms = go.meta.platforms or lib.platforms.all;

View file

@ -92,7 +92,7 @@ let
GOHOSTARCH = go.GOHOSTARCH or null;
GOHOSTOS = go.GOHOSTOS or null;
inherit CGO_ENABLED;
inherit CGO_ENABLED enableParallelBuilding;
GO111MODULE = "off";
GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ];
@ -107,7 +107,7 @@ let
mkdir -p "go/src/$(dirname "$goPackagePath")"
mv "$sourceRoot" "go/src/$goPackagePath"
'' + lib.optionalString (deleteVendor == true) ''
'' + lib.optionalString deleteVendor ''
if [ ! -d "go/src/$goPackagePath/vendor" ]; then
echo "vendor folder does not exist, 'deleteVendor' is not needed"
exit 10
@ -279,8 +279,6 @@ let
{ inherit go; } //
lib.optionalAttrs (goPackageAliases != []) { inherit goPackageAliases; };
enableParallelBuilding = enableParallelBuilding;
meta = {
# Add default meta information
homepage = "https://${goPackagePath}";