buildGo{Module,Package}: fix precedence for or operator

authored by Ivan Trubach and committed by zowoq dcc57617 06bc99ed

+10 -10
+6 -6
pkgs/build-support/go/module.nix
··· 105 105 runHook postConfigure 106 106 ''; 107 107 108 - buildPhase = args.modBuildPhase or '' 108 + buildPhase = args.modBuildPhase or ('' 109 109 runHook preBuild 110 110 '' + lib.optionalString (deleteVendor == true) '' 111 111 if [ ! -d vendor ]; then ··· 133 133 mkdir -p vendor 134 134 135 135 runHook postBuild 136 - ''; 136 + ''); 137 137 138 138 installPhase = args.modInstallPhase or '' 139 139 runHook preInstall ··· 176 176 GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ]; 177 177 inherit CGO_ENABLED; 178 178 179 - configurePhase = args.configurePhase or '' 179 + configurePhase = args.configurePhase or ('' 180 180 runHook preConfigure 181 181 182 182 export GOCACHE=$TMPDIR/go-cache ··· 200 200 fi 201 201 202 202 runHook postConfigure 203 - ''; 203 + ''); 204 204 205 - buildPhase = args.buildPhase or '' 205 + buildPhase = args.buildPhase or ('' 206 206 runHook preBuild 207 207 208 208 exclude='\(/_\|examples\|Godeps\|testdata' ··· 282 282 ) 283 283 '' + '' 284 284 runHook postBuild 285 - ''; 285 + ''); 286 286 287 287 doCheck = args.doCheck or true; 288 288 checkPhase = args.checkPhase or ''
+4 -4
pkgs/build-support/go/package.nix
··· 99 99 100 100 GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); 101 101 102 - configurePhase = args.configurePhase or '' 102 + configurePhase = args.configurePhase or ('' 103 103 runHook preConfigure 104 104 105 105 # Extract the source ··· 141 141 fi 142 142 143 143 runHook postConfigure 144 - ''; 144 + ''); 145 145 146 146 renameImports = args.renameImports or ( 147 147 let ··· 151 151 renames = p: lib.concatMapStringsSep "\n" (rename p.goPackagePath) p.goPackageAliases; 152 152 in lib.concatMapStringsSep "\n" renames inputsWithAliases); 153 153 154 - buildPhase = args.buildPhase or '' 154 + buildPhase = args.buildPhase or ('' 155 155 runHook preBuild 156 156 157 157 runHook renameImports ··· 235 235 ) 236 236 '' + '' 237 237 runHook postBuild 238 - ''; 238 + ''); 239 239 240 240 doCheck = args.doCheck or false; 241 241 checkPhase = args.checkPhase or ''