mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
treewide: Make more dont*
variables OK to be undefined in setup hooks
This commit is contained in:
parent
3835442cf0
commit
1290e532ea
@ -61,6 +61,6 @@ postPatchMkspecs() {
|
||||
fixQtBuiltinPaths "$dev/mkspecs" '*.pr?'
|
||||
fi
|
||||
}
|
||||
if [ -z "$dontPatchMkspecs" ]; then
|
||||
if [ -z "${dontPatchMkspecs-}" ]; then
|
||||
postPhases="${postPhases}${postPhases:+ }postPatchMkspecs"
|
||||
fi
|
||||
|
@ -20,17 +20,17 @@ cmakeConfigurePhase() {
|
||||
export CTEST_PARALLEL_LEVEL=$NIX_BUILD_CORES
|
||||
fi
|
||||
|
||||
if [ -z "$dontFixCmake" ]; then
|
||||
if [ -z "${dontFixCmake-}" ]; then
|
||||
fixCmakeFiles .
|
||||
fi
|
||||
|
||||
if [ -z "$dontUseCmakeBuildDir" ]; then
|
||||
if [ -z "${dontUseCmakeBuildDir-}" ]; then
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmakeDir=${cmakeDir:-..}
|
||||
fi
|
||||
|
||||
if [ -z "$dontAddPrefix" ]; then
|
||||
if [ -z "${dontAddPrefix-}" ]; then
|
||||
cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags"
|
||||
fi
|
||||
|
||||
@ -84,7 +84,7 @@ cmakeConfigurePhase() {
|
||||
cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags"
|
||||
|
||||
# Don’t build tests when doCheck = false
|
||||
if [ -z "$doCheck" ]; then
|
||||
if [ -z "${doCheck-}" ]; then
|
||||
cmakeFlags="-DBUILD_TESTING=OFF $cmakeFlags"
|
||||
fi
|
||||
|
||||
@ -115,7 +115,7 @@ cmakeConfigurePhase() {
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "$dontUseCmakeConfigure" -a -z "$configurePhase" ]; then
|
||||
if [ -z "${dontUseCmakeConfigure-}" -a -z "$configurePhase" ]; then
|
||||
setOutputFlags=
|
||||
configurePhase=cmakeConfigurePhase
|
||||
fi
|
||||
|
@ -9,6 +9,6 @@ gnConfigurePhase() {
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "$dontUseGnConfigure" -a -z "$configurePhase" ]; then
|
||||
if [ -z "${dontUseGnConfigure-}" -a -z "$configurePhase" ]; then
|
||||
configurePhase=gnConfigurePhase
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
mesonConfigurePhase() {
|
||||
runHook preConfigure
|
||||
|
||||
if [ -z "$dontAddPrefix" ]; then
|
||||
if [ -z "${dontAddPrefix-}" ]; then
|
||||
mesonFlags="--prefix=$prefix $mesonFlags"
|
||||
fi
|
||||
|
||||
@ -36,7 +36,7 @@ mesonConfigurePhase() {
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "$dontUseMesonConfigure" -a -z "$configurePhase" ]; then
|
||||
if [ -z "${dontUseMesonConfigure-}" -a -z "$configurePhase" ]; then
|
||||
setOutputFlags=
|
||||
configurePhase=mesonConfigurePhase
|
||||
fi
|
||||
|
@ -19,7 +19,7 @@ ninjaBuildPhase() {
|
||||
runHook postBuild
|
||||
}
|
||||
|
||||
if [ -z "$dontUseNinjaBuild" -a -z "$buildPhase" ]; then
|
||||
if [ -z "${dontUseNinjaBuild-}" -a -z "$buildPhase" ]; then
|
||||
buildPhase=ninjaBuildPhase
|
||||
fi
|
||||
|
||||
@ -38,7 +38,7 @@ ninjaInstallPhase() {
|
||||
runHook postInstall
|
||||
}
|
||||
|
||||
if [ -z "$dontUseNinjaInstall" -a -z "$installPhase" ]; then
|
||||
if [ -z "${dontUseNinjaInstall-}" -a -z "$installPhase" ]; then
|
||||
installPhase=ninjaInstallPhase
|
||||
fi
|
||||
|
||||
@ -73,6 +73,6 @@ ninjaCheckPhase() {
|
||||
runHook postCheck
|
||||
}
|
||||
|
||||
if [ -z "$dontUseNinjaCheck" -a -z "$checkPhase" ]; then
|
||||
if [ -z "${dontUseNinjaCheck-}" -a -z "$checkPhase" ]; then
|
||||
checkPhase=ninjaCheckPhase
|
||||
fi
|
||||
|
@ -75,7 +75,7 @@ if [ -z "$buildPhase" ]; then
|
||||
buildPhase=sconsBuildPhase
|
||||
fi
|
||||
|
||||
if [ -z "$dontUseSconsInstall" -a -z "$installPhase" ]; then
|
||||
if [ -z "${dontUseSconsInstall-}" -a -z "$installPhase" ]; then
|
||||
installPhase=sconsInstallPhase
|
||||
fi
|
||||
|
||||
|
@ -14,6 +14,6 @@ imakeConfigurePhase() {
|
||||
runHook postConfigure
|
||||
}
|
||||
|
||||
if [ -z "$dontUseImakeConfigure" -a -z "$configurePhase" ]; then
|
||||
if [ -z "${dontUseImakeConfigure-}" -a -z "$configurePhase" ]; then
|
||||
configurePhase=imakeConfigurePhase
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user