mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
cargo/hooks: allow hooks to be disabled
This commit is contained in:
parent
e83d926f21
commit
042adf08d1
@ -36,4 +36,6 @@ cargoBuildHook() {
|
||||
echo "Finished cargoBuildHook"
|
||||
}
|
||||
|
||||
buildPhase=cargoBuildHook
|
||||
if [ -z "${dontCargoBuild-}" ] && [ -z "${buildPhase-}" ]; then
|
||||
buildPhase=cargoBuildHook
|
||||
fi
|
||||
|
@ -41,6 +41,6 @@ cargoCheckHook() {
|
||||
runHook postCheck
|
||||
}
|
||||
|
||||
if [ -z "${checkPhase-}" ]; then
|
||||
if [ -z "${dontCargoCheck-}" ] && [ -z "${checkPhase-}" ]; then
|
||||
checkPhase=cargoCheckHook
|
||||
fi
|
||||
|
@ -43,7 +43,7 @@ cargoInstallHook() {
|
||||
}
|
||||
|
||||
|
||||
if [ -z "${installPhase-}" ]; then
|
||||
if [ -z "${dontCargoInstall-}" ] && [ -z "${installPhase-}" ]; then
|
||||
installPhase=cargoInstallHook
|
||||
postBuildHooks+=(cargoInstallPostBuildHook)
|
||||
fi
|
||||
|
@ -77,7 +77,9 @@ cargoSetupPostPatchHook() {
|
||||
echo "Finished cargoSetupPostPatchHook"
|
||||
}
|
||||
|
||||
postUnpackHooks+=(cargoSetupPostUnpackHook)
|
||||
if [ -z "${dontCargoSetupPostUnpack-}" ]; then
|
||||
postUnpackHooks+=(cargoSetupPostUnpackHook)
|
||||
fi
|
||||
|
||||
if [ -z ${cargoVendorDir-} ]; then
|
||||
postPatchHooks+=(cargoSetupPostPatchHook)
|
||||
|
Loading…
Reference in New Issue
Block a user