0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

treewide: *Phase(s)? variables are optional

If these aren't defined, the stdenv defaults are used in the `*Phase`
case, or no extra phases are done, in the `*Phases` case.
This commit is contained in:
John Ericson 2019-10-31 17:59:18 +00:00
parent 7eecf4f8fb
commit b7f4bda282
18 changed files with 24 additions and 24 deletions

View file

@ -9,7 +9,7 @@ flitBuildPhase () {
echo "Finished executing flitBuildPhase" echo "Finished executing flitBuildPhase"
} }
if [ -z "${dontUseFlitBuild-}" ] && [ -z "$buildPhase" ]; then if [ -z "${dontUseFlitBuild-}" ] && [ -z "${buildPhase-}" ]; then
echo "Using flitBuildPhase" echo "Using flitBuildPhase"
buildPhase=flitBuildPhase buildPhase=flitBuildPhase
fi fi

View file

@ -31,7 +31,7 @@ pipShellHook() {
echo "Finished executing pipShellHook" echo "Finished executing pipShellHook"
} }
if [ -z "${dontUsePipBuild-}" ] && [ -z "$buildPhase" ]; then if [ -z "${dontUsePipBuild-}" ] && [ -z "${buildPhase-}" ]; then
echo "Using pipBuildPhase" echo "Using pipBuildPhase"
buildPhase=pipBuildPhase buildPhase=pipBuildPhase
fi fi

View file

@ -18,7 +18,7 @@ pipInstallPhase() {
echo "Finished executing pipInstallPhase" echo "Finished executing pipInstallPhase"
} }
if [ -z "${dontUsePipInstall-}" ] && [ -z "$installPhase" ]; then if [ -z "${dontUsePipInstall-}" ] && [ -z "${installPhase-}" ]; then
echo "Using pipInstallPhase" echo "Using pipInstallPhase"
installPhase=pipInstallPhase installPhase=pipInstallPhase
fi fi

View file

@ -43,7 +43,7 @@ function pytestCheckPhase() {
echo "Finished executing pytestCheckPhase" echo "Finished executing pytestCheckPhase"
} }
if [ -z "${dontUsePytestCheck-}" ] && [ -z "$installCheckPhase" ]; then if [ -z "${dontUsePytestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then
echo "Using pytestCheckPhase" echo "Using pytestCheckPhase"
preDistPhases+=" pytestCheckPhase" preDistPhases+=" pytestCheckPhase"
fi fi

View file

@ -36,12 +36,12 @@ setuptoolsShellHook() {
echo "Finished executing setuptoolsShellHook" echo "Finished executing setuptoolsShellHook"
} }
if [ -z "${dontUseSetuptoolsBuild-}" ] && [ -z "$buildPhase" ]; then if [ -z "${dontUseSetuptoolsBuild-}" ] && [ -z "${buildPhase-}" ]; then
echo "Using setuptoolsBuildPhase" echo "Using setuptoolsBuildPhase"
buildPhase=setuptoolsBuildPhase buildPhase=setuptoolsBuildPhase
fi fi
if [ -z "${dontUseSetuptoolsShellHook-}" ] && [ -z "$shellHook" ]; then if [ -z "${dontUseSetuptoolsShellHook-}" ] && [ -z "${shellHook-}" ]; then
echo "Using setuptoolsShellHook" echo "Using setuptoolsShellHook"
shellHook=setuptoolsShellHook shellHook=setuptoolsShellHook
fi fi

View file

@ -12,7 +12,7 @@ setuptoolsCheckPhase() {
echo "Finished executing setuptoolsCheckPhase" echo "Finished executing setuptoolsCheckPhase"
} }
if [ -z "${dontUseSetuptoolsCheck-}" ] && [ -z "$installCheckPhase" ]; then if [ -z "${dontUseSetuptoolsCheck-}" ] && [ -z "${installCheckPhase-}" ]; then
echo "Using setuptoolsCheckPhase" echo "Using setuptoolsCheckPhase"
preDistPhases+=" setuptoolsCheckPhase" preDistPhases+=" setuptoolsCheckPhase"
fi fi

View file

@ -12,7 +12,7 @@ wheelUnpackPhase(){
echo "Finished executing wheelUnpackPhase" echo "Finished executing wheelUnpackPhase"
} }
if [ -z "${dontUseWheelUnpack-}" ] && [ -z "$unpackPhase" ]; then if [ -z "${dontUseWheelUnpack-}" ] && [ -z "${unpackPhase-}" ]; then
echo "Using wheelUnpackPhase" echo "Using wheelUnpackPhase"
unpackPhase=wheelUnpackPhase unpackPhase=wheelUnpackPhase
fi fi

View file

@ -16,4 +16,4 @@ dropIconThemeCache() {
fi fi
} }
preFixupPhases="$preFixupPhases dropIconThemeCache" preFixupPhases="${preFixupPhases-} dropIconThemeCache"

View file

@ -31,6 +31,6 @@ qmakeConfigurePhase() {
runHook postConfigure runHook postConfigure
} }
if [ -z "${dontUseQmakeConfigure-}" -a -z "$configurePhase" ]; then if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
configurePhase=qmakeConfigurePhase configurePhase=qmakeConfigurePhase
fi fi

View file

