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

This commit is contained in:
Ivan Trubach 2022-10-03 16:29:16 +03:00 committed by zowoq
parent 06bc99ed31
commit dcc576176c
2 changed files with 10 additions and 10 deletions

View file

@ -105,7 +105,7 @@ let
runHook postConfigure
'';
buildPhase = args.modBuildPhase or ''
buildPhase = args.modBuildPhase or (''
runHook preBuild
'' + lib.optionalString (deleteVendor == true) ''
if [ ! -d vendor ]; then
@ -133,7 +133,7 @@ let
mkdir -p vendor
runHook postBuild
'';
'');
installPhase = args.modInstallPhase or ''
runHook preInstall
@ -176,7 +176,7 @@ let
GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ];
inherit CGO_ENABLED;
configurePhase = args.configurePhase or ''
configurePhase = args.configurePhase or (''
runHook preConfigure
export GOCACHE=$TMPDIR/go-cache
@ -200,9 +200,9 @@ let
fi
runHook postConfigure
'';
'');
buildPhase = args.buildPhase or ''
buildPhase = args.buildPhase or (''
runHook preBuild
exclude='\(/_\|examples\|Godeps\|testdata'
@ -282,7 +282,7 @@ let
)
'' + ''
runHook postBuild
'';
'');
doCheck = args.doCheck or true;
checkPhase = args.checkPhase or ''

View file

@ -99,7 +99,7 @@ let
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
configurePhase = args.configurePhase or ''
configurePhase = args.configurePhase or (''
runHook preConfigure
# Extract the source
@ -141,7 +141,7 @@ let
fi
runHook postConfigure
'';
'');
renameImports = args.renameImports or (
let
@ -151,7 +151,7 @@ let
renames = p: lib.concatMapStringsSep "\n" (rename p.goPackagePath) p.goPackageAliases;
in lib.concatMapStringsSep "\n" renames inputsWithAliases);
buildPhase = args.buildPhase or ''
buildPhase = args.buildPhase or (''
runHook preBuild
runHook renameImports
@ -235,7 +235,7 @@ let
)
'' + ''
runHook postBuild
'';
'');
doCheck = args.doCheck or false;
checkPhase = args.checkPhase or ''