diff --git a/pkgs/development/python-modules/pytest-forked/setup-hook.sh b/pkgs/development/python-modules/pytest-forked/setup-hook.sh index 0eff690e9079e..88ccd0aac171b 100644 --- a/pkgs/development/python-modules/pytest-forked/setup-hook.sh +++ b/pkgs/development/python-modules/pytest-forked/setup-hook.sh @@ -12,21 +12,7 @@ pytestForkedHook() { fi } -# the flags should be added before pytestCheckHook runs so -# until we have dependency mechanism in generic builder, we need to use this ugly hack. - if [ -z "${dontUsePytestForked-}" ] && [ -z "${dontUsePytestCheck-}" ]; then - if [[ " ${preDistPhases[*]:-} " =~ " pytestCheckPhase " ]]; then - _preDistPhases="${preDistPhases[*]} " - _preDistPhases="${_preDistPhases/ pytestCheckPhase / pytestForkedHook pytestCheckPhase }" - if [[ -n "${__structuredAttrs-}" ]]; then - preDistPhases=() - else - preDistPhases="" - fi - appendToVar preDistPhases $_preDistPhases - unset _preDistPhases - else - appendToVar preDistPhases pytestForkedHook - fi + # The flags should be added before pytestCheckHook runs in preDistPhases. + postInstallCheckHooks+=(pytestForkedHook) fi