mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
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";
|
||||
|
||||
postPhases = "finalPhase";
|
||||
postPhases = [ "finalPhase" ];
|
||||
}
|
||||
|
||||
// args //
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation (
|
||||
showBuildStats = true;
|
||||
|
||||
preConfigurePhases = [ "autoconfPhase" ];
|
||||
postPhases = "finalPhase";
|
||||
postPhases = [ "finalPhase" ];
|
||||
|
||||
# Autoconfiscate the sources.
|
||||
autoconfPhase = ''
|
||||
|
@ -1,4 +1,4 @@
|
||||
postPhases+=" cleanupBuildDir"
|
||||
appendToVar postPhases cleanupBuildDir
|
||||
|
||||
# Force GCC to build with coverage instrumentation. Also disable
|
||||
# optimisation, since it may confuse things.
|
||||
|
@ -1,4 +1,4 @@
|
||||
postPhases+=" coverageReportPhase"
|
||||
appendToVar postPhases coverageReportPhase
|
||||
|
||||
coverageReportPhase() {
|
||||
lcov --directory . --capture --output-file app.info
|
||||
|
@ -5,7 +5,7 @@ moveBuildDir() {
|
||||
cd $out/.build
|
||||
}
|
||||
|
||||
postPhases+=" removeBuildDir"
|
||||
appendToVar postPhases removeBuildDir
|
||||
|
||||
removeBuildDir() {
|
||||
rm -rf $out/.build
|
||||
|
@ -20,5 +20,5 @@ pythonRecompileBytecodePhase () {
|
||||
}
|
||||
|
||||
if [ -z "${dontUsePythonRecompileBytecode-}" ]; then
|
||||
postPhases+=" pythonRecompileBytecodePhase"
|
||||
appendToVar postPhases pythonRecompileBytecodePhase
|
||||
fi
|
||||
|
@ -97,7 +97,7 @@ postPatchMkspecs() {
|
||||
fi
|
||||
}
|
||||
if [ -z "${dontPatchMkspecs-}" ]; then
|
||||
postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
|
||||
appendToVar postPhases postPatchMkspecs
|
||||
fi
|
||||
|
||||
qtPreHook() {
|
||||
|
@ -71,7 +71,7 @@ else # Only set up Qt once.
|
||||
fi
|
||||
}
|
||||
if [ -z "${dontPatchMkspecs-}" ]; then
|
||||
postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
|
||||
appendToVar postPhases postPatchMkspecs
|
||||
fi
|
||||
|
||||
qtPreHook() {
|
||||
|
Loading…
Reference in New Issue
Block a user