diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix index aca313264a28..b75123bddf21 100644 --- a/pkgs/build-support/go/module.nix +++ b/pkgs/build-support/go/module.nix @@ -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; diff --git a/pkgs/build-support/go/package.nix b/pkgs/build-support/go/package.nix index 9106bf9796eb..378c2e60d06a 100644 --- a/pkgs/build-support/go/package.nix +++ b/pkgs/build-support/go/package.nix @@ -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}";