about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2023-04-08 13:27:40 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2023-04-09 12:23:16 +1000
commitdc73bd6430dc594655488337944b64a9841bf8d8 (patch)
tree145107423c489f7bc92585273247dba215f6ee23 /pkgs/build-support
parentc1d9e46fc5a63022aea37f4fe83bfa3435a41c4a (diff)
buildGo{Module,Package}: minor cleanup
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/go/module.nix6
-rw-r--r--pkgs/build-support/go/package.nix6
2 files changed, 4 insertions, 8 deletions
diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix
index aca313264a28c..b75123bddf210 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 9106bf9796ebb..378c2e60d06a1 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}";