treewide: handle preConfigurePhases __structuredAttrs-agnostically

Always specify the preConfigurePhases attribute as a list instead of a
string.

Append elements to the preConfigurePhases Bash variable using
appendToVar instead of string or Bash array concatenation.
This commit is contained in:
Yueh-Shun Li 2024-09-03 04:14:28 +08:00
parent 21c0129841
commit 5d42a8b38c
7 changed files with 7 additions and 7 deletions

View File

@ -146,7 +146,7 @@ stdenv.mkDerivation (removeAttrs ({
})
// (optionalAttrs (args?useMelquiondRemake) rec {
COQUSERCONTRIB = "$out/lib/coq/${coq.coq-version}/user-contrib";
preConfigurePhases = "autoconf";
preConfigurePhases = [ "autoconf" ];
configureFlags = [ "--libdir=${COQUSERCONTRIB}/${useMelquiondRemake.logpath or ""}" ];
buildPhase = "./remake -j$NIX_BUILD_CORES";
installPhase = "./remake install";

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation (
showBuildStats = true;
preConfigurePhases = "autoconfPhase";
preConfigurePhases = [ "autoconfPhase" ];
postPhases = "finalPhase";
# Autoconfiscate the sources.

View File

@ -1,4 +1,4 @@
preConfigurePhases="${preConfigurePhases:-} autoreconfPhase"
appendToVar preConfigurePhases autoreconfPhase
autoreconfPhase() {
runHook preAutoreconf

View File

@ -1,4 +1,4 @@
preConfigurePhases+=" updateAutotoolsGnuConfigScriptsPhase"
appendToVar preConfigurePhases updateAutotoolsGnuConfigScriptsPhase
updateAutotoolsGnuConfigScriptsPhase() {
if [ -n "${dontUpdateAutotoolsGnuConfigScripts-}" ]; then return; fi

View File

@ -10,5 +10,5 @@ xdtAutogenPhase() {
}
if [ -z "${dontUseXdtAutogenPhase-}" ]; then
preConfigurePhases+=(xdtAutogenPhase)
appendToVar preConfigurePhases xdtAutogenPhase
fi

View File

@ -74,5 +74,5 @@ configureNuget() {
if [[ -z ${dontConfigureNuget-} ]]; then
appendToVar prePhases createNugetDirs
preConfigurePhases+=(configureNuget)
appendToVar preConfigurePhases configureNuget
fi

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
sourceRoot = "liquidfun/Box2D";
preConfigurePhases = "preConfigure";
preConfigurePhases = [ "preConfigure" ];
preConfigure = ''
sed -i Box2D/Common/b2Settings.h -e 's@b2_maxPolygonVertices .*@b2_maxPolygonVertices 15@'