mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
wafHook: let derivations use an existing waf in a non-standard location
this is necessary for talloc
This commit is contained in:
parent
07b42ccf2d
commit
f075de5c25
@ -2751,9 +2751,9 @@ addEnvHooks "$hostOffset" myBashFunction
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Overrides the configure, build, and install phases. This will run the
|
Overrides the configure, build, and install phases. This will run the
|
||||||
"waf" script used by many projects. If waf doesn’t exist, it will copy
|
"waf" script used by many projects. If wafPath (default ./waf) doesn’t
|
||||||
the version of waf available in Nixpkgs wafFlags can be used to pass
|
exist, it will copy the version of waf available in Nixpkgs. wafFlags can
|
||||||
flags to the waf script.
|
be used to pass flags to the waf script.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
wafConfigurePhase() {
|
wafConfigurePhase() {
|
||||||
runHook preConfigure
|
runHook preConfigure
|
||||||
|
|
||||||
if ! [ -f ./waf ]; then
|
if ! [ -f "${wafPath:=./waf}" ]; then
|
||||||
cp @waf@ waf
|
echo "copying waf to $wafPath..."
|
||||||
|
cp @waf@ "$wafPath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then
|
if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then
|
||||||
@ -14,7 +15,7 @@ wafConfigurePhase() {
|
|||||||
${configureTargets:-configure}
|
${configureTargets:-configure}
|
||||||
)
|
)
|
||||||
echoCmd 'configure flags' "${flagsArray[@]}"
|
echoCmd 'configure flags' "${flagsArray[@]}"
|
||||||
python waf "${flagsArray[@]}"
|
python "$wafPath" "${flagsArray[@]}"
|
||||||
|
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
}
|
}
|
||||||
@ -33,7 +34,7 @@ wafBuildPhase () {
|
|||||||
)
|
)
|
||||||
|
|
||||||
echoCmd 'build flags' "${flagsArray[@]}"
|
echoCmd 'build flags' "${flagsArray[@]}"
|
||||||
python waf "${flagsArray[@]}"
|
python "$wafPath" "${flagsArray[@]}"
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
}
|
}
|
||||||
@ -52,7 +53,7 @@ wafInstallPhase() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
echoCmd 'install flags' "${flagsArray[@]}"
|
echoCmd 'install flags' "${flagsArray[@]}"
|
||||||
python waf "${flagsArray[@]}"
|
python "$wafPath" "${flagsArray[@]}"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user