treewide: handle postPhases __structuredAttrs-agnostically
Always specify the postPhases attribute as a list instead of a string. Append elements to the postPhases Bash variable using appendToVar instead of string or Bash array concatenation.
This commit is contained in:
parent
054c5f0e10
commit
758056dac7
@ -24,7 +24,7 @@ stdenv.mkDerivation (
|
|||||||
|
|
||||||
prefix = "/usr/local";
|
prefix = "/usr/local";
|
||||||
|
|
||||||
postPhases = "finalPhase";
|
postPhases = [ "finalPhase" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// args //
|
// args //
|
||||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation (
|
|||||||
showBuildStats = true;
|
showBuildStats = true;
|
||||||
|
|
||||||
preConfigurePhases = [ "autoconfPhase" ];
|
preConfigurePhases = [ "autoconfPhase" ];
|
||||||
postPhases = "finalPhase";
|
postPhases = [ "finalPhase" ];
|
||||||
|
|
||||||
# Autoconfiscate the sources.
|
# Autoconfiscate the sources.
|
||||||
autoconfPhase = ''
|
autoconfPhase = ''
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
postPhases+=" cleanupBuildDir"
|
appendToVar postPhases cleanupBuildDir
|
||||||
|
|
||||||
# Force GCC to build with coverage instrumentation. Also disable
|
# Force GCC to build with coverage instrumentation. Also disable
|
||||||
# optimisation, since it may confuse things.
|
# optimisation, since it may confuse things.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
postPhases+=" coverageReportPhase"
|
appendToVar postPhases coverageReportPhase
|
||||||
|
|
||||||
coverageReportPhase() {
|
coverageReportPhase() {
|
||||||
lcov --directory . --capture --output-file app.info
|
lcov --directory . --capture --output-file app.info
|
||||||
|
@ -5,7 +5,7 @@ moveBuildDir() {
|
|||||||
cd $out/.build
|
cd $out/.build
|
||||||
}
|
}
|
||||||
|
|
||||||
postPhases+=" removeBuildDir"
|
appendToVar postPhases removeBuildDir
|
||||||
|
|
||||||
removeBuildDir() {
|
removeBuildDir() {
|
||||||
rm -rf $out/.build
|
rm -rf $out/.build
|
||||||
|
@ -20,5 +20,5 @@ pythonRecompileBytecodePhase () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "${dontUsePythonRecompileBytecode-}" ]; then
|
if [ -z "${dontUsePythonRecompileBytecode-}" ]; then
|
||||||
postPhases+=" pythonRecompileBytecodePhase"
|
appendToVar postPhases pythonRecompileBytecodePhase
|
||||||
fi
|
fi
|
||||||
|
@ -97,7 +97,7 @@ postPatchMkspecs() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
if [ -z "${dontPatchMkspecs-}" ]; then
|
if [ -z "${dontPatchMkspecs-}" ]; then
|
||||||
postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
|
appendToVar postPhases postPatchMkspecs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
qtPreHook() {
|
qtPreHook() {
|
||||||
|
@ -71,7 +71,7 @@ else # Only set up Qt once.
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
if [ -z "${dontPatchMkspecs-}" ]; then
|
if [ -z "${dontPatchMkspecs-}" ]; then
|
||||||
postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
|
appendToVar postPhases postPatchMkspecs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
qtPreHook() {
|
qtPreHook() {
|
||||||
|
Loading…
Reference in New Issue
Block a user