@ -99,7 +99,7 @@ cmakeConfigurePhase() {
cmakeFlags="-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON $cmakeFlags" cmakeFlags="-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON $cmakeFlags"
cmakeFlags="-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON $cmakeFlags" cmakeFlags="-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON $cmakeFlags"
if [ "$buildPhase" = ninjaBuildPhase ]; then if [ "${buildPhase-}" = ninjaBuildPhase ]; then
cmakeFlags="-GNinja $cmakeFlags" cmakeFlags="-GNinja $cmakeFlags"
fi fi
@ -115,7 +115,7 @@ cmakeConfigurePhase() {
runHook postConfigure runHook postConfigure
} }
if [ -z "${dontUseCmakeConfigure-}" -a -z "$configurePhase" ]; then if [ -z "${dontUseCmakeConfigure-}" -a -z "${configurePhase-}" ]; then
setOutputFlags= setOutputFlags=
configurePhase=cmakeConfigurePhase configurePhase=cmakeConfigurePhase
fi fi

View file

@ -9,6 +9,6 @@ gnConfigurePhase() {
runHook postConfigure runHook postConfigure
} }
if [ -z "${dontUseGnConfigure-}" -a -z "$configurePhase" ]; then if [ -z "${dontUseGnConfigure-}" -a -z "${configurePhase-}" ]; then
configurePhase=gnConfigurePhase configurePhase=gnConfigurePhase
fi fi

View file

@ -36,7 +36,7 @@ mesonConfigurePhase() {
runHook postConfigure runHook postConfigure
} }
if [ -z "${dontUseMesonConfigure-}" -a -z "$configurePhase" ]; then if [ -z "${dontUseMesonConfigure-}" -a -z "${configurePhase-}" ]; then
setOutputFlags= setOutputFlags=
configurePhase=mesonConfigurePhase configurePhase=mesonConfigurePhase
fi fi

View file

@ -19,7 +19,7 @@ ninjaBuildPhase() {
runHook postBuild runHook postBuild
} }
if [ -z "${dontUseNinjaBuild-}" -a -z "$buildPhase" ]; then if [ -z "${dontUseNinjaBuild-}" -a -z "${buildPhase-}" ]; then
buildPhase=ninjaBuildPhase buildPhase=ninjaBuildPhase
fi fi
@ -38,7 +38,7 @@ ninjaInstallPhase() {
runHook postInstall runHook postInstall
} }
if [ -z "${dontUseNinjaInstall-}" -a -z "$installPhase" ]; then if [ -z "${dontUseNinjaInstall-}" -a -z "${installPhase-}" ]; then
installPhase=ninjaInstallPhase installPhase=ninjaInstallPhase
fi fi
@ -73,6 +73,6 @@ ninjaCheckPhase() {
runHook postCheck runHook postCheck
} }
if [ -z "${dontUseNinjaCheck-}" -a -z "$checkPhase" ]; then if [ -z "${dontUseNinjaCheck-}" -a -z "${checkPhase-}" ]; then
checkPhase=ninjaCheckPhase checkPhase=ninjaCheckPhase
fi fi

View file

@ -71,14 +71,14 @@ sconsCheckPhase() {
runHook postCheck runHook postCheck
} }
if [ -z "$buildPhase" ]; then if [ -z "${buildPhase-}" ]; then
buildPhase=sconsBuildPhase buildPhase=sconsBuildPhase
fi fi
if [ -z "${dontUseSconsInstall-}" -a -z "$installPhase" ]; then if [ -z "${dontUseSconsInstall-}" -a -z "${installPhase-}" ]; then
installPhase=sconsInstallPhase installPhase=sconsInstallPhase
fi fi
if [ -z "$checkPhase" ]; then if [ -z "${checkPhase-}" ]; then
checkPhase=sconsCheckPhase checkPhase=sconsCheckPhase
fi fi

View file

@ -14,6 +14,6 @@ premakeConfigurePhase() {
runHook postConfigure runHook postConfigure
} }
if [ -z "$configurePhase" ]; then if [ -z "${configurePhase-}" ]; then
configurePhase=premakeConfigurePhase configurePhase=premakeConfigurePhase
fi fi

View file

@ -20,7 +20,7 @@ xcbuildInstallPhase () {
} }
buildPhase=xcbuildBuildPhase buildPhase=xcbuildBuildPhase
if [ -z "$installPhase" ]; then if [ -z "${installPhase-}" ]; then
installPhase=xcbuildInstallPhase installPhase=xcbuildInstallPhase
fi fi

View file

@ -14,6 +14,6 @@ imakeConfigurePhase() {
runHook postConfigure runHook postConfigure
} }
if [ -z "${dontUseImakeConfigure-}" -a -z "$configurePhase" ]; then if [ -z "${dontUseImakeConfigure-}" -a -z "${configurePhase-}" ]; then
configurePhase=imakeConfigurePhase configurePhase=imakeConfigurePhase
fi fi

View file

@ -3,4 +3,4 @@ mimeinfoPreFixupPhase() {
rm -f $out/share/applications/mimeinfo.cache rm -f $out/share/applications/mimeinfo.cache
} }
preFixupPhases="$preFixupPhases mimeinfoPreFixupPhase" preFixupPhases="${preFixupPhases-} mimeinfoPreFixupPhase"