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